]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/yoomedia_functions.php
New naming convention applied to many functions, see #118 for details
[mailer.git] / inc / libs / yoomedia_functions.php
index 09f057640498342a7889c7524d32aafd98fdabc4..25f3dd9dbb0ffe9bd1b80679e9109aaaf10ee7cf 100644 (file)
@@ -98,12 +98,12 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) {
                );
 
                // Run the query
-               $response = GET_URL($requestString);
+               $response = sendGetRequest($requestString);
 
                // Shall we count the query as used?
                if ($countQuery) {
                        // Then update the config!
-                       UPDATE_CONFIG("yoomedia_requests_remain", 1, "-");
+                       updateConfiguration('yoomedia_requests_remain', 1, '-');
                } // END - if
        } // END - if
 
@@ -155,7 +155,7 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) {
        $cnt = 0; $entry = 0;
        foreach ($dataArray as $line) {
                // Add the line
-               $result[$entry][YOOMEDIA_TRANSLATE_INDEX($type, $cnt)] = $line;
+               $result[$entry][yoomediaTranslateIndex($type, $cnt)] = $line;
 
                // End of data of first entry reached?
                if ($cnt == 6) {
@@ -196,10 +196,10 @@ function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) {
        $data['sid'] = getConfig('yoomedia_sid');
 
        // Add total receivers
-       $data['all'] = TRANSLATE_COMMA(GET_TOTAL_RECEIVERS());
+       $data['all'] = translateComma(getTotalReceivers());
 
        // Add categories
-       $data['categories'] = ADD_CATEGORY_OPTIONS('normal');
+       $data['categories'] = generateCategoryOptionsList('normal');
 
        // Load template
        LOAD_TEMPLATE("admin_send_yoomedia", false, $data);
@@ -234,7 +234,7 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) {
        YOOMEDIA_RELOAD_LOCK($data, $mode);
 
        // Call the lower function
-       ADD_NEW_BONUS_MAIL($data, $mode);
+       addNewBonusMail($data, $mode);
 }
 
 // Lockdown given id
@@ -261,7 +261,7 @@ function YOOMEDIA_UNLIST_MAIL ($data, $mode) {
 }
 
 // "Translates" the index number into an assosiative value
-function YOOMEDIA_TRANSLATE_INDEX ($type, $index) {
+function yoomediaTranslateIndex ($type, $index) {
        // Default is the index
        $return = $index;
 
@@ -279,7 +279,7 @@ function YOOMEDIA_TRANSLATE_INDEX ($type, $index) {
 }
 
 // "Translate" error code
-function YOOMEDIA_TRANSLATE_ERROR ($errorCode) {
+function yoomediaTranslateError ($errorCode) {
        // Default is "failed"
        $return = "failed";
 
@@ -313,7 +313,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
                // Are we ready to sent again?
                if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
                        // Remove entry
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE id=%s LIMIT 1",
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `id`=%s LIMIT 1",
                                array($id), __FUNCTION__, __LINE__);
                } else {
                        // Dont' sent again this mail