2 rcs_id('$Id: AllUsers.php,v 1.8 2004-02-17 12:11:36 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
26 * We currently don't get externally authenticated users which didn't
27 * 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 getVersion() {
41 return preg_replace("/[Revision: $]/", '',
45 function getDefaultArguments() {
46 return array('noheader' => false,
47 'include_empty' => true,
50 'sortby' => '', // +mtime,-pagename
54 // info arg allows multiple columns
55 // info=mtime,hits,summary,version,author,locked,minor,markup or all
56 // exclude arg allows multiple pagenames exclude=WikiAdmin,.SecretUser
58 // include_empty shows also users which stored their preferences,
59 // but never saved their homepage
61 // sortby: [+|-] pagename|mtime|hits
63 function run($dbi, $argstr, &$request, $basepage) {
64 extract($this->getArgs($argstr, $request));
65 // Todo: extend given _GET args
67 $request->setArg('sortby',$sortby);
69 include_once('lib/PageList.php');
70 $pagelist = new PageList($info, $exclude);
72 $pagelist->setCaption(_("Authenticated users on this wiki (%d total):"));
74 // deleted pages show up as version 0.
76 $pagelist->_addColumn('version');
78 if (defined('DEBUG') and DEBUG)
82 $timer = new DebugTimer;
84 $page_iter = $dbi->getAllPages($include_empty);
85 while ($page = $page_iter->next()) {
86 if ($page->isUserPage($include_empty))
87 $pagelist->addPage($page);
91 // Not totally localization-friendly but it's only a
93 trigger_error("DEBUG: " . get_class($this) . ": "
94 . sprintf(_("Elapsed time: %s s"),
102 // $Log: not supported by cvs2svn $
103 // Revision 1.7 2003/12/21 00:29:45 carstenklapp
104 // Minor bugfix: Fixed broken debug argument.
106 // Internal changes: Only create a DebugTimer when actually called for;
107 // moved debug message out of page content and into deferred page error
108 // notification via trigger_error. Memory management: Only include_once
109 // lib/PageList when absolutely necessary (at this time, this will
110 // probably only benefit the PluginManager as an incremental speedup &
111 // slightly reduced memory).
113 // Revision 1.6 2003/02/27 20:10:31 dairiki
114 // Disable profiling output when DEBUG is defined but false.
116 // Revision 1.5 2003/02/21 04:08:26 dairiki
117 // New class DebugTimer in prepend.php to help report timing.
119 // Revision 1.4 2003/01/18 21:19:25 carstenklapp
121 // Reformatting; added copyleft, getVersion, getDescription
128 // c-hanging-comment-ender-p: nil
129 // indent-tabs-mode: nil