Don't include the "real" config file if a developer edition exists.
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-07-18 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
|
* libraries/common.lib.php3, libraries/select_lang.lib.php3: Don't include
|
||||||
|
the "real" config file if a developer edition exists.
|
||||||
|
|
||||||
2002-07-18 Marc Delisle <lem9@users.sourceforge.net>
|
2002-07-18 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/display_tbl.lib.php3: bug 579785, Edit links URLs too long
|
* libraries/display_tbl.lib.php3: bug 579785, Edit links URLs too long
|
||||||
for some browsers
|
for some browsers
|
||||||
|
@@ -67,12 +67,21 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
|
|||||||
$pos = 0;
|
$pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detects the config file we want to load
|
||||||
|
*/
|
||||||
|
if (file_exists('./config.inc.developer.php3')) {
|
||||||
|
$cfgfile_to_load = './config.inc.developer.php3';
|
||||||
|
} else {
|
||||||
|
$cfgfile_to_load = './config.inc.php3';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the configuration file and gets some constants used to define
|
* Parses the configuration file and gets some constants used to define
|
||||||
* versions of phpMyAdmin/php/mysql...
|
* versions of phpMyAdmin/php/mysql...
|
||||||
*/
|
*/
|
||||||
$old_error_reporting = error_reporting(0);
|
$old_error_reporting = error_reporting(0);
|
||||||
if (!include('./config.inc.php3')) {
|
if (!include($cfgfile_to_load)) {
|
||||||
// Creates fake settings
|
// Creates fake settings
|
||||||
$cfg = array('DefaultLang' => 'en');
|
$cfg = array('DefaultLang' => 'en');
|
||||||
// Loads the laguage file
|
// Loads the laguage file
|
||||||
@@ -111,14 +120,21 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
}
|
}
|
||||||
error_reporting($old_error_reporting);
|
error_reporting($old_error_reporting);
|
||||||
unset($old_error_reporting);
|
unset($old_error_reporting);
|
||||||
|
unset($cfgfile_to_load);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads in the developer edition config file. This is used exclusively during
|
* Includes compatibility code for older config.inc.php3 revisions
|
||||||
* the development cycle of PMA, to prevent the accident of the developers ever
|
* if necessary
|
||||||
* submitting their config.inc.php3 file.
|
|
||||||
*/
|
*/
|
||||||
if (file_exists('./config.inc.developer.php3')) {
|
if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 120) {
|
||||||
include('./config.inc.developer.php3');
|
require('./libraries/config_import.lib.php3');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Includes the language file if it hasn't been included yet
|
||||||
|
*/
|
||||||
|
if (!defined('PMA_SELECT_LANG_LIB_INCLUDED')){
|
||||||
|
require('./libraries/select_lang.lib.php3');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -148,11 +164,6 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
include('./libraries/defines.lib.php3');
|
include('./libraries/defines.lib.php3');
|
||||||
|
|
||||||
|
|
||||||
// For compatibility with old config.inc.php3
|
|
||||||
if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 120) {
|
|
||||||
include('./libraries/config_import.lib.php3');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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
|
||||||
if (PMA_PHP_INT_VERSION < 40000
|
if (PMA_PHP_INT_VERSION < 40000
|
||||||
|
@@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!defined('PMA_SELECT_LANG_LIB_INCLUDED')){
|
||||||
|
define('PMA_SELECT_LANG_LIB_INCLUDED', 1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the path to the translations directory and get some variables
|
* Define the path to the translations directory and get some variables
|
||||||
* from system arrays if 'register_globals' is set to 'off'
|
* from system arrays if 'register_globals' is set to 'off'
|
||||||
@@ -271,6 +274,5 @@ if (!isset($convcharset) || empty($convcharset)) {
|
|||||||
$lang_file = $lang_path . $available_languages[$lang][1] . '.inc.php3';
|
$lang_file = $lang_path . $available_languages[$lang][1] . '.inc.php3';
|
||||||
require('./' . $lang_file);
|
require('./' . $lang_file);
|
||||||
|
|
||||||
|
} // $__PMA_SELECT_LANG_LIB__
|
||||||
// $__PMA_SELECT_LANG_LIB__
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user