]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_notifications.php
introduced isSqlResult() which encapsulates checking MySQL/i results
[mailer.git] / inc / modules / admin / what-list_notifications.php
index 05fad58a3e016bd2ce0ab2940b64ae679265b9b3..eb8b135e4875ea0752cb229836293af84171af78 100644 (file)
@@ -74,7 +74,9 @@ ORDER BY
 $add = ' LIMIT ' . (bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))) . ', ' . bigintval(getRequestElement('offset'));
 
 // Add limitation
-if (!empty($SQL2)) $SQL2 .= $add;
+if (!empty($SQL2)) {
+       $SQL2 .= $add;
+} // END - if
 
 if ((isExtensionActive('bonus')) && (!ifSqlHasZeroNumRows($result_max)) && (!empty($SQL2))) {
        // Run SQL query for notification mails
@@ -107,7 +109,7 @@ if ((isExtensionActive('bonus')) && (!ifSqlHasZeroNumRows($result_max)) && (!emp
                // Load main template
                loadTemplate('admin_list_notify_emails', FALSE, $content);
        }
-} elseif ((sqlNumRows($result_max) === 0) && (is_resource($result_max))) {
+} elseif ((sqlNumRows($result_max) === 0) && (isSqlResult($result_max))) {
        // No notifications found
        displayMessage('{--ADMIN_NO_NOTIFICATIONS--}');
 }