diff --git a/ChangeLog b/ChangeLog index 3b76230fb..b51505e87 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2006-07-04 Sebastian Mendel * js\querywindow.js, libraries\footer.inc.php: renamed JavaScript function refreshLeft() to refreshNavigation() + * libraries/Config.class.php: reload default configuration if config.inc.php + is removed 2006-07-03 Sebastian Mendel * index.php, js\querywindow.js, querywindow.php, libraries\common.lib.php, diff --git a/libraries/Config.class.php b/libraries/Config.class.php index f5b378e75..a4aae21ce 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -293,11 +293,13 @@ class PMA_Config */ function __wakeup() { - if (file_exists($this->getSource()) && $this->source_mtime !== filemtime($this->getSource()) + if (! $this->checkConfigSource() + || $this->source_mtime !== filemtime($this->getSource()) || $this->default_source_mtime !== filemtime($this->default_source) - || $this->error_config_file || $this->error_config_default_file) { + || $this->error_config_file + || $this->error_config_default_file) { $this->settings = array(); - $this->load($this->getSource()); + $this->load(); $this->checkSystem(); } @@ -424,6 +426,11 @@ class PMA_Config */ function checkConfigSource() { + if (! $this->getSource()) { + // no configuration file set at all + return false; + } + if (! file_exists($this->getSource())) { // do not trigger error here // https://sf.net/tracker/?func=detail&aid=1370269&group_id=23067&atid=377408