]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-unlock_emails.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / admin / what-unlock_emails.php
index a7c5a861dfcf2b47fd2c357f0bf29bbfb76b55ab..881f9c21c7aa8a7b2bf1b9f067f09d3205bb4db0 100644 (file)
@@ -55,9 +55,9 @@ WHERE
 ORDER BY
        `timestamp` ASC", __FILE__, __LINE__);
 
-if ((SQL_NUMROWS($result_main) > 0) || (isFormSent('lock'))) {
+if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) {
        if (isFormSent('accept')) {
-               if (countPostSelection() > 0) {
+               if (ifPostContainsSelections()) {
                        // Accept mail orders
                        foreach (postRequestParameter('sel') as $id => $value) {
                                // Secure id number
@@ -124,7 +124,7 @@ LIMIT 1",
                // Mails unlocked for mail delivery
                loadTemplate('admin_settings_saved', false, $message);
        } elseif (isPostRequestParameterSet(('reject'))) {
-               if (countPostSelection() > 0) {
+               if (ifPostContainsSelections()) {
                        // Reject mail orders
                        $OUT = '';
                        foreach (postRequestParameter('sel') as $id => $value) {
@@ -168,7 +168,7 @@ LIMIT 1",
                        // Nothing selected
                        loadTemplate('admin_settings_saved', false, '{--ADMIN_MAILS_NOTHING_CHECKED--}');
                }
-       } elseif ((isFormSent('lock')) && (countPostSelection() > 0) && (getConfig('url_blacklist') == 'Y')) {
+       } elseif ((isFormSent('lock')) && (ifPostContainsSelections()) && (getConfig('url_blacklist') == 'Y')) {
                // Lock URLs
                foreach (postRequestParameter('sel') as $id => $url) {
                        // Secure id number