false, 'include_empty' => false, 'exclude' => '', 'info' => '', 'sortby' => '', // +mtime,-pagename 'debug' => false ); } // info arg allows multiple columns // info=mtime,hits,summary,version,author,locked,minor,markup or all // exclude arg allows multiple pagenames exclude=HomePage,RecentChanges // sortby: [+|-] pagename|mtime|hits function run($dbi, $argstr, $request) { extract($this->getArgs($argstr, $request)); // Todo: extend given _GET args if ($sortby) $request->setArg('sortby',$sortby); $pagelist = new PageList($info, $exclude); if (!$noheader) $pagelist->setCaption(_("Pages in this wiki (%d total):")); // deleted pages show up as version 0. if ($include_empty) $pagelist->_addColumn('version'); $timer = new DebugTimer; $pagelist->addPages( $dbi->getAllPages($include_empty) ); if (defined('DEBUG') and DEBUG) { return HTML($pagelist, HTML::p(fmt("Elapsed time: %s s", $timer->getStats()))); } else { return $pagelist; } } function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return (float)$usec + (float)$sec; } }; // $Log: not supported by cvs2svn $ // Revision 1.16 2003/02/21 04:08:26 dairiki // New class DebugTimer in prepend.php to help report timing. // // Revision 1.15 2003/01/18 21:19:25 carstenklapp // Code cleanup: // Reformatting; added copyleft, getVersion, getDescription // // Local Variables: // mode: php // tab-width: 8 // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: ?>