Provide way for vendors to easily change paths to config files.
This commit is contained in:
@@ -56,6 +56,7 @@ $Id$
|
|||||||
Martynas Mickevičius
|
Martynas Mickevičius
|
||||||
+ patch #2967320 [designer] Colored relations based on the primary key,
|
+ patch #2967320 [designer] Colored relations based on the primary key,
|
||||||
thanks to GreenRover - greenrover
|
thanks to GreenRover - greenrover
|
||||||
|
- [core] Provide way for vendors to easily change paths to config files.
|
||||||
|
|
||||||
3.3.2.0 (not yet released)
|
3.3.2.0 (not yet released)
|
||||||
- patch #2969449 [core] Name for MERGE engine varies depending on the
|
- patch #2969449 [core] Name for MERGE engine varies depending on the
|
||||||
|
@@ -199,8 +199,8 @@ if (top != self) {
|
|||||||
<body class="loginform">
|
<body class="loginform">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (file_exists('./config.header.inc.php')) {
|
if (file_exists(CUSTOM_HEADER_FILE)) {
|
||||||
require './config.header.inc.php';
|
require CUSTOM_HEADER_FILE;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -343,8 +343,8 @@ window.setTimeout('PMA_focusInput()', 500);
|
|||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
if (file_exists('./config.footer.inc.php')) {
|
if (file_exists(CUSTOM_FOOTER_FILE)) {
|
||||||
require './config.footer.inc.php';
|
require CUSTOM_FOOTER_FILE;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
@@ -682,7 +682,7 @@ function PMA_auth_fails()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (PMA_DBI_getError()) {
|
} elseif (PMA_DBI_getError()) {
|
||||||
$conn_error = '#' . $GLOBALS['errno'] . ' ' . $GLOBALS['strCannotLogin'];
|
$conn_error = '#' . $GLOBALS['errno'] . ' ' . $GLOBALS['strCannotLogin'];
|
||||||
} else {
|
} else {
|
||||||
$conn_error = $GLOBALS['strCannotLogin'];
|
$conn_error = $GLOBALS['strCannotLogin'];
|
||||||
}
|
}
|
||||||
|
@@ -55,8 +55,8 @@ function PMA_auth()
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
if (file_exists('./config.header.inc.php')) {
|
if (file_exists(CUSTOM_HEADER_FILE)) {
|
||||||
require './config.header.inc.php';
|
require CUSTOM_HEADER_FILE;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -69,8 +69,8 @@ function PMA_auth()
|
|||||||
<?php
|
<?php
|
||||||
PMA_Message::error('strWrongUser')->display();
|
PMA_Message::error('strWrongUser')->display();
|
||||||
|
|
||||||
if (file_exists('./config.footer.inc.php')) {
|
if (file_exists(CUSTOM_FOOTER_FILE)) {
|
||||||
require './config.footer.inc.php';
|
require CUSTOM_FOOTER_FILE;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@@ -288,7 +288,7 @@ if (! function_exists('preg_replace')) {
|
|||||||
* force reading of config file, because we removed sensitive values
|
* force reading of config file, because we removed sensitive values
|
||||||
* in the previous iteration
|
* in the previous iteration
|
||||||
*/
|
*/
|
||||||
$GLOBALS['PMA_Config'] = new PMA_Config('./config.inc.php');
|
$GLOBALS['PMA_Config'] = new PMA_Config(CONFIG_FILE);
|
||||||
|
|
||||||
if (!defined('PMA_MINIMUM_COMMON')) {
|
if (!defined('PMA_MINIMUM_COMMON')) {
|
||||||
$GLOBALS['PMA_Config']->checkPmaAbsoluteUri();
|
$GLOBALS['PMA_Config']->checkPmaAbsoluteUri();
|
||||||
@@ -589,7 +589,7 @@ require_once './libraries/select_lang.lib.php';
|
|||||||
if ($GLOBALS['PMA_Config']->error_config_file) {
|
if ($GLOBALS['PMA_Config']->error_config_file) {
|
||||||
$error = $strConfigFileError
|
$error = $strConfigFileError
|
||||||
. '<br /><br />'
|
. '<br /><br />'
|
||||||
. ($GLOBALS['PMA_Config']->getSource() == './config.inc.php' ?
|
. ($GLOBALS['PMA_Config']->getSource() == CONFIG_FILE ?
|
||||||
'<a href="show_config_errors.php"'
|
'<a href="show_config_errors.php"'
|
||||||
.' target="_blank">' . $GLOBALS['PMA_Config']->getSource() . '</a>'
|
.' target="_blank">' . $GLOBALS['PMA_Config']->getSource() . '</a>'
|
||||||
:
|
:
|
||||||
|
@@ -200,8 +200,8 @@ setURLHash("<?php echo PMA_generate_common_url($url_params, 'text', ''); ?>");
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Include possible custom footers
|
// Include possible custom footers
|
||||||
if (file_exists('./config.footer.inc.php')) {
|
if (file_exists(CUSTOM_FOOTER_FILE)) {
|
||||||
require './config.footer.inc.php';
|
require CUSTOM_FOOTER_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -47,8 +47,8 @@ if (empty($GLOBALS['is_header_sent'])) {
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Include possible custom headers
|
// Include possible custom headers
|
||||||
if (file_exists('./config.header.inc.php')) {
|
if (file_exists(CUSTOM_HEADER_FILE)) {
|
||||||
require './config.header.inc.php';
|
require CUSTOM_HEADER_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -34,4 +34,25 @@ define('SETUP_CONFIG_FILE', './config/config.inc.php');
|
|||||||
*/
|
*/
|
||||||
define('SETUP_DIR_WRITABLE', true);
|
define('SETUP_DIR_WRITABLE', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Directory where configuration files are stored.
|
||||||
|
* It is not used directly in code, just a convenient
|
||||||
|
* define used further in this file.
|
||||||
|
*/
|
||||||
|
define('CONFIG_DIR', './');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filename of a configuration file.
|
||||||
|
*/
|
||||||
|
define('CONFIG_FILE', CONFIG_DIR . 'config.inc.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filename of custom header file.
|
||||||
|
*/
|
||||||
|
define('CUSTOM_HEADER_FILE', CONFIG_DIR . 'config.header.inc.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filename of custom footer file.
|
||||||
|
*/
|
||||||
|
define('CUSTOM_FOOTER_FILE', CONFIG_DIR . 'config.footer.inc.php');
|
||||||
?>
|
?>
|
||||||
|
@@ -7,12 +7,14 @@
|
|||||||
* @package phpMyAdmin
|
* @package phpMyAdmin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require './libraries/vendor_config.php';
|
||||||
|
|
||||||
echo "Starting to parse config file...\n";
|
echo "Starting to parse config file...\n";
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
/**
|
/**
|
||||||
* Read config file.
|
* Read config file.
|
||||||
*/
|
*/
|
||||||
require './config.inc.php';
|
require CONFIG_FILE;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user