]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rallye_functions.php
Cache file does no longer output fatal messages when it can't find file for deletion
[mailer.git] / inc / libs / rallye_functions.php
index 9e096a317e5d761be0a2ac3de513272a537c1592..c313fa7389e2e3e40b4285d7032054eb35fe8c0a 100644 (file)
@@ -42,7 +42,7 @@ function RALLYE_AUTOSTART_RALLYES($result)
 {
        // Global data array for LOAD_EMAIL_TEMPLATE()
        $DATA = array();
-       global $DATA, $_CONFIG;
+       global $DATA;
 
        // Load all rallyes (usally we have only one rallye active per time!
        list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
@@ -184,8 +184,6 @@ function RALLYE_ADD_PRICES($rallye,$mode="email")
 //
 function RALLYE_ADD_TOPUSERS($rallye,$default=0)
 {
-       global $_CONFIG;
-
        // First check how many prices are set
        $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%s ORDER BY price_level",
         array(bigintval($rallye)), __FILE__, __LINE__);
@@ -348,7 +346,7 @@ VALUES ('%s','%s','0')",
 //
 function RALLYE_EXPIRE_RALLYES($result)
 {
-       global $DATA, $_CONFIG;
+       global $DATA;
 
        // Load rallye data
        list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
@@ -650,7 +648,7 @@ function RALLYE_LIST_WINNERS($rallye,$default=0)
 //
 function RALLYE_DELETE_EXPIRED_RALLYES()
 {
-       global $DATA, $_CONFIG;
+       global $DATA;
 
        // Check for expired rallyes
        $EXPIRE = getConfig('one_day') * 3; // @TODO The hard-coded value...
@@ -739,7 +737,7 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="")
 }
 //
 function RALLYE_GET_REFCOUNT($uid, $old=0) {
-       global $_CONFIG, $cacheArray;
+       global $cacheArray;
 
        // Check current refs
        if (GET_EXT_VERSION("cache") >= "0.1.2") {
@@ -773,7 +771,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0) {
 
                if ($cnt > 0) {
                        // Count cache hits
-                       if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+                       incrementConfigEntry('cache_hits');
 
                        // Remove old refs
                        //* DEBUG: */ echo "+".$cnt."/".$old."+<br />";
@@ -788,12 +786,9 @@ ON s.level=d.level
 WHERE s.userid=%s AND s.level=1", array(bigintval($uid)), __FILE__, __LINE__);
                list($cnt) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
-               if (empty($cnt))
-               {
+               if (empty($cnt)) {
                        $cnt = 0;
-               }
-                else
-               {
+               } else {
                        $cnt -= $old;
                }
        }