mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +02:00
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:
+16
-2
@@ -70,7 +70,17 @@ $header_msgs = array();
|
||||
$header_notes = array();
|
||||
$filter = array();
|
||||
|
||||
@include(PHPWG_ROOT_PATH .'local/config/database.inc.php');
|
||||
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.PWG_LOCAL_DIR .'config/database.inc.php');
|
||||
if (!defined('PHPWG_INSTALLED'))
|
||||
{
|
||||
header('Location: install.php');
|
||||
@@ -92,6 +102,10 @@ foreach( array(
|
||||
|
||||
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');
|
||||
}
|
||||
include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');
|
||||
|
||||
if(isset($conf['show_php_errors']) && !empty($conf['show_php_errors']))
|
||||
@@ -151,7 +165,7 @@ if ( is_admin() || (defined('IN_ADMIN') and IN_ADMIN) )
|
||||
load_language('admin.lang');
|
||||
}
|
||||
trigger_action('loading_lang');
|
||||
load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
|
||||
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
|
||||
|
||||
// only now we can set the localized username of the guest user (and not in
|
||||
// include/user.inc.php)
|
||||
|
||||
@@ -27,6 +27,7 @@ define('PHPWG_DEFAULT_LANGUAGE', 'en_UK');
|
||||
define('PHPWG_DEFAULT_TEMPLATE', 'Sylvia');
|
||||
|
||||
define('PHPWG_THEMES_PATH', $conf['themes_dir'].'/');
|
||||
define('PWG_COMBINED_DIR', PWG_LOCAL_DIR.'combined/');
|
||||
|
||||
// Required versions
|
||||
define('REQUIRED_PHP_VERSION', '5.0.0');
|
||||
|
||||
@@ -575,7 +575,7 @@ function redirect_html( $url , $msg = '', $refresh_time = 0)
|
||||
$user = build_user( $conf['guest_id'], true);
|
||||
load_language('common.lang');
|
||||
trigger_action('loading_lang');
|
||||
load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
|
||||
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
|
||||
$template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme());
|
||||
}
|
||||
elseif (defined('IN_ADMIN') and IN_ADMIN)
|
||||
|
||||
@@ -223,7 +223,7 @@ function switch_lang_to($language)
|
||||
// Translations are in admin file too
|
||||
load_language('admin.lang', '', array('language'=>$language) );
|
||||
trigger_action('loading_lang');
|
||||
load_language('lang', PHPWG_ROOT_PATH.'local/',
|
||||
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR,
|
||||
array('language'=>$language, 'no_fallback'=>true, 'local'=>true)
|
||||
);
|
||||
|
||||
|
||||
@@ -797,13 +797,13 @@ var s;';
|
||||
$css = array();
|
||||
foreach ($smarty->get_template_vars('themes') as $theme)
|
||||
{
|
||||
$f = 'local/css/'.$theme['id'].'-rules.css';
|
||||
$f = PWG_LOCAL_DIR.'css/'.$theme['id'].'-rules.css';
|
||||
if (file_exists(PHPWG_ROOT_PATH.$f))
|
||||
{
|
||||
array_push($css, "{combine_css path='$f' order=10}");
|
||||
}
|
||||
}
|
||||
$f = 'local/css/rules.css';
|
||||
$f = PWG_LOCAL_DIR.'css/rules.css';
|
||||
if (file_exists(PHPWG_ROOT_PATH.$f))
|
||||
{
|
||||
array_push($css, "{combine_css path='$f' order=10}");
|
||||
@@ -1133,7 +1133,7 @@ class ScriptLoader
|
||||
/*Allows merging of javascript and css files into a single one.*/
|
||||
final class FileCombiner
|
||||
{
|
||||
const OUT_SUB_DIR = 'local/combined/';
|
||||
const OUT_SUB_DIR = PWG_COMBINED_DIR;
|
||||
private $type; // js or css
|
||||
private $files = array();
|
||||
private $versions = array();
|
||||
|
||||
Reference in New Issue
Block a user