Cache results of checkPmaAbsoluteUri.

This commit is contained in:
Michal Čihař
2010-01-21 11:19:49 +00:00
parent 94c2f864ae
commit 58d9b034f7

View File

@@ -564,6 +564,10 @@ 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');
@@ -711,6 +715,7 @@ class PMA_Config
} }
} }
$this->set('PmaAbsoluteUri', $pma_absolute_uri); $this->set('PmaAbsoluteUri', $pma_absolute_uri);
$url_checked = true;
} }
/** /**