false, 'include_empty' => true, 'exclude' => '', 'info' => '', // which columns? default: list of pagenames only 'sortby' => '', // +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=WikiAdmin,.SecretUser // // include_empty shows also users which stored their preferences, // but never saved their homepage // // sortby: [+|-] pagename|mtime|hits function run($dbi, $argstr, &$request, $basepage) { extract($this->getArgs($argstr, $request)); if ($sorted = $request->getArg('sortby')) $sortby = $sorted; elseif ($sortby) $request->setArg('sortby',$sortby); $pagelist = new PageList($info, $exclude, $this->getArgs($argstr, $request)); if (!$noheader) $pagelist->setCaption(_("Authenticated users on this wiki (%d total):")); // deleted pages show up as version 0. if ($include_empty and empty($info)) $pagelist->_addColumn('version'); //if (defined('DEBUG') and DEBUG) $debug = true; if ($debug) $timer = new DebugTimer; $group = WikiGroup::getGroup($request); foreach ($group->_allUsers() as $user) { $pagelist->addPage($user); } /* $page_iter = $dbi->getAllPages($include_empty, $sortby, $limit); while ($page = $page_iter->next()) { if ($page->isUserPage($include_empty)) $pagelist->addPage($page); } */ if ($debug) { return HTML($pagelist, HTML::p(fmt("Elapsed time: %s s", $timer->getStats()))); } else { return $pagelist; } } }; // $Log: not supported by cvs2svn $ // Revision 1.9 2004/02/22 23:20:33 rurban // fixed DumpHtmlToDir, // enhanced sortby handling in PageList // new button_heading th style (enabled), // added sortby and limit support to the db backends and plugins // for paging support (<> links on long lists) // // Revision 1.8 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.7 2003/12/21 00:29:45 carstenklapp // Minor bugfix: Fixed broken debug argument. // // Internal changes: Only create a DebugTimer when actually called for; // moved debug message out of page content and into deferred page error // notification via trigger_error. Memory management: Only include_once // lib/PageList when absolutely necessary (at this time, this will // probably only benefit the PluginManager as an incremental speedup & // slightly reduced memory). // // Revision 1.6 2003/02/27 20:10:31 dairiki // Disable profiling output when DEBUG is defined but false. // // Revision 1.5 2003/02/21 04:08:26 dairiki // New class DebugTimer in prepend.php to help report timing. // // Revision 1.4 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: ?>