cvs: phpweb / search.php
| From: | Gabor Hojtsy | Date: | Sat, 14 Dec 2002 17:56:13 +0000 |
| Subject: | cvs: phpweb / search.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14174@lists.php.net to get a copy of this message | ||
goba Sat Dec 14 12:56:13 2002 EDT
Modified files:
/phpweb search.php
Log:
I'll tell what have I done here after this goes online...
Index: phpweb/search.php
diff -u phpweb/search.php:1.41 phpweb/search.php:1.42
--- phpweb/search.php:1.41 Sat Dec 14 11:21:13 2002
+++ phpweb/search.php Sat Dec 14 12:56:13 2002
@@ -7,6 +7,10 @@
mirror (or emulate it on your own website).
*/
+// For safety reasons, we disallow the
+// setting of this variable from outside
+unset($htsearch_prog);
+
// Constant to specify when there is no base
define(NO_BASE, "-");
@@ -15,6 +19,12 @@
include_once 'configuration.inc';
}
+// Override configuration.inc setting with per vhost setting
+// [this will be used in the future instead of configuration.inc]
+if (isset($_SERVER['HTSEARCH_PROG'])) {
+ $htsearch_prog = $_SERVER['HTSEARCH_PROG'];
+}
+
/* Form parameters expected:
pattern - search keywords
lang - language to limit search to [this is not used currently!!!]
@@ -71,7 +81,7 @@
// If some local search is needed and we have no support for
// it, send the user to the central search page on php.net
- if (!have_search() && !isset($local_search_override)) {
+ if (!have_search()) {
$location = "http://www.php.net/search.php";
$query = "show=" . $show . "&pattern=" . urlencode($pattern) .
"&base=" . urlencode($MYSITE);
header("Location: $location?$query");