From d2bc95010e37fd9d72fdd18791de9fce49c0649d Mon Sep 17 00:00:00 2001 From: rurban Date: Sat, 25 Sep 2004 16:37:18 +0000 Subject: [PATCH] add support for all PageList options git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@3989 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/AllUsers.php | 23 ++++++++++++----------- lib/plugin/BackLinks.php | 20 ++++++++++++-------- lib/plugin/LikePages.php | 27 +++++++++++++++------------ lib/plugin/ListPages.php | 20 +++++++++++++------- lib/plugin/MostPopular.php | 31 +++++++++++++++++++++---------- 5 files changed, 73 insertions(+), 48 deletions(-) diff --git a/lib/plugin/AllUsers.php b/lib/plugin/AllUsers.php index 9e120b94e..abe1d453b 100644 --- a/lib/plugin/AllUsers.php +++ b/lib/plugin/AllUsers.php @@ -1,5 +1,5 @@ false, - 'include_empty' => true, - 'exclude' => '', - 'info' => '', // which columns? default: list of pagenames only - 'sortby' => '', // +mtime,-pagename - 'limit' => 50, - 'paging' => 'auto', - 'debug' => false - ); + return array_merge + ( + PageList::supportedArgs(), + array('noheader' => false, + 'include_empty' => true, + 'debug' => false + )); } // info arg allows multiple columns // info=mtime,hits,summary,version,author,locked,minor,markup or all @@ -117,6 +115,9 @@ extends WikiPlugin }; // $Log: not supported by cvs2svn $ +// Revision 1.15 2004/07/08 13:50:33 rurban +// various unit test fixes: print error backtrace on _DEBUG_TRACE; allusers fix; new PHPWIKI_NOMAIN constant for omitting the mainloop +// // Revision 1.14 2004/06/25 14:29:22 rurban // WikiGroup refactoring: // global group attached to user, code for not_current user. diff --git a/lib/plugin/BackLinks.php b/lib/plugin/BackLinks.php index 67e677894..0b7dc2d22 100644 --- a/lib/plugin/BackLinks.php +++ b/lib/plugin/BackLinks.php @@ -1,5 +1,5 @@ '', - 'include_self' => false, - 'noheader' => false, - 'page' => '[pagename]', - 'info' => false - ); + return array_merge + ( + PageList::supportedArgs(), + array('include_self' => false, + 'noheader' => false, + 'page' => '[pagename]', + )); } // info arg allows multiple columns @@ -144,6 +145,9 @@ class _PageList_Column_BackLinks_count extends _PageList_Column { // $Log: not supported by cvs2svn $ +// Revision 1.26 2004/09/14 10:32:32 rurban +// support exclude = plugin-list +// // Revision 1.25 2004/09/13 15:00:50 rurban // info=count: number of links at this subpage // diff --git a/lib/plugin/LikePages.php b/lib/plugin/LikePages.php index a232b4440..925c7516b 100644 --- a/lib/plugin/LikePages.php +++ b/lib/plugin/LikePages.php @@ -1,5 +1,5 @@ '[pagename]', - 'prefix' => false, - 'suffix' => false, - 'exclude' => '', - 'noheader' => false, - 'info' => '' - ); + return array_merge + ( + PageList::supportedArgs(), + array('page' => '[pagename]', + 'prefix' => false, + 'suffix' => false, + 'exclude' => '', + 'noheader' => false, + )); } // info arg allows multiple columns // info=mtime,hits,summary,version,author,locked,minor @@ -98,12 +100,10 @@ extends WikiPlugin $match_re = '/' . join('|', $match) . '/'; - $pagelist = new PageList($info, $exclude); + $pagelist = new PageList($info, $exclude, $args); if (!$noheader) $pagelist->setCaption($descrip); - $pages = $dbi->titleSearch($query); - while ($page = $pages->next()) { $name = $page->getName(); if (!preg_match($match_re, $name)) @@ -120,6 +120,9 @@ extends WikiPlugin }; // $Log: not supported by cvs2svn $ +// Revision 1.20 2004/05/18 16:23:40 rurban +// rename split_pagename to SplitPagename +// // Revision 1.19 2004/02/17 12:11:36 rurban // added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) // diff --git a/lib/plugin/ListPages.php b/lib/plugin/ListPages.php index a21922884..15e17002e 100755 --- a/lib/plugin/ListPages.php +++ b/lib/plugin/ListPages.php @@ -1,5 +1,5 @@ false, - 'exclude' => false, - 'info' => 'pagename,top3recs', - 'dimension' => 0, - ); + return array_merge + ( + PageList::supportedArgs(), + array('pages' => false, + 'exclude' => false, + 'info' => 'pagename,top3recs', + 'dimension' => 0, + )); } // info arg allows multiple columns @@ -149,6 +152,9 @@ class _PageList_Column_ListPages_count extends _PageList_Column { } // $Log: not supported by cvs2svn $ +// Revision 1.6 2004/09/14 10:33:39 rurban +// simplify exclude, add numbacklinks+numpagelinks +// // Revision 1.5 2004/09/06 08:37:31 rurban // plugin-list support for pages and exclude args // diff --git a/lib/plugin/MostPopular.php b/lib/plugin/MostPopular.php index bba9f87e9..942fa0dcd 100644 --- a/lib/plugin/MostPopular.php +++ b/lib/plugin/MostPopular.php @@ -1,5 +1,5 @@ '[pagename]', // hackish - 'exclude' => '', - 'limit' => 20, // limit <0 returns least popular pages - 'noheader' => 0, - 'sortby' => 'hits', - 'info' => false, - 'paging' => 'auto' - ); + return array_merge + ( + PageList::supportedArgs(), + array('pagename' => '[pagename]', // hackish + 'exclude' => '', + 'limit' => 20, // limit <0 returns least popular pages + 'noheader' => 0, + 'sortby' => 'hits', + 'info' => false, + 'paging' => 'auto' + )); } // info arg allows multiple columns @@ -104,6 +107,14 @@ extends WikiPlugin }; // $Log: not supported by cvs2svn $ +// Revision 1.28 2004/04/20 18:10:55 rurban +// config refactoring: +// FileFinder is needed for WikiFarm scripts calling index.php +// config run-time calls moved to lib/IniConfig.php:fix_configs() +// added PHPWIKI_DIR smart-detection code (Theme finder) +// moved FileFind to lib/FileFinder.php +// cleaned lib/config.php +// // Revision 1.27 2004/04/20 00:06:53 rurban // paging support // -- 2.45.0