2 rcs_id('$Id: AllPages.php,v 1.10 2002-02-06 17:01:07 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,
27 // info arg allows multiple columns info=mtime,hits,summary,version,author,locked,minor
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):"));
40 if ($debug) $time_start = $this->getmicrotime();
42 $pagelist->addPages( $dbi->getAllPages($include_empty) );
44 if ($debug) $time_end = $this->getmicrotime();
47 $time = $time_end - $time_start;
48 return HTML::p(fmt("elapsed time: %s s", $time), $pagelist);
54 function getmicrotime(){
55 list($usec, $sec) = explode(" ",microtime());
56 return ((float)$usec + (float)$sec);
64 // c-hanging-comment-ender-p: nil
65 // indent-tabs-mode: nil