[Fusionforge-commits] r8050 - in trunk/gforge/www: include themes/gforge-simple-theme

Roland Mas lolando at libremir.placard.fr.eu.org
Mon Aug 31 10:47:26 CEST 2009


Author: lolando
Date: 2009-08-31 10:47:25 +0200 (Mon, 31 Aug 2009)
New Revision: 8050

Modified:
   trunk/gforge/www/include/Layout.class.php
   trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php
Log:
Only display active groups in the Quick Jump menu

Modified: trunk/gforge/www/include/Layout.class.php
===================================================================
--- trunk/gforge/www/include/Layout.class.php	2009-08-31 08:42:07 UTC (rev 8049)
+++ trunk/gforge/www/include/Layout.class.php	2009-08-31 08:47:25 UTC (rev 8050)
@@ -1100,8 +1100,8 @@
 	 * @return	integer the theme id	
 	 */
 	function getThemeIdFromName($dirname) {
-	 	$res=db_query_params ('SELECT theme_id FROM themes WHERE dirname=$1',
-			array($dirname));
+	 	$res = db_query_params ('SELECT theme_id FROM themes WHERE dirname=$1',
+					array ($dirname));
 	        return db_result($res,0,'theme_id');
 	}
 
@@ -1109,8 +1109,10 @@
 		if (!session_loggedin()) {
 			return '';
 		} else {
-			$res=db_query("SELECT * FROM groups JOIN user_group USING (group_id) WHERE user_id='".user_getid()."' ORDER BY group_name");
-echo db_error();
+			$res = db_query_params ('SELECT * FROM groups JOIN user_group USING (group_id) WHERE user_group.user_id=$1 AND groups.status=$2 ORDER BY group_name',
+						array (user_getid(),
+						       'A'));
+			echo db_error();
 			if (!$res || db_numrows($res) < 1) {
 				return '';
 			} else {

Modified: trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php
===================================================================
--- trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php	2009-08-31 08:42:07 UTC (rev 8049)
+++ trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php	2009-08-31 08:47:25 UTC (rev 8050)
@@ -882,8 +882,8 @@
  * @return	integer the theme id
  */
 function getThemeIdFromName($dirname) {
-	$res=db_query_params ('SELECT theme_id FROM themes WHERE dirname=$1',
-			array($dirname));
+	$res = db_query_params ('SELECT theme_id FROM themes WHERE dirname=$1',
+				array ($dirname));
 	return db_result($res,0,'theme_id');
 }
 
@@ -891,7 +891,9 @@
 	if (!session_loggedin()) {
 		return '';
 	} else {
-		$res=db_query("SELECT * FROM groups NATURAL JOIN user_group WHERE user_id='".user_getid()."' ORDER BY group_name");
+		$res = db_query_params ('SELECT * FROM groups JOIN user_group USING (group_id) WHERE user_group.user_id=$1 AND groups.status=$2 ORDER BY group_name',
+					array (user_getid(),
+					       'A'));
 		echo db_error();
 		if (!$res || db_numrows($res) < 1) {
 			return '';




More information about the Fusionforge-commits mailing list