[Fusionforge-commits] r8067 - trunk/gforge/www/new

Roland Mas lolando at libremir.placard.fr.eu.org
Mon Aug 31 18:36:18 CEST 2009


Author: lolando
Date: 2009-08-31 18:36:18 +0200 (Mon, 31 Aug 2009)
New Revision: 8067

Modified:
   trunk/gforge/www/new/index.php
Log:
Ongoing migration to db_query_params()

Modified: trunk/gforge/www/new/index.php
===================================================================
--- trunk/gforge/www/new/index.php	2009-08-31 16:36:08 UTC (rev 8066)
+++ trunk/gforge/www/new/index.php	2009-08-31 16:36:18 UTC (rev 8067)
@@ -24,7 +24,8 @@
 // For expediancy, list only the filereleases in the past three days.
 $start_time = time() - (30 * 86400);
 
-$query	= "SELECT groups.group_name,
+
+$res_new = db_query_params ('SELECT groups.group_name,
 	groups.group_id,
 	groups.unix_group_name,
 	groups.short_description,
@@ -37,15 +38,17 @@
 	frs_package.name AS module_name, 
 	frs_dlstats_grouptotal_vw.downloads 
 	FROM groups,users,frs_package,frs_release,frs_dlstats_grouptotal_vw 
-	WHERE ( frs_release.release_date > '$start_time' 
+	WHERE ( frs_release.release_date > $1 
 	AND frs_release.package_id = frs_package.package_id 
 	AND frs_package.group_id = groups.group_id 
 	AND frs_release.released_by = users.user_id 
 	AND frs_package.group_id = frs_dlstats_grouptotal_vw.group_id 
 	AND frs_release.status_id=1 
 	AND frs_package.is_public=1 ) 
-	ORDER BY frs_release.release_date DESC";
-$res_new = db_query($query, 21, $offset, SYS_DB_STATS);
+	ORDER BY frs_release.release_date DESC',
+			    array($start_time),
+			    21,
+			    $offset);
 
 if (!$res_new || db_numrows($res_new) < 1) {
 	print db_error();




More information about the Fusionforge-commits mailing list