2 rcs_id('$Id: PageInfo.php,v 1.2 2003-01-04 23:27:39 carstenklapp Exp $');
5 Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam
7 This file is part of PhpWiki.
9 PhpWiki is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 PhpWiki is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with PhpWiki; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * An ActionPage plugin which returns extra information about a page.
26 * This plugin just passes a page revision handle to the Template
27 * 'info.tmpl', which does all the real work.
29 class WikiPlugin_PageInfo
36 function getDescription () {
37 return sprintf(_("Show extra page Info and statistics for %s"),
41 function getVersion() {
42 return preg_replace("/[Revision: $]/", '',
46 function getDefaultArguments() {
47 return array('page' => '[pagename]');
50 function run ($dbi, $argstr, $request) {
51 $args = $this->getArgs($argstr, $request);
55 if (! $dbi->isWikiPage($pagename))
56 return fmt("I'm sorry, there is no such page as %s.",
57 WikiLink($pagename, 'unknown'));
59 $page = $request->getPage();
61 if (!empty($version)) {
62 if (!($revision = $page->getRevision($version)))
63 NoSuchRevision($request, $page, $version);
66 $revision = $page->getCurrentRevision();
69 $template = new Template('info', $request,
70 array('revision' => $revision));
75 // $Log: not supported by cvs2svn $
77 // (c-file-style: "gnu")
82 // c-hanging-comment-ender-p: nil
83 // indent-tabs-mode: nil