4 * Copyright 2004 $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 along
19 * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * @author: Charles Corrigan
26 class WikiPlugin__GroupInfo
30 return _("DebugGroupInfo");
33 function getDescription () {
34 return sprintf(_("Show Group Information"));
37 function getDefaultArguments() {
41 function run($dbi, $argstr, &$request, $basepage) {
42 $args = $this->getArgs($argstr, $request);
45 $output = HTML(HTML::h1("Group Info"));
47 $group = WikiGroup::getGroup();
48 $allGroups = $group->getAllGroupsIn();
50 foreach ($allGroups as $g) {
51 $members = $group->getMembersOf($g);
52 $output->pushContent(HTML::h3($g . " - members: " .
53 sizeof($members) . " - isMember: " . ($group->isMember($g) ? "yes" : "no")
55 foreach($members as $m) {
56 $output->pushContent($m);
57 $output->pushContent(HTML::br());
60 $output->pushContent(HTML::p("--- the end ---"));