2 rcs_id('$Id: AllPages.php,v 1.13 2002-08-27 21:51:31 rurban 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,
27 // info arg allows multiple columns info=mtime,hits,summary,version,author,locked,minor,markup or all
28 // exclude arg allows multiple pagenames exclude=HomePage,RecentChanges
30 function run($dbi, $argstr, $request) {
31 extract($this->getArgs($argstr, $request));
33 $pagelist = new PageList($info, $exclude);
35 $pagelist->setCaption(_("Pages in this wiki (%d total):"));
37 // deleted pages show up as version 0.
39 $pagelist->_addColumn('version');
44 if ($debug) $time_start = $this->getmicrotime();
46 $pagelist->addPages( $dbi->getAllPages($include_empty) );
48 if ($debug) $time_end = $this->getmicrotime();
51 $time = round($time_end - $time_start, 3);
52 return HTML($pagelist,HTML::p(fmt("Elapsed time: %s s", $time)));
58 function getmicrotime(){
59 list($usec, $sec) = explode(" ",microtime());
60 return (float)$usec + (float)$sec;
68 // c-hanging-comment-ender-p: nil
69 // indent-tabs-mode: nil