mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
fix two typos that prevented the search in a specific language to work
tune the regexes, so that the mirror specific part isnt shown
This commit is contained in:
@@ -7,7 +7,7 @@ include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
|
||||
// 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 @@ foreach($res['ResultSet']['Result'] as $i => $hit) {
|
||||
}
|
||||
|
||||
// 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>
|
||||
|
||||
@@ -75,7 +75,7 @@ if (!empty($_FORM['pattern'])) {
|
||||
}
|
||||
|
||||
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":
|
||||
|
||||
Reference in New Issue
Block a user