correctly reset config variables on changes in config.inc.php
This commit is contained in:
@@ -7,7 +7,9 @@ $Source$
|
|||||||
|
|
||||||
2005-12-05 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
2005-12-05 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* libraries/common.lib.php: added PMA_array_merge_recursive()
|
* libraries/common.lib.php: added PMA_array_merge_recursive()
|
||||||
* libraries/Config.class.php: make use of PMA_array_merge_recursive()
|
* libraries/Config.class.php:
|
||||||
|
- make use of PMA_array_merge_recursive()
|
||||||
|
- correctly reset config variables on changes in config.inc.php
|
||||||
* sql.php: hide edit/delete links for information_schema (bug #1373201)
|
* sql.php: hide edit/delete links for information_schema (bug #1373201)
|
||||||
|
|
||||||
2005-12-05 Michal Čihař <michal@cihar.com>
|
2005-12-05 Michal Čihař <michal@cihar.com>
|
||||||
|
@@ -62,7 +62,14 @@ class PMA_Config {
|
|||||||
// PMA_Config::load()
|
// PMA_Config::load()
|
||||||
$this->load( $source );
|
$this->load( $source );
|
||||||
|
|
||||||
// other settings, independant from config file, comes here
|
// other settings, independant from config file, comes in
|
||||||
|
$this->checkSystem();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sets system and application settings
|
||||||
|
*/
|
||||||
|
function checkSystem() {
|
||||||
$this->set( 'PMA_VERSION', '2.7.1-dev' );
|
$this->set( 'PMA_VERSION', '2.7.1-dev' );
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
@@ -83,6 +90,9 @@ class PMA_Config {
|
|||||||
$this->checkOutputCompression();
|
$this->checkOutputCompression();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wether to use gzip output compression or not
|
||||||
|
*/
|
||||||
function checkOutputCompression() {
|
function checkOutputCompression() {
|
||||||
// If zlib output compression is set in the php configuration file, no
|
// If zlib output compression is set in the php configuration file, no
|
||||||
// output buffering should be run
|
// output buffering should be run
|
||||||
@@ -226,6 +236,9 @@ class PMA_Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* detects PHP version
|
||||||
|
*/
|
||||||
function checkPhpVersion() {
|
function checkPhpVersion() {
|
||||||
$match = array();
|
$match = array();
|
||||||
if ( ! preg_match( '@([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2})@',
|
if ( ! preg_match( '@([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2})@',
|
||||||
@@ -248,10 +261,15 @@ class PMA_Config {
|
|||||||
$this->set( 'PMA_PHP_STR_VERSION', phpversion() );
|
$this->set( 'PMA_PHP_STR_VERSION', phpversion() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* re-init object after loadiong from session file
|
||||||
|
* checks config file for changes and relaods if neccessary
|
||||||
|
*/
|
||||||
function __wakeup() {
|
function __wakeup() {
|
||||||
if ( $this->source_mtime !== filemtime( $this->getSource() )
|
if ( $this->source_mtime !== filemtime( $this->getSource() )
|
||||||
|| $this->error_config_file || $this->error_config_default_file ) {
|
|| $this->error_config_file || $this->error_config_default_file ) {
|
||||||
$this->load( $this->getSource() );
|
$this->load( $this->getSource() );
|
||||||
|
$this->checkSystem();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->checkCollationConnection();
|
$this->checkCollationConnection();
|
||||||
@@ -296,6 +314,8 @@ class PMA_Config {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cfg = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the configuration file
|
* Parses the configuration file
|
||||||
*/
|
*/
|
||||||
@@ -364,6 +384,13 @@ class PMA_Config {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sets configuration variable
|
||||||
|
*
|
||||||
|
* @uses $this->settings
|
||||||
|
* @param string $setting configuration option
|
||||||
|
* @param string $value new value for configuration option
|
||||||
|
*/
|
||||||
function set( $setting, $value ) {
|
function set( $setting, $value ) {
|
||||||
$this->settings[$setting] = $value;
|
$this->settings[$setting] = $value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user