cvs: phpweb / mirror-info.php
| From: | Gabor Hojtsy | Date: | Fri, 03 Jan 2003 21:41:13 +0000 |
| Subject: | cvs: phpweb / mirror-info.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14675@lists.php.net to get a copy of this message | ||
goba Fri Jan 3 16:41:13 2003 EDT
Modified files:
/phpweb mirror-info.php
Log:
Add local search support test, so we can update the searchable mirrors
list automatically, without needed human intervention
Index: phpweb/mirror-info.php
diff -u phpweb/mirror-info.php:1.4 phpweb/mirror-info.php:1.5
--- phpweb/mirror-info.php:1.4 Fri Apr 19 18:22:39 2002
+++ phpweb/mirror-info.php Fri Jan 3 16:41:13 2003
@@ -1,4 +1,20 @@
<?php
-require_once 'prepend.inc';
-echo "$MYSITE|", phpversion(), "|$LAST_UPDATED|";
+
+// Define $MYSITE and $LAST_UPDATED variables
+include_once "prepend.inc";
+
+// Try to find out if local search is possible
+unset($htsearch_prog);
+if (file_exists("configuration.inc")) {
+ include_once 'configuration.inc';
+}
+if (isset($_SERVER['HTSEARCH_PROG'])) {
+ $htsearch_prog = $_SERVER['HTSEARCH_PROG'];
+}
+if (!is_executable($htsearch_prog)) {
+ unset($htsearch_prog);
+}
+
+echo "$MYSITE|", phpversion(), "|$LAST_UPDATED|" . ((int)
isset($htsearch_prog));
+
?>