2 rcs_id('$Id: AllUsers.php,v 1.1 2002-08-23 18:29:30 rurban Exp $');
4 Copyright 2002 $ThePhpWikiProgrammingTeam
6 This file is part of PhpWiki.
8 PhpWiki is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 PhpWiki is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with PhpWiki; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 require_once('lib/PageList.php');
27 * We currently don't get externally authenticated users which didn't store their Preferences.
29 class WikiPlugin_AllUsers
36 function getDescription () {
37 return _("With external authentication all users which stored their Preferences. Without external authentication all once signed-in users (from version 1.3.4 on).");
40 function getDefaultArguments() {
41 return array('noheader' => false,
42 'include_empty' => true,
48 // info arg allows multiple columns info=mtime,hits,summary,version,author,locked,minor,markup or all
49 // exclude arg allows multiple pagenames exclude=WikiAdmin,.SecretUser
50 // include_empty shows also users which stored their preferences, but never saved their homepage
52 function run($dbi, $argstr, $request) {
53 extract($this->getArgs($argstr, $request));
55 $pagelist = new PageList($info, $exclude);
57 $pagelist->setCaption(_("Authenticated users on this wiki (%d total):"));
59 // deleted pages show up as version 0.
61 $pagelist->_addColumn('version');
66 if ($debug) $time_start = $this->getmicrotime();
67 $page_iter = $dbi->getAllPages($include_empty);
68 while ($page = $page_iter->next()) {
69 if ($page->isUserPage($include_empty))
70 $pagelist->addPage($page);
73 if ($debug) $time_end = $this->getmicrotime();
76 $time = round($time_end - $time_start, 3);
77 return HTML::p($pagelist, fmt("elapsed time: %s s", $time));
83 function getmicrotime(){
84 list($usec, $sec) = explode(" ",microtime());
85 return (float)$usec + (float)$sec;
93 // c-hanging-comment-ender-p: nil
94 // indent-tabs-mode: nil