From: <var...@us...> - 2015-01-06 16:56:37
|
Revision: 9456 http://sourceforge.net/p/phpwiki/code/9456 Author: vargenau Date: 2015-01-06 16:56:26 +0000 (Tue, 06 Jan 2015) Log Message: ----------- function text_search must be public (reported by Harold Hallikainen); harmonize parameters Modified Paths: -------------- trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/PearDB_ffpgsql.php trunk/lib/WikiDB/backend/PearDB_pgsql.php trunk/lib/WikiDB/backend/cvs.php trunk/lib/WikiDB/backend.php Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2015-01-06 16:19:51 UTC (rev 9455) +++ trunk/lib/WikiDB/backend/ADODB.php 2015-01-06 16:56:26 UTC (rev 9456) @@ -845,7 +845,8 @@ return $row[0]; } - function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + public function get_all_pages($include_empty = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); @@ -909,8 +910,8 @@ /** * Title and fulltext search. */ - function text_search($search, $fullsearch = false, - $sortby = '', $limit = '', $exclude = '') + public function text_search($search, $fulltext = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); @@ -923,7 +924,7 @@ $field_list = $this->page_tbl_field_list; $searchobj = new WikiDB_backend_ADODB_search($search, $dbh); - if ($fullsearch) { + if ($fulltext) { $table .= ", $recent_tbl"; $join_clause .= " AND $page_tbl.id=$recent_tbl.id"; @@ -950,7 +951,7 @@ $result = $dbh->Execute($sql); } $iter = new WikiDB_backend_ADODB_iter($this, $result, $field_list); - if ($fullsearch) + if ($fulltext) $iter->stoplisted = $searchobj->stoplisted; return $iter; } Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2015-01-06 16:19:51 UTC (rev 9455) +++ trunk/lib/WikiDB/backend/PDO.php 2015-01-06 16:56:26 UTC (rev 9456) @@ -832,7 +832,8 @@ return $sth->fetchColumn(); } - function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + public function get_all_pages($include_empty = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); @@ -888,8 +889,8 @@ /** * Title and fulltext search. */ - function text_search($search, $fullsearch = false, - $sortby = '', $limit = '', $exclude = '') + public function text_search($search, $fulltext = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); @@ -903,7 +904,7 @@ $field_list = $this->page_tbl_field_list; $searchobj = new WikiDB_backend_PDO_search($search, $dbh); - if ($fullsearch) { + if ($fulltext) { $table .= ", $recent_tbl"; $join_clause .= " AND $page_tbl.id=$recent_tbl.id"; Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2015-01-06 16:19:51 UTC (rev 9455) +++ trunk/lib/WikiDB/backend/PearDB.php 2015-01-06 16:56:26 UTC (rev 9456) @@ -648,7 +648,8 @@ return $row['result']; } - function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + public function get_all_pages($include_empty = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); @@ -707,11 +708,11 @@ } /** - * Title search. + * Text search (title or full text) * Todo: exclude */ - function text_search($search, $fulltext = false, $sortby = '', $limit = '', - $exclude = '') + public function text_search($search, $fulltext = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2015-01-06 16:19:51 UTC (rev 9455) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2015-01-06 16:56:26 UTC (rev 9456) @@ -317,7 +317,8 @@ return new WikiDB_backend_PearDB_iter($this, $result); } - function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + public function get_all_pages($include_empty = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); @@ -584,10 +585,10 @@ } /** - * Title search. + * Text search (title or full text) */ - function text_search($search, $fulltext = false, $sortby = '', $limit = '', - $exclude = '') + public function text_search($search, $fulltext = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); Modified: trunk/lib/WikiDB/backend/PearDB_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-01-06 16:19:51 UTC (rev 9455) +++ trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-01-06 16:56:26 UTC (rev 9456) @@ -217,10 +217,10 @@ } /** - * Title search. + * Text search (title or full text) */ - function text_search($search, $fulltext = false, $sortby = '', $limit = '', - $exclude = '') + public function text_search($search, $fulltext = false, + $sortby = '', $limit = '', $exclude = '') { $dbh = &$this->_dbh; extract($this->_table_names); Modified: trunk/lib/WikiDB/backend/cvs.php =================================================================== --- trunk/lib/WikiDB/backend/cvs.php 2015-01-06 16:19:51 UTC (rev 9455) +++ trunk/lib/WikiDB/backend/cvs.php 2015-01-06 16:56:26 UTC (rev 9456) @@ -407,16 +407,18 @@ return new WikiDB_backend_dumb_AllRevisionsIter($this, $pagename); } */ - function get_all_pages($include_empty = false, $orderby = false, $limit = '', $exclude = '') + public function get_all_pages($include_empty = false, + $sortby = '', $limit = '', $exclude = '') { // FIXME: this ignores the parameters. return new Cvs_Backend_Array_Iterator( $this->_getAllFileNamesInDir($this->_docDir)); } - function text_search($search, $fullsearch = false, $orderby = false, $limit = '', $exclude = '') + public function text_search($search, $fulltext = false, + $sortby = '', $limit = '', $exclude = '') { - if ($fullsearch) { + if ($fulltext) { $iter = new Cvs_Backend_Full_Search_Iterator( $this->_getAllFileNamesInDir($this->_docDir), $search, Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2015-01-06 16:19:51 UTC (rev 9455) +++ trunk/lib/WikiDB/backend.php 2015-01-06 16:56:26 UTC (rev 9456) @@ -307,7 +307,7 @@ * Pages should be returned in alphabetical order if that is * feasible. * - * @param bool $include_defaulted + * @param bool $include_empty * If set, even pages with no content will be returned * --- but still only if they have at least one revision (not * counting the default revision 0) entered in the database. @@ -316,12 +316,13 @@ * are not returned as these pages are considered to be * non-existing. * - * @param bool $orderby + * @param string $sortby * @param string $limit * @param string $exclude * @return object A WikiDB_backend_iterator. */ - abstract public function get_all_pages($include_defaulted, $orderby = false, $limit = '', $exclude = ''); + abstract public function get_all_pages($include_empty, + $sortby = '', $limit = '', $exclude = ''); /** * Title or full text search. @@ -343,8 +344,8 @@ * * @see WikiDB::titleSearch */ - protected function text_search($search, $fulltext = false, $sortby = '', - $limit = '', $exclude = '') + public function text_search($search, $fulltext = false, + $sortby = '', $limit = '', $exclude = '') { // This method implements a simple linear search // through all the pages in the database. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |