]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_admins.php
Rewritten to use isExtensionInstalledAndNewer() to save some calls/bugfix
[mailer.git] / inc / modules / admin / what-config_admins.php
index 0391c25e6a24bac4bcc11923a3ae187e1a29e0b0..97834713aeed8cd0b2dca186ad2742f7a9e843ba 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -163,7 +164,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) {
        $ACL = false;
        if (isPostRequestParameterSet('what_menu')) {
                // Check parent ACL
-               $ACL = adminsCheckAdminAcl(getModeAction('admin', postRequestParameter('what_menu')), '');
+               $ACL = adminsCheckAdminAcl(getActionFromModuleWhat('admin', postRequestParameter('what_menu')), '');
        } // END - if
 
        if (($mode != postRequestParameter('mode')) || ($ACL)) {
@@ -173,7 +174,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) {
                        // Main or sub menu selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1",
                                array(bigintval(postRequestParameter('admin_id')), postRequestParameter('action_menu'), postRequestParameter('what_menu')), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == '0') {
+                       if (SQL_HASZERONUMS($result)) {
                                // Finally add the new ACL
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_acls` (admin_id, action_menu, what_menu, access_mode)
 VALUES ('%s','%s','%s','%s')",