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_DebugGroupInfo
29 function getDescription()
31 return sprintf(_("Show Group Information."));
34 function getDefaultArguments()
41 * @param string $argstr
42 * @param WikiRequest $request
43 * @param string $basepage
46 function run($dbi, $argstr, &$request, $basepage)
48 $args = $this->getArgs($argstr, $request);
51 $output = HTML(HTML::h1("Group Info"));
53 $group = WikiGroup::getGroup();
54 $allGroups = $group->getAllGroupsIn();
56 foreach ($allGroups as $g) {
57 $members = $group->getMembersOf($g);
58 $output->pushContent(HTML::h2($g . " - members: " .
59 sizeof($members) . " - isMember: " . ($group->isMember($g) ? "yes" : "no")
61 foreach ($members as $m) {
62 $output->pushContent($m);
63 $output->pushContent(HTML::br());
66 $output->pushContent(HTML::p("--- the end ---"));