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

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Nov 4 12:07:58 CET 2010


Author: lolando
Date: 2010-11-04 12:07:58 +0100 (Thu, 04 Nov 2010)
New Revision: 11378

Modified:
   trunk/src/www/admin/userlist.php
Log:
Keep filtering of userlist after changing one user's status

Modified: trunk/src/www/admin/userlist.php
===================================================================
--- trunk/src/www/admin/userlist.php	2010-11-04 11:01:30 UTC (rev 11377)
+++ trunk/src/www/admin/userlist.php	2010-11-04 11:07:58 UTC (rev 11378)
@@ -64,7 +64,7 @@
 	echo '<p class="feedback">' .sprintf(_('User updated to %1$s status'), $statusString)."</p>";
 }
 
-function show_users_list ($users) {
+function show_users_list ($users, $filter='') {
 	echo '<p>' ._('Key') .':
 		<span class="active">'._('Active'). '</span>
 		<span class="deleted">' ._('Deleted') .'</span>
@@ -106,9 +106,9 @@
 		echo ($u->getAddDate() ? date(_('Y-m-d H:i'), $u->getAddDate()) : '-');
 		echo '</td>';
 		echo '<td width="15%" style="text-align:center">'.util_make_link ('/developer/?form_dev='.$u->getID(),_('[DevProfile]')).'</td>';
-		echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=activate&amp;user_id='.$u->getID(),_('[Activate]')).'</td>';
-		echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=delete&amp;user_id='.$u->getID(),_('[Delete]')).'</td>';
-		echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=suspend&amp;user_id='.$u->getID(),_('[Suspend]')).'</td>';
+		echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=activate&amp;user_id='.$u->getID().$filter,_('[Activate]')).'</td>';
+		echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=delete&amp;user_id='.$u->getID().$filter,_('[Delete]')).'</td>';
+		echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=suspend&amp;user_id='.$u->getID().$filter,_('[Suspend]')).'</td>';
 		echo '</tr>';
 		$count ++;
 	}
@@ -153,7 +153,11 @@
 		$res = db_query_params('SELECT user_id FROM users ORDER BY '.$sortorder,
 					  array ());
 	}
-	show_users_list (user_get_objects(util_result_column_to_array($res,0)));
+	$filter='';
+	if (in_array($status,array('D','A','S','P'))) {
+		$filter = '&amp;status='.$status;
+	}
+	show_users_list (user_get_objects(util_result_column_to_array($res,0)),$filter);
 } else {
 	/*
 		Show list for one group




More information about the Fusionforge-commits mailing list