]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-refbanner.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / admin / what-refbanner.php
index 33635e8eefc61e91bccfdeef8d397c197d37d9ec..8f23c36e460b6a00f25b6cad2305a5db50b25c00 100644 (file)
@@ -104,7 +104,7 @@ VALUES ('%s','%s','%s')",
 
        // Display message
        loadTemplate('admin_settings_saved', false, $content);
-} elseif ((countPostSelection() > 0) && (isFormSent('edit'))) {
+} elseif ((ifPostContainsSelections()) && (isFormSent('edit'))) {
        // Edit banner
        $OUT = '';
        foreach (postRequestParameter('sel') as $id => $sel) {
@@ -124,7 +124,7 @@ VALUES ('%s','%s','%s')",
        // Load main template
        loadTemplate('admin_refbanner_edit', false, $OUT);
 } else {
-       if ((countPostSelection() > 0) && (isFormSent('del'))) {
+       if ((ifPostContainsSelections()) && (isFormSent('del'))) {
                // Delete banner
                foreach (postRequestParameter('sel') as $id => $sel) {
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1",
@@ -136,7 +136,7 @@ VALUES ('%s','%s','%s')",
        $result = SQL_QUERY('SELECT `id`, `url`, `alternate`, `visible`, `counter`, `clicks` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `url` ASC', __FILE__, __LINE__);
 
        // Entries found?
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // Make referal banner editable and deletable
                $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {