From: <var...@us...> - 2022-02-07 12:08:19
|
Revision: 10985 http://sourceforge.net/p/phpwiki/code/10985 Author: vargenau Date: 2022-02-07 12:08:16 +0000 (Mon, 07 Feb 2022) Log Message: ----------- Same prototype for get_all_pages Modified Paths: -------------- trunk/lib/WikiDB/backend.php trunk/lib/WikiDB.php Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2022-02-05 17:52:43 UTC (rev 10984) +++ trunk/lib/WikiDB/backend.php 2022-02-07 12:08:16 UTC (rev 10985) @@ -303,7 +303,7 @@ * @param string $exclude * @return object A WikiDB_backend_iterator. */ - abstract function get_all_pages($include_empty, + abstract function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = ''); /** @@ -336,7 +336,7 @@ // this method with something more efficient. include_once 'lib/WikiDB/backend/dumb/TextSearchIter.php'; // ignore $limit - $pages = $this->get_all_pages(false, $sortby, false, $exclude); + $pages = $this->get_all_pages(false, $sortby, '', $exclude); return new WikiDB_backend_dumb_TextSearchIter($this, $pages, $search, $fulltext, array('limit' => $limit, 'exclude' => $exclude)); @@ -379,7 +379,7 @@ // It is expected that most backends will overload // method with something more efficient. include_once 'lib/WikiDB/backend/dumb/MostPopularIter.php'; - $pages = $this->get_all_pages(false, $sortby, false); + $pages = $this->get_all_pages(false, $sortby); return new WikiDB_backend_dumb_MostPopularIter($this, $pages, $limit); } @@ -406,7 +406,7 @@ public function wanted_pages($exclude = '', $sortby = '', $limit = '') { include_once 'lib/WikiDB/backend/dumb/WantedPagesIter.php'; - $allpages = $this->get_all_pages(true, false, false, $exclude_from); + $allpages = $this->get_all_pages(); return new WikiDB_backend_dumb_WantedPagesIter($this, $allpages, $exclude, $sortby, $limit); } Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2022-02-05 17:52:43 UTC (rev 10984) +++ trunk/lib/WikiDB.php 2022-02-07 12:08:16 UTC (rev 10985) @@ -301,8 +301,7 @@ */ public function getAllPages($include_empty = false, $sortby = '', $limit = '', $exclude = '') { - $result = $this->_backend->get_all_pages($include_empty, $sortby, $limit, - $exclude); + $result = $this->_backend->get_all_pages($include_empty, $sortby, $limit, $exclude); return new WikiDB_PageIterator($this, $result, array('include_empty' => $include_empty, 'exclude' => $exclude, @@ -444,7 +443,7 @@ /** * @param string $exclude * @param string $sortby Optional. "+-column,+-column2". - * If false the result is faster in natural order. + * If empty string the result is faster in natural order. * @param string $limit Optional. Encoded as "$offset,$count". * $offset defaults to 0. * @return WikiDB_backend_dumb_WantedPagesIter A generic iterator containing rows of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |