X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-refbanner.php;h=dae9146b221e9c8f382594b5edeba05ab567c728;hb=22ba0c36c75ff989a6f48197c5a71524fb891b87;hp=7cbaf8b46e41dcb15ad6f95b1a52e7980ac8b22f;hpb=09f5758c42a33a56bdd461c946ffe759a59c54aa;p=mailer.git diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 7cbaf8b46e..dae9146b22 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -59,7 +59,7 @@ if (isFormSent()) { // Check if banner is already added $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1", array(postRequestParameter('url')), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Add banner SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (url, alternate, visible) VALUES ('%s','%s','%s')", @@ -98,7 +98,7 @@ VALUES ('%s','%s','%s')", // Display message loadTemplate('admin_settings_saved', false, $content); -} elseif ((countPostSelection() > 0) && (isPostRequestParameterSet('edit'))) { +} elseif ((countPostSelection() > 0) && (isFormSent('edit'))) { // Edit banner $SW = 2; $OUT = ''; foreach (postRequestParameter('sel') as $id => $sel) { @@ -125,7 +125,7 @@ VALUES ('%s','%s','%s')", // Load main template loadTemplate('admin_refbanner_edit', false, $OUT); } else { - if ((countPostSelection() > 0) && (isPostRequestParameterSet('del'))) { + if ((countPostSelection() > 0) && (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",