Index: trunk/extensions/Configure/Configure.pager.php |
— | — | @@ -0,0 +1,37 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Interface for pagers used to list versions at Special:ViewConfig |
| 6 | + * |
| 7 | + * @ingroup Extensions |
| 8 | + * @author Alexandre Emsenhuber |
| 9 | + */ |
| 10 | +interface ConfigurationPager extends Pager { |
| 11 | + |
| 12 | + /** |
| 13 | + * Set the wiki to get versions or false for all wikis |
| 14 | + * |
| 15 | + * @param $wiki String or false |
| 16 | + */ |
| 17 | + public function setWiki( $wiki ); |
| 18 | + |
| 19 | + /** |
| 20 | + * Get the number of rows in the pager |
| 21 | + * |
| 22 | + * @return Integer |
| 23 | + */ |
| 24 | + public function getNumRows(); |
| 25 | + |
| 26 | + /** |
| 27 | + * Used to set a callback function to format the rows, this is generally |
| 28 | + * SpecialViewConfig::formatVersionRow(). The callback needs as first param |
| 29 | + * an array with the following keys set: |
| 30 | + * - timestamp: version's timestamp |
| 31 | + * - wikis: array of wikis in the version |
| 32 | + * - count: a counter, starting at 1 for the top (newer) row |
| 33 | + * - user_name: Name of the user who made the version |
| 34 | + * - user_wiki: Wiki in which the user made the version |
| 35 | + * - reason: revision's comment |
| 36 | + */ |
| 37 | + public function setFormatCallback( $callback ); |
| 38 | +} |
Property changes on: trunk/extensions/Configure/Configure.pager.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 39 | + native |
Index: trunk/extensions/Configure/Configure.php |
— | — | @@ -235,6 +235,7 @@ |
236 | 236 | $wgAutoloadClasses['HistoryConfigurationDiff'] = $dir . 'Configure.diff.php'; |
237 | 237 | |
238 | 238 | # Pager stuff |
| 239 | +$wgAutoloadClasses['ConfigurationPager'] = $dir . 'Configure.pager.php'; |
239 | 240 | $wgAutoloadClasses['ConfigurationPagerDb'] = $dir . 'Configure.pager-db.php'; |
240 | 241 | $wgAutoloadClasses['ConfigurationPagerFiles'] = $dir . 'Configure.pager-files.php'; |
241 | 242 | |
Index: trunk/extensions/Configure/Configure.pager-db.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | * @ingroup Extensions |
9 | 9 | * @author Alexandre Emsenhuber |
10 | 10 | */ |
11 | | -class ConfigurationPagerDb extends ReverseChronologicalPager { |
| 11 | +class ConfigurationPagerDb extends ReverseChronologicalPager implements ConfigurationPager { |
12 | 12 | protected $mHandler, $mCallback, $mCounter = 0, $mWiki = false; |
13 | 13 | |
14 | 14 | function __construct( ConfigureHandlerDb $handler ) { |
Index: trunk/extensions/Configure/Configure.pager-files.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | * @ingroup Extensions |
8 | 8 | * @author Alexandre Emsenhuber |
9 | 9 | */ |
10 | | -class ConfigurationPagerFiles implements Pager { |
| 10 | +class ConfigurationPagerFiles implements ConfigurationPager { |
11 | 11 | protected $mHandler, $mCallback, $mWiki = false; |
12 | 12 | |
13 | 13 | function __construct( ConfigureHandler $handler ) { |
— | — | @@ -57,10 +57,6 @@ |
58 | 58 | return ''; |
59 | 59 | } |
60 | 60 | |
61 | | - function getSearchForm() { |
62 | | - return ''; |
63 | | - } |
64 | | - |
65 | 61 | function setFormatCallback( $callback ) { |
66 | 62 | $this->mCallback = $callback; |
67 | 63 | } |