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.
This commit is contained in:
Michal Čihař
2010-01-21 12:49:49 +00:00
parent 6ca77a8b5e
commit 0b15e478d7

View File

@@ -378,9 +378,9 @@ class PMA_Config
$cfg['DefaultTabDatabase'] = str_replace('_details', '', str_replace('db_details.php', 'db_sql.php', $cfg['DefaultTabDatabase'])); $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->settings = PMA_array_merge_recursive($this->settings, $cfg);
$this->checkPmaAbsoluteUri();
$this->checkFontsize();
$this->checkPermissions(); $this->checkPermissions();
@@ -537,10 +537,6 @@ class PMA_Config
*/ */
function checkPmaAbsoluteUri() function checkPmaAbsoluteUri()
{ {
static $url_checked = false;
if ($url_checked) return;
// Setup a default value to let the people and lazy sysadmins work anyway, // 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 // they'll get an error if the autodetect code doesn't work
$pma_absolute_uri = $this->get('PmaAbsoluteUri'); $pma_absolute_uri = $this->get('PmaAbsoluteUri');
@@ -682,7 +678,6 @@ class PMA_Config
} }
} }
$this->set('PmaAbsoluteUri', $pma_absolute_uri); $this->set('PmaAbsoluteUri', $pma_absolute_uri);
$url_checked = true;
} }
/** /**
@@ -790,7 +785,6 @@ class PMA_Config
return $is_https; return $is_https;
} }
$this->checkPmaAbsoluteUri();
$url = parse_url($this->get('PmaAbsoluteUri')); $url = parse_url($this->get('PmaAbsoluteUri'));
if (isset($url['scheme']) if (isset($url['scheme'])
@@ -866,8 +860,6 @@ class PMA_Config
return $cookie_path; return $cookie_path;
} }
$this->checkPmaAbsoluteUri();
$parsed_url = parse_url($this->get('PmaAbsoluteUri')); $parsed_url = parse_url($this->get('PmaAbsoluteUri'));
$cookie_path = $parsed_url['path']; $cookie_path = $parsed_url['path'];