[Fusionforge-commits] r8095 - in trunk/gforge/www/trove: . include

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Sep 3 21:33:15 CEST 2009


Author: lolando
Date: 2009-09-03 21:33:15 +0200 (Thu, 03 Sep 2009)
New Revision: 8095

Modified:
   trunk/gforge/www/trove/TroveCategory.class.php
   trunk/gforge/www/trove/include/utils.php
Log:
Ongoing migration to db_query_params()

Modified: trunk/gforge/www/trove/TroveCategory.class.php
===================================================================
--- trunk/gforge/www/trove/TroveCategory.class.php	2009-09-03 19:22:50 UTC (rev 8094)
+++ trunk/gforge/www/trove/TroveCategory.class.php	2009-09-03 19:33:15 UTC (rev 8095)
@@ -83,9 +83,8 @@
 	 *	@return	boolean	success.
 	 */
 	function fetchData($categoryId) {
-		$res=db_query_params("SELECT *
-			FROM trove_cat
-			WHERE trove_cat_id=$1",array($categoryId) -1, 0, SYS_DB_TROVE);
+		$res = db_query_params('SELECT * FROM trove_cat	WHERE trove_cat_id=$1',
+				       array($categoryId));
 		if (!$res || db_numrows($res) < 1) {
 			return false;
 		}

Modified: trunk/gforge/www/trove/include/utils.php
===================================================================
--- trunk/gforge/www/trove/include/utils.php	2009-09-03 19:22:50 UTC (rev 8094)
+++ trunk/gforge/www/trove/include/utils.php	2009-09-03 19:33:15 UTC (rev 8095)
@@ -24,12 +24,8 @@
  */
 
 function getLanguageSelectionPopup($alreadyDefined = array()) {
-	$where = '';
-	if(!empty($alreadyDefined)) {
-		$where = ' WHERE language_id NOT IN('.implode(',', $alreadyDefined).')';
-	}
-	$res = db_query('SELECT * FROM supported_languages'.$where.' ORDER BY name ASC');
-	
+	$res = db_query_params ('SELECT * FROM supported_languages WHERE language_id <> ALL ($1) ORDER BY name ASC',
+				array (db_int_array_to_any_clause ($alreadyDefined)));
 	return html_build_select_box ($res, 'language_id', 'xzxz', false);
 }
 




More information about the Fusionforge-commits mailing list