Update of /cvsroot/fink/web/pdb
In directory sc8-pr-cvs17:/tmp/cvs-serv20565
Modified Files:
Tag: redesign_pdb
browse.php
Log Message:
Re-direct to clean out empty params
Index: browse.php
===================================================================
RCS file: /cvsroot/fink/web/pdb/browse.php,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -d -r1.1.2.14 -r1.1.2.15
--- browse.php 25 Feb 2007 13:56:09 -0000 1.1.2.14
+++ browse.php 15 Aug 2007 16:26:55 -0000 1.1.2.15
@@ -3,6 +3,37 @@
$cvs_author = '$Author$';
$cvs_date = '$Date$';
+
+
+function addGETParam(&$params, $param_name) {
+ $value = $_GET[$param_name];
+ if ($value)
+ $params[$param_name] = $value;
+}
+
+
+if (isset($_GET['submit']) && $_GET['submit'] == 'Browse') {
+ // Re-direct to clean out empty params
+ $getparams = array();
+ addGETParam($getparams, 'maintainer');
+ addGETParam($getparams, 'name');
+ addGETParam($getparams, 'summary');
+ addGETParam($getparams, 'nolist');
+ addGETParam($getparams, 'dist');
+ addGETParam($getparams, 'tree');
+ addGETParam($getparams, 'section');
+ addGETParam($getparams, 'nochildren');
+ addGETParam($getparams, 'noshlibsdev');
+ addGETParam($getparams, 'sort');
+ $redirect_url = '?';
+ foreach ($getparams as $key => $value) {
+ $redirect_url .= "$key=$value&";
+ }
+ $redirect_url = rtrim($redirect_url, '&?');
+ header("Location: browse.php$redirect_url");
+}
+
+
include "header.inc";
?>
@@ -84,7 +115,7 @@
"testing" => "Packages that need testing"
);
$sort_values = array(
- "ASC" => "Ascending",
+ "" => "Ascending",
"DESC" => "Descending"
);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits