cvs: phpweb /include manual-lookup.inc
| From: | Gabor Hojtsy | Date: | Sat, 06 Sep 2003 09:29:11 +0000 |
| Subject: | cvs: phpweb /include manual-lookup.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20822@lists.php.net to get a copy of this message | ||
goba Sat Sep 6 05:29:11 2003 EDT
Modified files:
/phpweb/include manual-lookup.inc
Log:
Inform the user if we are unable to fulfill his request for a URL shortcut
because of some problem in the SQLite query. This avoids one Location:
redirection to the same mirror in case sqlite is not properly working, and
informs the user, instead of printing out nasty PHP error messages (ie.
graceful degradation).
Index: phpweb/include/manual-lookup.inc
diff -u phpweb/include/manual-lookup.inc:1.24 phpweb/include/manual-lookup.inc:1.25
--- phpweb/include/manual-lookup.inc:1.24 Sat Sep 6 04:52:15 2003
+++ phpweb/include/manual-lookup.inc Sat Sep 6 05:29:11 2003
@@ -1,6 +1,9 @@
<?php // -*- C++ -*-
-// $Id: manual-lookup.inc,v 1.24 2003/09/06 08:52:15 goba Exp $
+// $Id: manual-lookup.inc,v 1.25 2003/09/06 09:29:11 goba Exp $
+
+// We need this for error reporting
+include_once $_SERVER['DOCUMENT_ROOT'] . '/include/errors.inc';
// Try to find some variations of keyword with $prefix in the $lang manual
function tryprefix($lang, $keyword, $prefix)
@@ -143,6 +146,8 @@
// Match found
return $r[0];
}
+ } else {
+ error_noservice();
}
}