$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
// 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--}');
}