diff options
Diffstat (limited to '')
-rw-r--r-- | include/common.inc.php | 12 | ||||
-rw-r--r-- | include/constants.php | 8 | ||||
-rw-r--r-- | include/functions_user.inc.php | 15 |
3 files changed, 5 insertions, 30 deletions
diff --git a/include/common.inc.php b/include/common.inc.php index 0b1a2b581..d31aefbb6 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -143,21 +143,15 @@ if (is_a_guest()) } // template instance -if - ( - defined('IN_ADMIN') and IN_ADMIN - ) -{ - // Admin template - //$template = new Template(PHPWG_ROOT_PATH.'template/'.$user['admin_template'], $user['admin_theme'] ); +if ( defined('IN_ADMIN') and IN_ADMIN ) +{// Admin template list($user['admin_template'], $user['admin_theme']) = explode ('/', $conf['admin_layout']); $template = new Template(PHPWG_ROOT_PATH.'admin/template/' . $user['admin_template'], $user['admin_theme'] ); } else -{ - // Classic template +{ // Classic template $template = new Template(PHPWG_ROOT_PATH.'template/' . $user['template'], $user['theme'] ); } diff --git a/include/constants.php b/include/constants.php index dbed84511..88c00b6c5 100644 --- a/include/constants.php +++ b/include/constants.php @@ -33,12 +33,6 @@ define('PHPWG_DEFAULT_TEMPLATE', 'yoga/Sylvia'); define('REQUIRED_PHP_VERSION', '5.0.0'); define('REQUIRED_MYSQL_VERSION', '4.1.22'); -// Error codes -define('GENERAL_MESSAGE', 200); -define('GENERAL_ERROR', 202); -define('CRITICAL_MESSAGE', 203); -define('CRITICAL_ERROR', 204); - // Access codes define('ACCESS_FREE', 0); define('ACCESS_GUEST', 1); @@ -107,4 +101,4 @@ if (!defined('PLUGINS_TABLE')) if (!defined('OLD_PERMALINKS_TABLE')) define('OLD_PERMALINKS_TABLE', $prefixeTable.'old_permalinks'); -?> +?>
\ No newline at end of file diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 074a8aae9..7681e49cd 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -211,12 +211,6 @@ function build_user( $user_id, $use_cache ) // calculation of the number of picture to display per page $user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page']; - if (is_admin($user['status'])) - { - list($user['admin_template'], $user['admin_theme']) = - explode ('/', $conf['admin_layout']); - } - list($user['template'], $user['theme']) = explode('/', $user['template']); return $user; @@ -1373,14 +1367,7 @@ function get_sql_condition_FandF( } else { - if ($force_one_condition) - { - $sql = '1 = 1'; - } - else - { - $sql = ''; - } + $sql = $force_one_condition ? '1 = 1' : ''; } if (isset($prefix_condition) and !empty($sql)) |