[Fusionforge-commits] r8162 - trunk/gforge/www/include

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Sep 24 16:10:02 CEST 2009


Author: lolando
Date: 2009-09-24 16:10:02 +0200 (Thu, 24 Sep 2009)
New Revision: 8162

Modified:
   trunk/gforge/www/include/html.php
   trunk/gforge/www/include/logger.php
Log:
db_query_params() migration

Modified: trunk/gforge/www/include/html.php
===================================================================
--- trunk/gforge/www/include/html.php	2009-09-24 14:09:53 UTC (rev 8161)
+++ trunk/gforge/www/include/html.php	2009-09-24 14:10:02 UTC (rev 8162)
@@ -83,9 +83,9 @@
 	if (!$args) {
 		$args = array();
 	}
-	$sql="SELECT width,height,version 
-FROM db_images WHERE id='$id'";
-	$result=db_query($sql);
+	$result = db_query_params ('SELECT width,height,version 
+FROM db_images WHERE id=$1',
+			array ($id));
 	$rows=db_numrows($result);
 
 	if (!$result || $rows < 1) {
@@ -150,7 +150,8 @@
  * @return	string	The html select box.
  */
 function html_get_language_popup ($title='language_id',$selected='xzxz') {
-	$res = db_query('SELECT * FROM supported_languages ORDER BY name ASC');	
+	$res = db_query_params ('SELECT * FROM supported_languages ORDER BY name ASC',
+			array ());	
 	return html_build_select_box ($res,$title,$selected,false);
 }
 

Modified: trunk/gforge/www/include/logger.php
===================================================================
--- trunk/gforge/www/include/logger.php	2009-09-24 14:09:53 UTC (rev 8161)
+++ trunk/gforge/www/include/logger.php	2009-09-24 14:10:02 UTC (rev 8162)
@@ -39,12 +39,14 @@
 	}
 	$expl_pathinfo = explode('/',$pathwithoutprefix);
 	if (($expl_pathinfo[1]=='foundry') || ($expl_pathinfo[1]=='projects')) {
-		$res_grp=db_query("
+		$res_grp = db_query_params ('
 			SELECT *
 			FROM groups
-			WHERE unix_group_name='$expl_pathinfo[2]'
-			AND status IN ('A','H')
-		");
+			WHERE unix_group_name=$1
+			AND status IN ($2,$3)',
+					    array ($expl_pathinfo[2],
+						   'A',
+						   'H'));
 		
 		// store subpage id for analyzing later
 		$subpage = @$expl_pathinfo[3];




More information about the Fusionforge-commits mailing list