2 rcs_id('$Id: AllPages.php,v 1.6 2002-01-30 18:26:04 carstenklapp Exp $');
4 require_once('lib/PageList.php');
8 class WikiPlugin_AllPages
15 function getDescription () {
16 return _("All Pages");
19 function getDefaultArguments() {
20 return array('noheader' => false,
21 'include_empty' => false,
22 'pagename' => '[pagename]', // hackish
24 'include_self' => 1, // hackish
28 // info arg allows multiple columns info=mtime,hits,summary,version,author,locked,minor
29 // exclude arg allows multiple pagenames exclude=HomePage,RecentChanges
31 function run($dbi, $argstr, $request) {
32 extract($this->getArgs($argstr, $request));
34 $pagelist = new PageList();
37 foreach (explode(",", $info) as $col)
38 $pagelist->insertColumn($col);
40 if ($include_self==false || $include_self==0 )
41 $pagelist->excludePageName($pagename); // hackish
43 foreach (explode(",", $exclude) as $excludepage)
44 $pagelist->excludePageName($excludepage);
47 $pagelist->setCaption(_("Pages in this wiki (%d total):"));
49 $pages = $dbi->getAllPages($include_empty);
51 while ($page = $pages->next())
52 $pagelist->addPage($page);
62 // c-hanging-comment-ender-p: nil
63 // indent-tabs-mode: nil