]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/RecentChangesCached.php
Code cleanup:
[SourceForge/phpwiki.git] / lib / plugin / RecentChangesCached.php
1 <?php // -*-php-*-
2 rcs_id('$Id: RecentChangesCached.php,v 1.2 2003-01-18 22:01:44 carstenklapp Exp $');
3 /**
4  Copyright 1999, 2000, 2001, 2002 $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
19  along with PhpWiki; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 // +---------------------------------------------------------------------+
24 // | WikiPluginCached.php                                                |
25 // +---------------------------------------------------------------------+
26 // | Copyright (C) 2002 Johannes Große (Johannes Gro&szlig;e)            |
27 // | You may copy this code freely under the conditions of the GPL       |
28 // +---------------------------------------------------------------------+
29
30 /* There is a bug in it:
31    When the cache is empty and you safe the wikipages,
32    an immediately created cached output of
33    RecentChanges will at the rss-image-link include
34    an action=edit
35 */
36
37
38 require_once "lib/WikiPluginCached.php";
39 require_once "lib/plugin/RecentChanges.php";
40
41 class WikiPlugin_RecentChangesCached
42 extends WikiPluginCached
43 {
44     /* --------- overwrite virtual or abstract methods ---------------- */
45     function getPluginType() {
46         return PLUGIN_CACHED_HTML;
47     }
48
49     function getName() {
50         return "RecentChangesCached";
51     }
52
53     function getDescription() {
54         return 'Caches output of RecentChanges called with default arguments.';
55     }
56
57     function getVersion() {
58         return preg_replace("/[Revision: $]/", '',
59                             "\$Revision: 1.2 $");
60     }
61
62     function getDefaultArguments() {
63         return WikiPlugin_RecentChanges::getDefaultArguments();
64     }
65
66     function getExpire($dbi, $argarray, $request) {
67         return '+900'; // 15 minutes
68     }
69
70     function getHtml($dbi, $argarray, $request) {
71         $loader = new WikiPluginLoader;
72         return $loader->expandPI('<?plugin RecentChanges '
73             . WikiPluginCached::glueArgs($argarray)
74             . ' ?>', $request);
75     }
76
77 } // WikiPlugin_TexToPng
78
79 // $Log: not supported by cvs2svn $
80
81 // For emacs users
82 // Local Variables:
83 // mode: php
84 // tab-width: 4
85 // c-basic-offset: 4
86 // c-hanging-comment-ender-p: nil
87 // indent-tabs-mode: nil
88 // End:
89 ?>