X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_emails.php;h=7b23649d3e6c76572ced7451c7a758cbe7a00981;hb=0ddf8f6c578aa2c1ff1db9fb8eb0b93a1e247b73;hp=a7c5a861dfcf2b47fd2c357f0bf29bbfb76b55ab;hpb=ffe213c8e3f85119ddd5544214d0de9ecb833d98;p=mailer.git diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index a7c5a861df..7b23649d3e 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -14,8 +14,6 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009, 2010 by Mailer Developer Team * @@ -55,9 +53,9 @@ WHERE ORDER BY `timestamp` ASC", __FILE__, __LINE__); -if ((SQL_NUMROWS($result_main) > 0) || (isFormSent('lock'))) { +if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { if (isFormSent('accept')) { - if (countPostSelection() > 0) { + if (ifPostContainsSelections()) { // Accept mail orders foreach (postRequestParameter('sel') as $id => $value) { // Secure id number @@ -82,9 +80,6 @@ LIMIT 1", // Load data $content = SQL_FETCHARRAY($result); - // Free result - SQL_FREERESULT($result); - // Is the surfbar installed? // @TODO Rewrite these if-blocks to a filter if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) { @@ -93,7 +88,7 @@ LIMIT 1", } // END - if // Check for bonus extension version >= 0.4.4 for the order bonus - if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (ifBonusRallyeActive())) { + if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (isBonusRallyeActive())) { // Add points directly SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+{?bonus_order?} WHERE `userid`=%s LIMIT 1", array(bigintval($content['sender'])), __FILE__, __LINE__); @@ -112,6 +107,9 @@ LIMIT 1", SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='NEW' WHERE `id`=%s AND `data_type`='ADMIN' LIMIT 1", array($id), __FILE__, __LINE__); } // END - if + + // Free result + SQL_FREERESULT($result); } // END - foreach // Set message @@ -123,8 +121,8 @@ LIMIT 1", // Mails unlocked for mail delivery loadTemplate('admin_settings_saved', false, $message); - } elseif (isPostRequestParameterSet(('reject'))) { - if (countPostSelection() > 0) { + } elseif (isPostRequestParameterSet('reject')) { + if (ifPostContainsSelections()) { // Reject mail orders $OUT = ''; foreach (postRequestParameter('sel') as $id => $value) { @@ -168,7 +166,7 @@ LIMIT 1", // Nothing selected loadTemplate('admin_settings_saved', false, '{--ADMIN_MAILS_NOTHING_CHECKED--}'); } - } elseif ((isFormSent('lock')) && (countPostSelection() > 0) && (getConfig('url_blacklist') == 'Y')) { + } elseif ((isFormSent('lock')) && (ifPostContainsSelections()) && (isUrlBlaskEnabled())) { // Lock URLs foreach (postRequestParameter('sel') as $id => $url) { // Secure id number @@ -208,7 +206,7 @@ LIMIT 1", // Load main template loadTemplate('admin_unlock_emails', false, $content); - } elseif ((isFormSent('lock')) && (getConfig('url_blacklist') != 'Y')) { + } elseif ((isFormSent('lock')) && (!isUrlBlaskEnabled())) { // URL blacklist not activated loadTemplate('admin_settings_saved', false, '{--ADMIN_URL_BLACKLIST_DISABLED--}'); } else {