reload default configuration if config.inc.php is removed
This commit is contained in:
@@ -8,6 +8,8 @@ $Source$
|
|||||||
2006-07-04 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
2006-07-04 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* js\querywindow.js, libraries\footer.inc.php: renamed JavaScript function
|
* js\querywindow.js, libraries\footer.inc.php: renamed JavaScript function
|
||||||
refreshLeft() to refreshNavigation()
|
refreshLeft() to refreshNavigation()
|
||||||
|
* libraries/Config.class.php: reload default configuration if config.inc.php
|
||||||
|
is removed
|
||||||
|
|
||||||
2006-07-03 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
2006-07-03 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* index.php, js\querywindow.js, querywindow.php, libraries\common.lib.php,
|
* index.php, js\querywindow.js, querywindow.php, libraries\common.lib.php,
|
||||||
|
@@ -293,11 +293,13 @@ class PMA_Config
|
|||||||
*/
|
*/
|
||||||
function __wakeup()
|
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->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->settings = array();
|
||||||
$this->load($this->getSource());
|
$this->load();
|
||||||
$this->checkSystem();
|
$this->checkSystem();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,6 +426,11 @@ class PMA_Config
|
|||||||
*/
|
*/
|
||||||
function checkConfigSource()
|
function checkConfigSource()
|
||||||
{
|
{
|
||||||
|
if (! $this->getSource()) {
|
||||||
|
// no configuration file set at all
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (! file_exists($this->getSource())) {
|
if (! file_exists($this->getSource())) {
|
||||||
// do not trigger error here
|
// do not trigger error here
|
||||||
// https://sf.net/tracker/?func=detail&aid=1370269&group_id=23067&atid=377408
|
// https://sf.net/tracker/?func=detail&aid=1370269&group_id=23067&atid=377408
|
||||||
|
Reference in New Issue
Block a user