X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_emails.php;h=aaefc1227a408a5d72d5f8a354224bf71fd1df87;hb=61621983cc6d7195fcc7eab29b5f6080ff283b34;hp=830cb69c2f2b6df82f07288b7f951d8557510998;hpb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;p=mailer.git diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 830cb69c2f..aaefc1227a 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Check for mails -$result_main = SQL_QUERY("SELECT +$result_main = sqlQuery("SELECT `id`, `url`, `subject`, @@ -61,7 +61,7 @@ WHERE ORDER BY `timestamp` ASC", __FILE__, __LINE__); -if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { +if ((!ifSqlHasZeroNumRows($result_main)) || (isFormSent('lock'))) { if (isFormSent('accept')) { if (ifPostContainsSelections()) { // Accept mail orders @@ -73,7 +73,7 @@ if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { $content = getPoolDataFromId($id); // Found some data? - if (count($content) > 0) { + if (isFilledArray($content)) { // Is the surfbar installed? // @TODO Rewrite these if-blocks to a filter if ((isExtensionActive('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) { @@ -84,7 +84,7 @@ if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { // Check for bonus extension version >= 0.4.4 for the order bonus 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", + sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+{?bonus_order?} WHERE `userid`=%s LIMIT 1", array(bigintval($content['sender'])), __FILE__, __LINE__); // Subtract bonus points from system @@ -165,7 +165,7 @@ if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { } elseif ((!isFormSent('lock')) && (!isFormSent('accept')) && (!isFormSent('reject'))) { // Mail orders are in pool so we can display them $OUT = ''; - while ($content = SQL_FETCHARRAY($result_main)) { + while ($content = sqlFetchArray($result_main)) { // Prepare data for the template $content['timestamp'] = generateDateTime($content['timestamp'], 2); @@ -174,7 +174,7 @@ if ((!SQL_HASZERONUMS($result_main)) || (isFormSent('lock'))) { } // END - while // Free memory - SQL_FREERESULT($result_main); + sqlFreeResult($result_main); // Remember in array $content['rows'] = $OUT;