[Fusionforge-commits] r10704 - trunk/src/www/admin

Roland Mas lolando at libremir.placard.fr.eu.org
Sat Sep 25 21:25:39 CEST 2010


Author: lolando
Date: 2010-09-25 21:25:39 +0200 (Sat, 25 Sep 2010)
New Revision: 10704

Modified:
   trunk/src/www/admin/grouplist.php
Log:
Removed dead code

Modified: trunk/src/www/admin/grouplist.php
===================================================================
--- trunk/src/www/admin/grouplist.php	2010-09-25 19:24:05 UTC (rev 10703)
+++ trunk/src/www/admin/grouplist.php	2010-09-25 19:25:39 UTC (rev 10704)
@@ -28,17 +28,11 @@
 site_admin_header(array('title'=>_('Project List')));
 echo '<h1>' . _('Project List') . '</h1>';
 
-$form_catroot = getStringFromRequest('form_catroot');
 $form_pending = getStringFromRequest('form_pending');
 $sortorder = getStringFromRequest('sortorder');
 $group_name_search = getStringFromRequest('group_name_search');
 $status = getStringFromRequest('status');
 
-// start from root if root not passed in
-if (!$form_catroot) {
-	$form_catroot = 1;
-}
-
 $sortorder = util_ensure_value_in_set ($sortorder,
 				       array ('group_name',
 					      'register_time',
@@ -48,10 +42,9 @@
 					      'license_name',
 					      'members')) ;
 
-if ($form_catroot == 1) {
-	if (isset($group_name_search)) {
-		echo "<p>"._('Projects that begin with'). " <strong>".$group_name_search."</strong></p>\n";
-		$res = db_query_params ('SELECT group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name,COUNT(user_group.group_id) AS members
+if (isset($group_name_search)) {
+	echo "<p>"._('Projects that begin with'). " <strong>".$group_name_search."</strong></p>\n";
+	$res = db_query_params ('SELECT group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name,COUNT(user_group.group_id) AS members
 FROM groups
 LEFT JOIN user_group ON user_group.group_id=groups.group_id, licenses
 WHERE license_id=license
@@ -59,22 +52,16 @@
 AND (status=$2 OR 1!=$3)
 GROUP BY group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name
 ORDER BY '.$sortorder,
-					array (strtolower ("$group_name_search%"),
-					       'P',
-					       $form_pending ? 1 : 0)) ;
-	} else {
-		$qpa = db_construct_qpa (false, 'SELECT group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name, COUNT(user_group.group_id) AS members FROM groups LEFT JOIN user_group ON user_group.group_id=groups.group_id, licenses WHERE license_id=license') ;
-		if ($status) {
-			$qpa = db_construct_qpa ($qpa, ' AND status=$1', array ($status)) ;
-		}
-		$qpa = db_construct_qpa ($qpa, ' GROUP BY group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name ORDER BY '.$sortorder) ;
-		$res = db_query_qpa ($qpa) ;
-	}
+				array (strtolower ("$group_name_search%"),
+				       'P',
+				       $form_pending ? 1 : 0)) ;
 } else {
-	echo "<p>"._('Project List for Category:').' ';
-	echo "<strong>" . category_fullname($form_catroot) . "</strong></p>\n";
-	$res = db_query_params('SELECT groups.group_name,groups.register_time,groups.unix_group_name,groups.group_id,groups.is_public,licenses.license_name,groups.status, count(user_group.group_id) AS members FROM groups LEFT JOIN user_group ON user_group.group_id=groups.group_id,group_category,licenses WHERE groups.group_id=group_category.group_id AND group_category.category_id=$1 AND licenses.license_id=groups.license GROUP BY group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name ORDER BY '.$sortorder,
-			       array($form_catroot));
+	$qpa = db_construct_qpa (false, 'SELECT group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name, COUNT(user_group.group_id) AS members FROM groups LEFT JOIN user_group ON user_group.group_id=groups.group_id, licenses WHERE license_id=license') ;
+	if ($status) {
+		$qpa = db_construct_qpa ($qpa, ' AND status=$1', array ($status)) ;
+	}
+	$qpa = db_construct_qpa ($qpa, ' GROUP BY group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name ORDER BY '.$sortorder) ;
+	$res = db_query_qpa ($qpa) ;
 }
 
 $headers = array(




More information about the Fusionforge-commits mailing list