feature 2112 added: ability to set an additional local directory

$conf['local_dir_site'] in local/config/multisite.inc.php


git-svn-id: http://piwigo.org/svn/trunk@8722 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2011-01-17 18:48:13 +00:00
parent 91fc33dc8e
commit 8ccd3a203d
11 changed files with 76 additions and 18 deletions
+15 -1
View File
@@ -114,8 +114,22 @@ else
$prefixeTable = DEFAULT_PREFIX_TABLE;
}
if (is_file(PHPWG_ROOT_PATH .'local/config/multisite.inc.php'))
{
include(PHPWG_ROOT_PATH .'local/config/multisite.inc.php');
define('PWG_LOCAL_DIR', $conf['local_dir_site']);
}
else
{
define('PWG_LOCAL_DIR', 'local/');
}
include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
if (isset($conf['local_dir_site']))
{
@include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/config.inc.php');
}
// download database config file if exists
if (!empty($_GET['dl']) && file_exists($conf['local_data_dir'].'/pwg_'.$_GET['dl']))
@@ -152,7 +166,7 @@ if (isset($_POST['install']))
$infos = array();
$errors = array();
$config_file = PHPWG_ROOT_PATH . 'local/config/database.inc.php';
$config_file = PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php';
if (@file_exists($config_file))
{
include($config_file);