]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MacOSX/lib/RecentChanges.php
Reformat code
[SourceForge/phpwiki.git] / themes / MacOSX / lib / RecentChanges.php
1 <?php
2 /*
3  * Extensions/modifications to the stock RecentChanges (and PageHistory) format.
4  */
5
6 require_once 'lib/plugin/RecentChanges.php';
7 require_once 'lib/plugin/PageHistory.php';
8
9 function MacOSX_RC_revision_formatter(&$fmt, &$rev)
10 {
11     $class = 'rc-' . $fmt->importance($rev);
12
13     return HTML::li(array('class' => $class),
14         $fmt->diffLink($rev), ' ',
15         $fmt->pageLink($rev), ' ',
16         $rev->get('is_minor_edit') ? $fmt->time($rev) : HTML::strong($fmt->time($rev)),
17         ' . . . ',
18         $fmt->summaryAsHTML($rev),
19         ' -- ',
20         $fmt->authorLink($rev));
21 }
22
23 function MacOSX_PH_revision_formatter(&$fmt, &$rev)
24 {
25     $class = 'rc-' . $fmt->importance($rev);
26
27     return HTML::li(array('class' => $class),
28         $fmt->diffLink($rev), ' ',
29         $fmt->pageLink($rev), ' ',
30         $rev->get('is_minor_edit') ? $fmt->time($rev) : HTML::strong($fmt->time($rev)),
31         ' . . . ',
32         $fmt->summaryAsHTML($rev),
33         ' -- ',
34         $fmt->authorLink($rev),
35         $rev->get('is_minor_edit') ? HTML::em(" (" . _("minor edit") . ")") : '');
36 }
37
38 class _MacOSX_RecentChanges_Formatter
39     extends _RecentChanges_HtmlFormatter
40 {
41     function format_revision(&$rev)
42     {
43         return MacOSX_RC_revision_formatter($this, $rev);
44     }
45 }
46
47 class _MacOSX_PageHistory_Formatter
48     extends _PageHistory_HtmlFormatter
49 {
50     function format_revision(&$rev)
51     {
52         return MacOSX_PH_revision_formatter($this, $rev);
53     }
54 }
55
56 // Local Variables:
57 // mode: php
58 // tab-width: 8
59 // c-basic-offset: 4
60 // c-hanging-comment-ender-p: nil
61 // indent-tabs-mode: nil
62 // End: