X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_admins.php;h=25b0fb39801dc74137698902a1698d3bd37c89ba;hp=f53b8c206a06a4eb96d9b5808112b0a4358a0eab;hb=30ae22f62ae87c53a56baf0d134569ba91011111;hpb=c72268213d4d4829d845d39c101bb08fbe4ed79a diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index f53b8c206a..25b0fb3980 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if ((isFormSent('edit')) && (countPostSelection() > 0)) { +if ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit ACLs $OUT = ''; foreach (postRequestParameter('sel') as $id => $selected) { @@ -78,7 +78,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) { // Load main template loadTemplate('admin_config_admins_edit', false, $OUT); -} elseif ((isFormSent('change')) && (countPostSelection() > 0)) { +} elseif ((isFormSent('change')) && (ifPostContainsSelections())) { // Change entries foreach (postRequestParameter('sel') as $id => $selected) { // Secure id @@ -102,7 +102,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) { // Entries changed loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ENTRIES_CHANGED--}'); -} elseif ((isFormSent('del')) && (countPostSelection() > 0)) { +} elseif ((isFormSent('del')) && (ifPostContainsSelections())) { // Delete ACLs $OUT = ''; foreach (postRequestParameter('sel') as $id => $selected) { @@ -121,7 +121,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) { // Load main template loadTemplate('admin_config_admins_del', false, $OUT); -} elseif ((isFormSent('remove')) && (countPostSelection() > 0)) { +} elseif ((isFormSent('remove')) && (ifPostContainsSelections())) { // Remove entries // @TODO Rewrite this to filter 'run_sqls' foreach (postRequestParameter('sel') as $id => $selected) { @@ -193,7 +193,7 @@ VALUES ('%s','%s','%s','%s')", $result_acls = SQL_QUERY('SELECT `id`, `admin_id`, `action_menu`, `what_menu`, `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` ORDER BY `admin_id` ASC, `id` ASC', __FILE__, __LINE__); // Entries found? - if (SQL_NUMROWS($result_acls) > 0) { + if (!SQL_HASZERONUMS($result_acls)) { // List ACLs $OUT = ''; while ($content = SQL_FETCHARRAY($result_acls)) {