From f6fc2b9723a0554bf4f407554225e9a1a1a97e5e Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Sat, 27 Sep 2008 18:49:59 +0000
Subject: [PATCH] Hotfix for rallye

---
 inc/libs/rallye_functions.php | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php
index 36e85f6c07..1b4798f07b 100644
--- a/inc/libs/rallye_functions.php
+++ b/inc/libs/rallye_functions.php
@@ -358,13 +358,19 @@ function RALLYE_EXPIRE_RALLYES($result)
 	global $DATA, $_CONFIG;
 
 	// Latest online time
-	$since = 0;
+	$since = 0; $min_users = 0; $min_prices = 0;
 	if (EXT_IS_ACTIVE("autopurge")) {
 		$since = $_CONFIG['ap_inactive_since'];
 	} // END - if
 
 	// Load rallye data
-	list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
+	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
 	SQL_FREERESULT($result);
 
 	// Load users array (!) with assigned prices
@@ -753,7 +759,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0)
 {
 	global $_CONFIG, $cacheArray;
 	// Check current refs
-	if (GET_EXT_VERSION("cache") >= "0.1.2")
+	if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($cacheArray['ref_system'])))
 	{
 		// Get refs from cache
 		$cnt = 0;
-- 
2.39.5