Index: /trunk/include/common.inc.php
===================================================================
--- /trunk/include/common.inc.php	(revision 12767)
+++ /trunk/include/common.inc.php	(revision 12768)
@@ -74,21 +74,4 @@
 $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
@@ -106,19 +89,13 @@
 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');
-}
-
-// 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']))
-{
-  $conf['order_by_inside_category_custom'] = $conf['order_by_inside_category'];
-}
-
+defined('PWG_LOCAL_DIR') or 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;
+}
 include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');
 
Index: /trunk/include/config_default.inc.php
===================================================================
--- /trunk/include/config_default.inc.php	(revision 12767)
+++ /trunk/include/config_default.inc.php	(revision 12768)
@@ -503,5 +503,5 @@
 // All informations contained in these tables and column are related to
 // piwigo_users table.
-$conf['users_table'] = $prefixeTable.'users';
+$conf['users_table'] = null;
 
 // If you decide to use external authentication
Index: /trunk/include/constants.php
===================================================================
--- /trunk/include/constants.php	(revision 12767)
+++ /trunk/include/constants.php	(revision 12768)
@@ -74,5 +74,5 @@
   define('USER_GROUP_TABLE', $prefixeTable.'user_group');
 if (!defined('USERS_TABLE'))
-  define('USERS_TABLE', $conf['users_table']);
+  define('USERS_TABLE', isset($conf['users_table']) ? $conf['users_table'] : $prefixeTable.'users' );
 if (!defined('USER_INFOS_TABLE'))
   define('USER_INFOS_TABLE', $prefixeTable.'user_infos');
Index: /trunk/upgrade.php
===================================================================
--- /trunk/upgrade.php	(revision 12767)
+++ /trunk/upgrade.php	(revision 12768)
@@ -25,13 +25,7 @@
 
 // load config file
-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');
+defined('PWG_LOCAL_DIR') or define('PWG_LOCAL_DIR', 'local/');
 
 $config_file = PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'config/database.inc.php';
@@ -48,10 +42,4 @@
 
 include($config_file);
-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');
-}
 
 // $conf is not used for users tables - define cannot be re-defined
Index: /trunk/upgrade_feed.php
===================================================================
--- /trunk/upgrade_feed.php	(revision 12767)
+++ /trunk/upgrade_feed.php	(revision 12768)
@@ -30,26 +30,15 @@
 define('PHPWG_ROOT_PATH', './');
 
+include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
+@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
+defined('PWG_LOCAL_DIR') or define('PWG_LOCAL_DIR', 'local/');
+
+include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR .'config/database.inc.php');
+include(PHPWG_ROOT_PATH .'include/dblayer/functions_'.$conf['dblayer'].'.inc.php');
+
 include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
 include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.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');
-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');
 
 // +-----------------------------------------------------------------------+
