Skip to content

Commit 35c5927

Browse files
committed
Remove more dead code
1 parent 51455a7 commit 35c5927

File tree

1 file changed

+2
-51
lines changed

1 file changed

+2
-51
lines changed

search.php

+2-51
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,7 @@
55

66
// ---------------------------------------------------------------------------
77

8-
// Convert POST -> GET for dumping the user onto a mirror
9-
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
10-
$_FORM = &$_POST;
11-
$_SERVER['REQUEST_URI'] = "/search.php?";
12-
$vars = array("show", "pattern", "lang");
13-
foreach ($vars as $varname) {
14-
if (!empty($_POST[$varname])) {
15-
$_SERVER['REQUEST_URI'] .= "$varname=" . urlencode($_POST[$varname]) . "&";
16-
}
17-
}
18-
} else {
19-
$_FORM = &$_GET;
20-
}
21-
22-
// Drive load to mirror sites when searching
23-
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/loadavg.inc';
8+
$_FORM = &$_GET;
249

2510
// ---------------------------------------------------------------------------
2611

@@ -41,56 +26,22 @@
4126
// Never allow a comma in the show string, that would confuse our JS
4227
$_FORM['show'] = str_replace(",", "", $_FORM['show']);
4328

44-
// Mailing list search base URL
45-
$ml_url = "http://marc.info/?r=1&w=2&q=b&";
4629
$ucp = urlencode($_FORM['pattern']);
4730

4831
// Do redirections for external search engines
4932
switch ($_FORM['show']) {
50-
5133
case "quickref" :
5234
case "404quickref" :
5335
$langparam = (isset($EXPL_LANG) ? "&lang=$EXPL_LANG" : "");
5436
mirror_redirect("/manual-lookup.php?pattern={$ucp}{$langparam}&scope={$_FORM['show']}");
37+
break;
5538

56-
case "maillist" :
57-
mirror_redirect("{$ml_url}l=php-general&s={$ucp}");
58-
59-
case "devlist" :
60-
mirror_redirect("{$ml_url}l=php-internals&s={$ucp}");
61-
62-
case "phpdoc" :
63-
mirror_redirect("{$ml_url}l=phpdoc&s={$ucp}");
64-
65-
case "bugdb" :
66-
// Redirect to bug page in case of exact number
67-
if (preg_match("!^\\d+$!", $_FORM['pattern'])) {
68-
mirror_redirect("http://bugs.php.net/{$ucp}");
69-
}
70-
71-
// Redirect to bug search page in case of some other pattern
72-
else {
73-
mirror_redirect(
74-
"http://bugs.php.net/search.php?" .
75-
"cmd=Display+Bugs&status=All&bug_type=Any&search_for={$ucp}"
76-
);
77-
}
7839

7940
case "manual":
8041
case "404manual":
8142
mirror_redirect($MYSITE . "results.php?q={$ucp}&p={$_FORM['show']}&l=$LANG");
8243
break;
8344

84-
case "news_archive":
85-
$p = urlencode($_FORM['show']);
86-
mirror_redirect($MYSITE . "results.php?q=intitle:news%2Barchive+{$ucp}&p=local");
87-
break;
88-
89-
case "changelogs":
90-
$p = urlencode($_FORM['show']);
91-
mirror_redirect($MYSITE . "results.php?q=intitle:ChangeLog+{$ucp}&p=local");
92-
break;
93-
9445
// Covers the rest
9546
default:
9647
$p = urlencode($_FORM['show']);

0 commit comments

Comments
 (0)