]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/RecentEdits.php
access-restrictions are not implemented
[SourceForge/phpwiki.git] / lib / plugin / RecentEdits.php
1 <?php
2
3 /*
4  * Copyright (C) 2004 $ThePhpWikiProgrammingTeam
5  *
6  * This file is part of PhpWiki.
7  *
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.
12  *
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.
17  *
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.
21  */
22
23 require_once 'lib/plugin/RecentChanges.php';
24
25 class WikiPlugin_RecentEdits
26     extends WikiPlugin_RecentChanges
27 {
28     function getName()
29     {
30         return _("RecentEdits");
31     }
32
33     function getDescription()
34     {
35         return _("List all recent edits in this wiki.");
36     }
37
38     function getDefaultArguments()
39     {
40         $args = parent::getDefaultArguments();
41         $args['show_minor'] = true;
42         $args['show_all'] = true;
43         return $args;
44     }
45
46     // box is used to display a fixed-width, narrow version with common header.
47     // just a numbered list of limit pagenames, without date.
48     function box($args = false, $request = false, $basepage = false)
49     {
50         if (!$request) $request =& $GLOBALS['request'];
51         if (!isset($args['limit'])) $args['limit'] = 15;
52         $args['format'] = 'box';
53         $args['show_minor'] = true;
54         $args['show_major'] = true;
55         $args['show_deleted'] = false;
56         $args['show_all'] = true;
57         $args['days'] = 90;
58         return $this->makeBox(WikiLink(_("RecentEdits"), '', _("Recent Edits")),
59             $this->format($this->getChanges($request->_dbi, $args), $args));
60     }
61 }
62
63 // Local Variables:
64 // mode: php
65 // tab-width: 8
66 // c-basic-offset: 4
67 // c-hanging-comment-ender-p: nil
68 // indent-tabs-mode: nil
69 // End: