Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend
In directory usw-pr-cvs1:/tmp/cvs-serv19978/lib/WikiDB/backend
Modified Files:
PearDB.php
Log Message:
Fix typo/bug in PearDB::text_search.
Change calling conventions for ErrorManager::pushErrorHandler() and
ErrorManager::setFatalHandler(). Now these take a WikiCallback
instead of the Pear style callback specification.
Change argument semantics for TextSearchQuery::makeSqlClause.
Now takes a WikiCallback.
Index: PearDB.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/PearDB.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** PearDB.php 2001/11/17 00:49:29 1.9
--- PearDB.php 2001/11/21 19:49:21 1.10
***************
*** 17,21 ****
// Install filter to handle bogus error notices from buggy DB.php's.
global $ErrorManager;
! $ErrorManager->pushErrorHandler(array($this, '_pear_notice_filter'));
// Open connection to database
--- 17,21 ----
// Install filter to handle bogus error notices from buggy DB.php's.
global $ErrorManager;
! $ErrorManager->pushErrorHandler(new WikiMethodCb($this, '_pear_notice_filter'));
// Open connection to database
***************
*** 445,452 ****
$join_clause = "$nonempty_tbl.id=$page_tbl.id";
$fields = "$page_tbl.*";
! $callback = '_sql_match_clause';
if ($fullsearch) {
! $table .= ", $recent_tbl,";
$join_clause .= " AND $page_tbl.id=$recent_tbl.id";
--- 445,452 ----
$join_clause = "$nonempty_tbl.id=$page_tbl.id";
$fields = "$page_tbl.*";
! $callback = new WikiMethodCb($this, '_sql_match_clause');
if ($fullsearch) {
! $table .= ", $recent_tbl";
$join_clause .= " AND $page_tbl.id=$recent_tbl.id";
***************
*** 455,463 ****
$fields .= ",$version_tbl.*";
! $callback = '_fullsearch_sql_match_clause';
}
-
! $search_clause = $search->makeSqlClause(array($this, $callback));
$result = $dbh->query("SELECT $fields FROM $table"
--- 455,462 ----
$fields .= ",$version_tbl.*";
! $callback = new WikiMethodCb($this, '_fullsearch_sql_match_clause');
}
! $search_clause = $search->makeSqlClause($callback);
$result = $dbh->query("SELECT $fields FROM $table"
|