]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-refbanner.php
New wrapper function introduced, more EL rewrites:
[mailer.git] / inc / modules / admin / what-refbanner.php
index 33635e8eefc61e91bccfdeef8d397c197d37d9ec..5d4b6a961af4636d4eca6abae84c6d45322c60b3 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) {
@@ -115,7 +115,7 @@ VALUES ('%s','%s','%s')",
                SQL_FREERESULT($result);
 
                // Preapre data for the row
-               $content['visible'] => addSelectionBox('yn', $content['visible'], 'visible');
+               $content['visible'] = addSelectionBox('yn', $content['visible'], 'visible');
 
                // Load row template and switch color
                $OUT .= loadTemplate('admin_refbanner_edit_row', true, $content);
@@ -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)) {