<?php
/************************************************************************
- * MXChange v0.2.1 Start: 10/16/2008 *
+ * MXChange v0.2.1 Start: 10/12/2003 *
* =============== Last change: 10/16/2008 *
* *
* -------------------------------------------------------------------- *
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "516");
+define('CURR_SVN_REVISION', "517");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
// Default is deny
$ret = false;
- // Get admin's defult access right
- if (!empty($cacheArray['admins']['def_acl'][get_session('admin_login')])) {
- // Load from cache
- $default = $cacheArray['admins']['def_acl'][get_session('admin_login')];
-
- // Count cache hits
- if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
- } elseif (!is_object($cacheInstance)) {
- // Load from database
- $default = GET_ADMIN_DEFAULT_ACL(get_session('admin_login'));
- }
-
// Get admin's ID
$aid = GET_ADMIN_ID(get_session('admin_login'));
+ // Get admin's defult access right
+ $default = GET_ADMIN_DEFAULT_ACL($aid);
+
+
if (!empty($wht)) {
// Check for parent menu:
// First get it's action value
} // END - if
// Get default ACL from admin to check if we can allow him to change the default ACL
- $default = GET_ADMIN_DEFAULT_ACL(get_session('admin_login'));
+ $default = GET_ADMIN_DEFAULT_ACL(GET_ADMIN_ID(get_session('admin_login')));
// Update admin account
if ($default == "allow") {
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ADMINS_ENTRIES_DELETED);
} elseif (isset($_POST['add'])) {
// Check if everything is fine...
- $mode = GET_ADMIN_DEFAULT_ACL(GET_ADMIN_LOGIN(bigintval($_POST['admin_id'])));
+ $mode = GET_ADMIN_DEFAULT_ACL(bigintval($_POST['admin_id']));
// Default ACL is false
$ACL = false;
if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
} elseif (GET_EXT_VERSION("cache") != "0.1.8") {
// Check if current theme is already imported or not
- $result = SQL_QUERY_ESC("SELECT theme_name FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_name='Y' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT theme_name FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
array($name), __FILE__, __LINE__);
// Is the theme active and installed?