Better support for vendor customisation (based on what Debian needs)
This commit is contained in:
@@ -6,6 +6,7 @@ $Id$
|
|||||||
$HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $
|
$HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $
|
||||||
|
|
||||||
3.2.0.0 (not yet released)
|
3.2.0.0 (not yet released)
|
||||||
|
- [core] better support for vendor customisation (based on what Debian needs)
|
||||||
|
|
||||||
3.1.1.0 (not yet released)
|
3.1.1.0 (not yet released)
|
||||||
- patch #2242765 [core] Navi panel server links wrong,
|
- patch #2242765 [core] Navi panel server links wrong,
|
||||||
|
@@ -8,14 +8,12 @@ redistribute phpMyAdmin inside other software package such as Linux
|
|||||||
distribution or some all in one package including web server and MySQL
|
distribution or some all in one package including web server and MySQL
|
||||||
server.
|
server.
|
||||||
|
|
||||||
|
Generally you can customize some basic aspects (paths to some files and
|
||||||
|
behavior) in libraries/vendor_config.php.
|
||||||
|
|
||||||
Setup script
|
For example if you want setup script to generate config file in var,
|
||||||
------------
|
change SETUP_CONFIG_FILE to /var/lib/phpmyadmin/config.inc.php and you
|
||||||
|
will also probably want to skip directory writable check, so set
|
||||||
If you want to integrate setup script to your packaging, you might want
|
SETUP_DIR_WRITABLE to false.
|
||||||
to change $cfg_db['_config_file_path'] in setup/lib/config_info.inc.php
|
|
||||||
to point to place where you want to generated config file to be saved.
|
|
||||||
Please note that directory and the file has to be writable for web
|
|
||||||
server user.
|
|
||||||
|
|
||||||
# vim: et ts=4 sw=4 sts=4 tw=72 spell spelllang=en_us
|
# vim: et ts=4 sw=4 sts=4 tw=72 spell spelllang=en_us
|
||||||
|
@@ -7,10 +7,27 @@
|
|||||||
* @package phpMyAdmin
|
* @package phpMyAdmin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load paths.
|
||||||
|
*/
|
||||||
|
require('./libraries/vendor_config.php');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read changelog.
|
||||||
|
*/
|
||||||
|
if (substr(CHANGELOG_FILE, -3) == '.gz') {
|
||||||
|
ob_start();
|
||||||
|
readgzfile(CHANGELOG_FILE);
|
||||||
|
$changelog = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
} else {
|
||||||
|
$changelog = file_get_contents(CHANGELOG_FILE);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whole changelog in variable.
|
* Whole changelog in variable.
|
||||||
*/
|
*/
|
||||||
$changelog = htmlspecialchars(file_get_contents('ChangeLog'));
|
$changelog = htmlspecialchars($changelog);
|
||||||
|
|
||||||
$replaces = array(
|
$replaces = array(
|
||||||
'@(http://[./a-zA-Z0-9.-]*[/a-zA-Z0-9])@'
|
'@(http://[./a-zA-Z0-9.-]*[/a-zA-Z0-9])@'
|
||||||
|
@@ -7,6 +7,11 @@
|
|||||||
* @package phpMyAdmin
|
* @package phpMyAdmin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load vendor configuration.
|
||||||
|
*/
|
||||||
|
require_once('./libraries/vendor_config.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration class
|
* Configuration class
|
||||||
*
|
*
|
||||||
@@ -300,7 +305,8 @@ class PMA_Config
|
|||||||
*/
|
*/
|
||||||
function __wakeup()
|
function __wakeup()
|
||||||
{
|
{
|
||||||
if (! $this->checkConfigSource()
|
if (SKIP_MTIME_CONFIG_CHECK
|
||||||
|
|| ! $this->checkConfigSource()
|
||||||
|| $this->source_mtime !== filemtime($this->getSource())
|
|| $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_file
|
||||||
|
@@ -10,9 +10,14 @@
|
|||||||
* @package phpMyAdmin
|
* @package phpMyAdmin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load paths.
|
||||||
|
*/
|
||||||
|
require('./libraries/vendor_config.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
header('Content-type: text/plain; charset=iso-8859-1');
|
header('Content-type: text/plain; charset=iso-8859-1');
|
||||||
readfile('LICENSE');
|
readfile(LICENSE_FILE);
|
||||||
?>
|
?>
|
||||||
|
@@ -12,10 +12,19 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (!defined('PHPMYADMIN')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load paths.
|
||||||
|
*/
|
||||||
|
require_once('./libraries/vendor_config.php');
|
||||||
|
|
||||||
$cfg_db = array();
|
$cfg_db = array();
|
||||||
|
|
||||||
// path to config file, relative to phpMyAdmin's root path
|
// path to config file, relative to phpMyAdmin's root path
|
||||||
$cfg_db['_config_file_path'] = './config/config.inc.php';
|
$cfg_db['_config_file_path'] = SETUP_CONFIG_FILE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Value meaning:
|
* Value meaning:
|
||||||
|
@@ -12,6 +12,15 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (!defined('PHPMYADMIN')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load vendor config.
|
||||||
|
*/
|
||||||
|
require_once('./libraries/vendor_config.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes message list
|
* Initializes message list
|
||||||
*/
|
*/
|
||||||
@@ -223,7 +232,10 @@ function check_config_rw(&$is_readable, &$is_writable, &$file_exists)
|
|||||||
$file_path = ConfigFile::getInstance()->getFilePath();
|
$file_path = ConfigFile::getInstance()->getFilePath();
|
||||||
$file_dir = dirname($file_path);
|
$file_dir = dirname($file_path);
|
||||||
$is_readable = true;
|
$is_readable = true;
|
||||||
$is_writable = is_dir($file_dir) && is_writable($file_dir);
|
$is_writable = is_dir($file_dir);
|
||||||
|
if (SETUP_DIR_WRITABLE) {
|
||||||
|
$is_writable = $is_writable && is_writable($file_dir);
|
||||||
|
}
|
||||||
$file_exists = file_exists($file_path);
|
$file_exists = file_exists($file_path);
|
||||||
if ($file_exists) {
|
if ($file_exists) {
|
||||||
$is_readable = is_readable($file_path);
|
$is_readable = is_readable($file_path);
|
||||||
|
Reference in New Issue
Block a user