[Fusionforge-commits] r7566 - in trunk: . gforge/www/softwaremap

Roland Mas lolando at libremir.placard.fr.eu.org
Mon May 4 17:19:57 CEST 2009


Author: lolando
Date: 2009-05-04 17:19:57 +0200 (Mon, 04 May 2009)
New Revision: 7566

Modified:
   trunk/
   trunk/gforge/www/softwaremap/trove_list.php
Log:
Merged from 4.8: PHP warnings and logic fixes in trove map


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291,7293,7295-7296,7300,7355,7365-7366,7375-7376,7378,7395,7423-7426,7435,7458,7504
/branches/Branch_4_8:7334-7335,7344-7345,7382,7387,7389-7390,7396,7398,7401-7402,7428-7429,7437,7440,7443,7449-7455,7459,7462,7466,7469-7470,7476-7477,7478,7480,7485,7490-7491,7492,7505,7540,7556-7558,7559

   + /branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291,7293,7295-7296,7300,7355,7365-7366,7375-7376,7378,7395,7423-7426,7435,7458,7504
/branches/Branch_4_8:7334-7335,7344-7345,7382,7387,7389-7390,7396,7398,7401-7402,7428-7429,7437,7440,7443,7449-7455,7459,7462,7466,7469-7470,7476-7477,7478,7480,7485,7490-7491,7492,7505,7540,7556-7558,7559-7560

Modified: svk:merge
   - 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7001
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7012
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7291
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7458
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7335
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7344
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7345
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7402
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7455
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7459
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7469
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7470
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7476
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7480
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7505
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7540
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7557
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7559

   + 9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7001
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7012
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7291
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_7:7458
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7335
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7344
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7345
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7396
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7402
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7455
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7459
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7469
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7470
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7476
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7480
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7505
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7540
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7557
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7559
9d84d37e-dcb1-4aad-b103-6f3d92f53bf6:/branches/Branch_4_8:7560


Modified: trunk/gforge/www/softwaremap/trove_list.php
===================================================================
--- trunk/gforge/www/softwaremap/trove_list.php	2009-05-04 15:19:47 UTC (rev 7565)
+++ trunk/gforge/www/softwaremap/trove_list.php	2009-05-04 15:19:57 UTC (rev 7566)
@@ -1,13 +1,27 @@
 <?php
 /**
-  *
-  * SourceForge Trove Software Map
-  *
-  * SourceForge: Breaking Down the Barriers to Open Source Development
-  * Copyright 1999-2001 (c) VA Linux Systems
-  * http://sourceforge.net
-  *
-  */
+ * FusionForge Trove Software Map
+ *
+ * Copyright 1999-2001, VA Linux Systems, Inc.
+ * Copyright 2009, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ * 
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
 
 require_once('../env.inc.php');
 require_once $gfwww.'include/pre.php'; 
@@ -77,23 +91,19 @@
 $discrim_desc = '';
 
 if ($discrim) {
-	unset ($discrim_queryalias);
-	unset ($discrim_queryand);
-	unset ($discrim_url_b);
+	$discrim_queryalias = '';
+	$discrim_queryand = '';
+	$discrim_url_b = array();
 
 	// commas are ANDs
 	$expl_discrim = explode(',',$discrim);
 
-	// need one link for each "get out of this limit" links
-	$discrim_url = '&discrim=';
-
-	$lims=sizeof($expl_discrim);
-	if ($lims > 6) {
-		$lims=6;
+	if (sizeof($expl_discrim) > 6) {
+		array_splice ($expl_discrim, 6) ;
 	}
 
 	// one per argument	
-	for ($i=0;$i<$lims;$i++) {
+	for ($i=0;$i<sizeof($expl_discrim);$i++) {
 		// make sure these are all ints, no url trickery
 		$expl_discrim[$i] = intval($expl_discrim[$i]);
 
@@ -109,33 +119,24 @@
 			.$expl_discrim[$i].' AND trove_agg_'.$i.'.group_id='
 			.'trove_agg.group_id ';
 
-		// must build query string for all urls
-		if ($i==0) {
-			$discrim_url .= $expl_discrim[$i];
-		} else {
-			$discrim_url .= ','.$expl_discrim[$i];
-		}
-		// must also do this for EACH "get out of this limit" links
-		// convoluted logic to build urls for these, but works quickly
+		$expl_discrim_b = array () ;
 		for ($j=0;$j<sizeof($expl_discrim);$j++) {
 			if ($i!=$j) {
-				if (!$discrim_url_b[$j]) {
-					$discrim_url_b[$j] = '&discrim='.$expl_discrim[$i];
-				} else {
-					$discrim_url_b[$j] .= ','.$expl_discrim[$i];
-				}
+				$expl_discrim_b[] = $expl_discrim[$j] ;
 			}
 		}
+		$discrim_url_b[$i] = '&discrim=' . implode (',', $expl_discrim_b) ;
 
 	}
+	$discrim_url = '&discrim=' . implode (',', $expl_discrim);
 
 	// build text for top of page on what viewier is seeing
-	$discrim_desc = _('Now limiting view to projects in the following categories').':';
+	$discrim_desc = _('Now limiting view to projects in the following categories:');
 	
 	for ($i=0;$i<sizeof($expl_discrim);$i++) {
 		$discrim_desc .= '<br /> &nbsp; &nbsp; &nbsp; '
 			.trove_getfullpath($expl_discrim[$i])
-			.util_make_link ('/softwaremap/trove_list.php?form_cat='.$form_cat .$discrim_url_b[$i],'['._('Remove This Filter').']');
+			.util_make_link ('/softwaremap/trove_list.php?form_cat='.$form_cat .$discrim_url_b[$i],' ['._('Remove This Filter').']');
 	}
 	$discrim_desc .= "<hr />\n";
 } 




More information about the Fusionforge-commits mailing list