cvs: phpweb / search.php

From: Date: Mon, 16 Dec 2002 15:16:59 +0000
Subject: cvs: phpweb / search.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14248@lists.php.net to get a copy of this message
goba Mon Dec 16 10:16:59 2002 EDT Modified files: /phpweb search.php Log: Put an end to any future infinite loops, check if the central mirror site has a problem, and just print out a failure notice then... Index: phpweb/search.php diff -u phpweb/search.php:1.45 phpweb/search.php:1.46 --- phpweb/search.php:1.45 Sun Dec 15 13:29:09 2002 +++ phpweb/search.php Mon Dec 16 10:16:57 2002 @@ -89,10 +89,23 @@ // 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($htsearch_prog)) { - $location = "http://www.php.net/search.php"; - $query = "show=" . $show . "&pattern=" . urlencode($pattern) . "&base=" . urlencode($MYSITE); - header("Location: $location?$query"); - exit; + + // We cannot redirect to anywhere, absolute failure + if (is_primary_site()) { + commonHeader("Search Service"); + echo "<b>The search service is currently not working</b>.<br />"; + echo "Please try later.\n"; + commonFooter(); + exit(); + } + + // We can redirect to the php.net search page + else { + $location = "http://www.php.net/search.php"; + $query = "show=" . $show . "&pattern=" . urlencode($pattern) . "&base=" . urlencode($MYSITE); + header("Location: $location?$query"); + exit; + } } // The local search engine is in place, and some

« previous php.mirrors (#14248) next »