]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/plugin/RecentChangesCached.php
added SubPages support: see SUBPAGE_SEPERATOR in index.php
[SourceForge/phpwiki.git] / lib / plugin / RecentChangesCached.php
1 <?php // -*-php-*-
2 // +---------------------------------------------------------------------+
3 // | WikiPluginCached.php                                                |
4 // +---------------------------------------------------------------------+
5 // | Copyright (C) 2002 Johannes Große (Johannes Gro&szlig;e)            |
6 // | You may copy this code freely under the conditions of the GPL       |
7 // +---------------------------------------------------------------------+
8
9 /* There is a bug in it:
10    When the cache is empty and you safe the wikipages,
11    an immediately created cached output of 
12    RecentChanges will at the rss-image-link include 
13    an action=edit
14 */
15
16
17 require_once "lib/WikiPluginCached.php";
18 require_once "lib/plugin/RecentChanges.php";
19
20 class WikiPlugin_RecentChangesCached extends WikiPluginCached
21 {   
22     /* --------- overwrite virtual or abstract methods ---------------- */
23     function getPluginType() {
24         return PLUGIN_CACHED_HTML;
25     }
26  
27     function getName() {
28         return "RecentChangesCached";
29     }
30
31     function getDescription() {
32         return 'Caches output of RecentChanges called with default arguments.';
33     }
34
35     function getDefaultArguments() {
36         return WikiPlugin_RecentChanges::getDefaultArguments();
37     }
38
39     function getExpire($dbi, $argarray, $request) {
40         return '+900'; // 15 minutes
41     }
42
43     function getHtml($dbi, $argarray, $request) {
44         $loader = new WikiPluginLoader;
45         return $loader->expandPI('<?plugin RecentChanges '
46             . WikiPluginCached::glueArgs($argarray) 
47             . ' ?>',$request);            
48     }
49
50 } // WikiPlugin_TexToPng
51
52
53
54 // For emacs users
55 // Local Variables:
56 // mode: php
57 // tab-width: 4
58 // c-basic-offset: 4
59 // c-hanging-comment-ender-p: nil
60 // indent-tabs-mode: nil
61 // End:
62 ?>