]> git.mxchange.org Git - mailer.git/commitdiff
More fixes for admin functions, thanks to Piter01
authorRoland Häder <roland@mxchange.org>
Mon, 20 Oct 2008 13:15:33 +0000 (13:15 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 20 Oct 2008 13:15:33 +0000 (13:15 +0000)
img.php
inc/databases.php
inc/libs/admins_functions.php
inc/modules/admin/what-config_admins.php
inc/theme-manager.php

diff --git a/img.php b/img.php
index 64919e4066fdf9b9650dd4e2dec2913b75b25dcb..54b2173947309fed0661fb14402f9322744b783f 100644 (file)
--- a/img.php
+++ b/img.php
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/16/2008 *
+ * MXChange v0.2.1                                    Start: 10/12/2003 *
  * ===============                              Last change: 10/16/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
index 651bb4fff40039ae0c47b3b9d3c5fa0cda129aba..e6ac4fb78ce052a61d26706d0955e43ea2a1414a 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 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);
index 550b8a69bc539399caf339908aafe5b8a0092070..c5d0db38d4de683a8a5c81a07980cefda2332cad 100644 (file)
@@ -47,21 +47,13 @@ function ADMINS_CHECK_ACL($act, $wht) {
        // 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
@@ -212,7 +204,7 @@ function ADMINS_CHANGE_ADMIN_ACCOUNT($POST) {
                        } // 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") {
index d88a2821f1dddc73c4dc557cbf241e65207628bd..c531b3b30f38253689b33baaa3e071c77eac4638 100644 (file)
@@ -161,7 +161,7 @@ if ((isset($_POST['edit'])) && ($SEL > 0)) {
        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;
index 2ba2d28b774bd4dc01662d21847721661fb3fa47..44b82d17ddaae68eac654c5f3efdb598ce073d55 100644 (file)
@@ -253,7 +253,7 @@ function GET_CURR_THEME_NAME () {
                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?