cvs: phpweb / results.php search.php
| From: | Nuno Lopes | Date: | Tue, 28 Feb 2006 16:30:05 +0000 |
| Subject: | cvs: phpweb / results.php search.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-30725@lists.php.net to get a copy of this message | ||
nlopess Tue Feb 28 16:30:05 2006 UTC
Modified files:
/phpweb results.php search.php
Log:
fix two typos that prevented the search in a specific language to work
tune the regexes, so that the mirror specific part isnt shown
http://cvs.php.net/viewcvs.cgi/phpweb/results.php?r1=1.9&r2=1.10&diff_format=u
Index: phpweb/results.php
diff -u phpweb/results.php:1.9 phpweb/results.php:1.10
--- phpweb/results.php:1.9 Tue Feb 28 13:04:50 2006
+++ phpweb/results.php Tue Feb 28 16:30:04 2006
@@ -1,5 +1,5 @@
<?php
-// $Id: results.php,v 1.9 2006/02/28 13:04:50 nlopess Exp $
+// $Id: results.php,v 1.10 2006/02/28 16:30:04 nlopess Exp $
$_SERVER['BASE_PAGE'] = 'results.php';
include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
#include $_SERVER['DOCUMENT_ROOT'] . '/include/loadavg.inc';
@@ -7,7 +7,7 @@
// Prepare data for search
if ($MQ) {
$q = stripslashes($_GET['q']); //query
- $l = stripslashes($GET['l']); // language
+ $l = stripslashes($_GET['l']); // language
} else {
$q = $_GET['q'];
$l = $_GET['l'];
@@ -66,9 +66,9 @@
}
// rewrite mirrors urls (\w\w\d? or www)
- $real_url = preg_replace('!^http://\w{2,3}\.php\.net/(.*)$!', $MYSITE .
'$1', $hit['Url']);
+ $real_url = preg_replace('!^http://\w{2,3}\.php\.net(.*)$!', '$1',
$hit['Url']);
- $displayurl = preg_replace('!^http://(.+[^/])/?$!',
'$1', $hit['Url']);
+ $displayurl = preg_replace('!^http://(?:\w{2,3}\.)?(.+[^/])/?$!', '$1',
$hit['Url']);
$display_title = str_replace('PHP:', '', $hit['Title']);
echo <<<EOB
<li>
http://cvs.php.net/viewcvs.cgi/phpweb/search.php?r1=1.108&r2=1.109&diff_format=u
Index: phpweb/search.php
diff -u phpweb/search.php:1.108 phpweb/search.php:1.109
--- phpweb/search.php:1.108 Tue Feb 28 12:15:47 2006
+++ phpweb/search.php Tue Feb 28 16:30:04 2006
@@ -1,5 +1,5 @@
<?php
-// $Id: search.php,v 1.108 2006/02/28 12:15:47 nlopess Exp $
+// $Id: search.php,v 1.109 2006/02/28 16:30:04 nlopess Exp $
$_SERVER['BASE_PAGE'] = 'search.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
@@ -75,7 +75,7 @@
}
case "manual":
- mirror_redirect($MYSITE .
"results.php?q={$ucp}&p=manual&lang=$LANG");
+ mirror_redirect($MYSITE . "results.php?q={$ucp}&p=manual&l=$LANG");
break;
case "news_archive":