false, 'include_empty' => false, 'exclude' => '', 'info' => '', 'sortby' => 'pagename', // +mtime,-pagename 'limit' => 0, '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, $basepage) { extract($this->getArgs($argstr, $request)); // Todo: extend given _GET args if ($sorted = $request->getArg('sortby')) $sortby = $sorted; elseif ($sortby) $request->setArg('sortby',$sortby); $pagelist = new PageList($info, $exclude, $this->getArgs($argstr, $request)); //if (!$sortby) $sorted='pagename'; if (!$noheader) $pagelist->setCaption(_("Pages in this wiki (%d total):")); // deleted pages show up as version 0. if ($include_empty) $pagelist->_addColumn('version'); //if (defined('DEBUG') and DEBUG) $debug = true; if ($debug) $timer = new DebugTimer; $pagelist->addPages( $dbi->getAllPages($include_empty, $sortby, $limit) ); if ($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.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, ...) // // Revision 1.18 2004/01/25 07:58:30 rurban // PageList sortby support in PearDB and ADODB backends // // Revision 1.17 2003/02/27 20:10:30 dairiki // Disable profiling output when DEBUG is defined but false. // // 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: ?>