cvs: phpweb /include manual-lookup.inc
| From: | Wez Furlong | Date: | Fri, 16 May 2003 19:35:16 +0000 |
| Subject: | cvs: phpweb /include manual-lookup.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-17750@lists.php.net to get a copy of this message | ||
wez Fri May 16 15:35:16 2003 EDT
Modified files:
/phpweb/include manual-lookup.inc
Log:
Use new priority field
Index: phpweb/include/manual-lookup.inc
diff -u phpweb/include/manual-lookup.inc:1.19 phpweb/include/manual-lookup.inc:1.20
--- phpweb/include/manual-lookup.inc:1.19 Tue May 13 19:34:43 2003
+++ phpweb/include/manual-lookup.inc Fri May 16 15:35:16 2003
@@ -1,6 +1,6 @@
<?php // -*- C++ -*-
-// $Id: manual-lookup.inc,v 1.19 2003/05/13 23:34:43 wez Exp $
+// $Id: manual-lookup.inc,v 1.20 2003/05/16 19:35:16 wez Exp $
// Try to find some variations of keyword with $prefix in the $lang manual
function tryprefix($lang, $keyword, $prefix)
@@ -75,7 +75,7 @@
{
// Use open rather than popen to avoid any chance of confusion
// when rsync updates the database
- if (!function_exists("sqlite_open") || !($s = sqlite_open(dirname(__FILE__) .
'/../backend/manual-lookup.sqlite'))) {
+ if (!function_exists("sqlite_open") || !($s = @sqlite_open(dirname(__FILE__) .
'/../backend/manual-lookup.sqlite'))) {
return find_manual_page_slow($lang, $keyword);
}
@@ -106,7 +106,7 @@
array('en');
foreach ($langs as $lang) {
- $q = sqlite_query($s, "SELECT name from fs where lang='" . $lang . "'
and keyword in (" . $words . ") order by prefix LIMIT 1");
+ $q = sqlite_query($s, "SELECT name from fs where lang='" . $lang . "'
and keyword in (" . $words . ") order by prio LIMIT 1");
if ($q) {
$r = sqlite_fetch_array($q, SQLITE_NUM);
if (isset($r[0])) {