]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rallye_functions.php
Continued:
[mailer.git] / inc / libs / rallye_functions.php
index 5aa2cdb91fa3294872712c707269f852d4ffd4bf..8a6ef504c3104fe78b8af54a63db7ab0bc107c8b 100644 (file)
@@ -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 *
@@ -92,7 +92,7 @@ LIMIT 1",
                        array(bigintval($content['id']), bigintval($content['userid'])), __FUNCTION__, __LINE__);
 
                // Is there an entry?
-               if (ifSqlHasZeroNums($result_ref)) {
+               if (ifSqlHasZeroNumRows($result_ref)) {
                        // Add userid and his ref count to table
                        $result_ref = sqlQueryEscaped("SELECT
        SUM(`p`.`points`) AS `points`
@@ -192,7 +192,7 @@ ORDER BY
                array($rallye), __FUNCTION__, __LINE__);
 
        // Entries found?
-       if (!ifSqlHasZeroNums($result_prices)) {
+       if (!ifSqlHasZeroNumRows($result_prices)) {
                // Load prices
                $prices = '';
                if ($mode == PHP_EOL) {
@@ -260,9 +260,9 @@ ORDER BY
 
        // Load users
        $content = array(
-               'userid'  => array(),
-               'ref'     => array(),
-               'cpoints' => array()
+               'userid'  => [],
+               'ref'     => [],
+               'cpoints' => []
        );
 
        // Load all users
@@ -373,7 +373,7 @@ function sendRallyeNotification ($userid, $content) {
 }
 
 // Run this function only when a new member has confirmed his email address!
-function addUserToReferralRallye ($userid, $content = array()) {
+function addUserToReferralRallye ($userid, $content = []) {
        $add = '';
 
        // Updated extension?
@@ -429,7 +429,7 @@ LIMIT 1",
                        ), __FUNCTION__, __LINE__);
 
                // Is this user added?
-               if (ifSqlHasZeroNums($result)) {
+               if (ifSqlHasZeroNumRows($result)) {
                        // Add userid and his ref count to table
                        sqlQueryEscaped("INSERT INTO
        `{?_MYSQL_PREFIX?}_rallye_users`
@@ -490,7 +490,7 @@ function stopRallyeByResult ($result) {
 
        // Init array
        $count = '0';
-       $users = array();
+       $users = [];
        $content['start_time'] = generateDateTime($content['start_time'], 1);
        $content['end_time']   = generateDateTime($content['end_time']  , 1);
        $content['now_time']   = generateDateTime(time(), 1);
@@ -643,9 +643,9 @@ LIMIT %s",
 function getArrayFromReferralRallyePrices ($rallye) {
        // Init multi array
        $prices = array(
-               'level'  => array(),
-               'points' => array(),
-               'info'   => array()
+               'level'  => [],
+               'points' => [],
+               'info'   => []
        );
 
        // Load prices
@@ -684,9 +684,9 @@ function getArrayFromReferralRallyeUsers ($rallye) {
 
        // Init multi array
        $users = array(
-               'userid'  => array(),
-               'ref'     => array(),
-               'cpoints' => array(),
+               'userid'  => [],
+               'ref'     => [],
+               'cpoints' => [],
        );
 
        /*
@@ -848,7 +848,7 @@ WHERE
        `expired`='Y'",
                array($EXPIRE), __FUNCTION__, __LINE__);
 
-       if (!ifSqlHasZeroNums($result_rallye)) {
+       if (!ifSqlHasZeroNumRows($result_rallye)) {
                // Init SQLs
                initSqls();
 
@@ -886,13 +886,13 @@ WHERE
 function addReferralRallyeTemplateSelection ($name = 'template', $default = '') {
        // Init variables
        $OUT = '';
-       $ral = array();
+       $ral = [];
 
        // Check templates directory
        $basePath = sprintf('templates/%s/html/rallye/', getLanguage());
 
        // Read the directory
-       $templates = getArrayFromDirectory($basePath, 'rallye_', FALSE, TRUE, array(), '.tpl');
+       $templates = getArrayFromDirectory($basePath, 'rallye_', FALSE, TRUE, [], '.tpl');
 
        // And walk through
        foreach ($templates as $read) {