aboutsummaryrefslogtreecommitdiffstats
path: root/include/common.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-12-19 20:25:42 +0000
committerrvelices <rv-github@modusoptimus.com>2011-12-19 20:25:42 +0000
commitd70a18d52144b55949151cc3b9ccc99c3bac48a3 (patch)
tree3b444695dd58ff4b5b944b83ddcdb5f30cce589a /include/common.inc.php
parent4bbd5f66492997cc49276034949a5f984ef6351d (diff)
simplification of 'startup phase' - multisite.inc.php is not required anymore / database.inc.php is included after config.
git-svn-id: http://piwigo.org/svn/trunk@12768 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/common.inc.php')
-rw-r--r--include/common.inc.php35
1 files changed, 6 insertions, 29 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index d4e8984e8..724fc83d3 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -73,23 +73,6 @@ $header_msgs = array();
$header_notes = array();
$filter = array();
-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');
- exit;
-}
-
foreach( array(
'array_intersect_key', //PHP 5 >= 5.1.0RC1
'hash_hmac', //(hash) - enabled by default as of PHP 5.1.2
@@ -105,21 +88,15 @@ 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');
-}
+defined('PWG_LOCAL_DIR') or define('PWG_LOCAL_DIR', 'local/');
-// that's for migration from 2.2, will be deprecated in 2.4
-if (isset($conf['order_by']))
-{
- $conf['order_by_custom'] = $conf['order_by'];
-}
-if (isset($conf['order_by_inside_category']))
+
+@include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php');
+if (!defined('PHPWG_INSTALLED'))
{
- $conf['order_by_inside_category_custom'] = $conf['order_by_inside_category'];
+ header('Location: install.php');
+ exit;
}
-
include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');
if(isset($conf['show_php_errors']) && !empty($conf['show_php_errors']))