Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / modules / admin / what-unlock_emails.php
index 830cb69c2f2b6df82f07288b7f951d8557510998..4fbd9eeebec660c873bccac6b904e7bb0e67585e 100644 (file)
@@ -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 ((!ifSqlHasZeroNums($result_main)) || (isFormSent('lock'))) {
        if (isFormSent('accept')) {
                if (ifPostContainsSelections()) {
                        // Accept mail orders
@@ -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;