From 0b15e478d7ffbfc42cb38c6d792e3dcec0891e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 21 Jan 2010 12:49:49 +0000 Subject: [PATCH] PmaAbsoluteUri is now checked at the beginning This way we don't have to care in all other places whether it is correct or not. --- libraries/Config.class.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 5ed7c5772..0be507a74 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -378,9 +378,9 @@ class PMA_Config $cfg['DefaultTabDatabase'] = str_replace('_details', '', str_replace('db_details.php', 'db_sql.php', $cfg['DefaultTabDatabase'])); } - $this->checkFontsize(); - //$this->checkPmaAbsoluteUri(); $this->settings = PMA_array_merge_recursive($this->settings, $cfg); + $this->checkPmaAbsoluteUri(); + $this->checkFontsize(); $this->checkPermissions(); @@ -537,10 +537,6 @@ class PMA_Config */ function checkPmaAbsoluteUri() { - static $url_checked = false; - - if ($url_checked) return; - // Setup a default value to let the people and lazy sysadmins work anyway, // they'll get an error if the autodetect code doesn't work $pma_absolute_uri = $this->get('PmaAbsoluteUri'); @@ -682,7 +678,6 @@ class PMA_Config } } $this->set('PmaAbsoluteUri', $pma_absolute_uri); - $url_checked = true; } /** @@ -790,7 +785,6 @@ class PMA_Config return $is_https; } - $this->checkPmaAbsoluteUri(); $url = parse_url($this->get('PmaAbsoluteUri')); if (isset($url['scheme']) @@ -866,8 +860,6 @@ class PMA_Config return $cookie_path; } - $this->checkPmaAbsoluteUri(); - $parsed_url = parse_url($this->get('PmaAbsoluteUri')); $cookie_path = $parsed_url['path'];