iliaa Mon May 24 16:03:22 2004 EDT
Modified files:
/livedocs error.php
Log:
sqlite_single_query() is our friend ;-).
http://cvs.php.net/diff.php/livedocs/error.php?r1=1.12&r2=1.13&ty=u
Index: livedocs/error.php
diff -u livedocs/error.php:1.12 livedocs/error.php:1.13
--- livedocs/error.php:1.12 Tue May 4 10:57:42 2004
+++ livedocs/error.php Mon May 24 16:03:22 2004
@@ -18,7 +18,7 @@
// | Handles the 404 error and try to redirect to the good place. |
// +----------------------------------------------------------------------+
//
-// $Id: error.php,v 1.12 2004/05/04 14:57:42 nlopess Exp $
+// $Id: error.php,v 1.13 2004/05/24 20:03:22 iliaa Exp $
/* handle IIS style 404 handler */
if (strncmp($_SERVER['SERVER_SOFTWARE'], "Microsoft", 9) == 0 &&
@@ -47,7 +47,7 @@
$db_m = sqlite_array_query($idx, "SELECT path, prio FROM searchi WHERE
(skey='" . sqlite_escape_string($lookup_name) . "' OR
skey='".sqlite_escape_string(metaphone($lookup_name))."') ORDER BY prio LIMIT 1",
SQLITE_NUM);
if ($db_m) {
- if ($db_m[0][1] < 5 ||
(sqlite_fetch_string(sqlite_unbuffered_query($idx, "SELECT count(*) FROM searchi WHERE
skey='" . sqlite_escape_string($lookup_name) . "' AND prio=5")) == 1)) {
+ if ($db_m[0][1] < 5 || (sqlite_single_query($idx, "SELECT
count(*) FROM searchi WHERE skey='" . sqlite_escape_string($lookup_name) . "' AND
prio=5") == 1)) {
$current_page = $lang . '/' . $db_m[0][0] . '.html';
if (@file_exists(OUTPUTDIR . '/' . $current_page)) {
header('Location: ' . WEBBASE . $current_page
. '?#' . $db_m[0][0]);