Refback will be payed now (user cannot setup currently)
[mailer.git] / inc / libs / rallye_functions.php
index 1b4798f07b0d6096496c3b63b188ca95c4b86167..643c53f29fc691232ee75868161593de0cfa73f7 100644 (file)
@@ -358,19 +358,13 @@ function RALLYE_EXPIRE_RALLYES($result)
        global $DATA, $_CONFIG;
 
        // Latest online time
-       $since = 0; $min_users = 0; $min_prices = 0;
+       $since = 0;
        if (EXT_IS_ACTIVE("autopurge")) {
                $since = $_CONFIG['ap_inactive_since'];
        } // END - if
 
        // Load rallye data
-       if (GET_EXT_VERSION("rallye") >= "0.2.0") {
-               list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
-       } else {
-               list($id, $title, $start, $end, $notify) = SQL_FETCHROW($result);
-       }
-
-       // Free result
+       list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
 
        // Load users array (!) with assigned prices
@@ -759,7 +753,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0)
 {
        global $_CONFIG, $cacheArray;
        // Check current refs
-       if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($cacheArray['ref_system'])))
+       if (GET_EXT_VERSION("cache") >= "0.1.2")
        {
                // Get refs from cache
                $cnt = 0;
@@ -808,7 +802,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0)
 FROM "._MYSQL_PREFIX."_refsystem AS s
 LEFT JOIN "._MYSQL_PREFIX."_refdepths AS d
 ON s.level=d.level
-WHERE s.userid=%s AND s.level=0", array(bigintval($uid)), __FILE__, __LINE__);
+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))