Index: trunk/extensions/Poll/Poll.alias.php |
— | — | @@ -10,11 +10,10 @@ |
11 | 11 | |
12 | 12 | /** English */ |
13 | 13 | $aliases['en'] = array( |
14 | | - 'Poll' => array( 'Poll' ), |
| 14 | + 'Poll' => array( 'Poll' ), |
15 | 15 | ); |
16 | 16 | |
17 | 17 | /** German(Deutsch) */ |
18 | 18 | $aliases['de'] = array( |
19 | | - 'Poll' => array( 'Umfrage' ,'Poll' ), |
| 19 | + 'Poll' => array( 'Umfrage' , 'Poll' ), |
20 | 20 | ); |
21 | | - |
Index: trunk/extensions/Poll/Poll_body.php |
— | — | @@ -1,18 +1,19 @@ |
2 | 2 | <?php |
| 3 | + |
3 | 4 | class Poll extends SpecialPage { |
4 | 5 | function __construct() { |
5 | 6 | parent::__construct( 'Poll' ); |
6 | | - wfLoadExtensionMessages('Poll'); |
| 7 | + wfLoadExtensionMessages( 'Poll' ); |
7 | 8 | } |
8 | | - |
| 9 | + |
9 | 10 | function execute( $par ) { |
10 | 11 | global $wgRequest, $wgOut; |
11 | | - |
| 12 | + |
12 | 13 | $this->setHeaders(); |
13 | | - |
| 14 | + |
14 | 15 | # Get request data from, e.g. |
15 | | - $action = htmlentities($wgRequest->getText('action')); |
16 | | - $id = htmlentities($wgRequest->getText('id')); |
17 | | - |
| 16 | + $action = htmlentities( $wgRequest->getText( 'action' ) ); |
| 17 | + $id = htmlentities( $wgRequest->getText( 'id' ) ); |
| 18 | + |
18 | 19 | } |
19 | 20 | } |
Index: trunk/extensions/Poll/Poll.i18n.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * Internationalisation file for TSPoll extension. |
| 4 | + * Internationalisation file for Poll extension. |
5 | 5 | * |
6 | 6 | * @file |
7 | 7 | * @ingroup Extensions |
— | — | @@ -8,12 +8,12 @@ |
9 | 9 | |
10 | 10 | $messages = array(); |
11 | 11 | |
12 | | -$messages['en'] = array( |
13 | | - 'poll' => 'Polls', |
14 | | - 'poll-desc' => 'Add a [[Special:Poll|specialpage]] to MediaWiki for useing polls in MediaWiki', |
| 12 | +$messages['en'] = array( |
| 13 | + 'poll' => 'Polls', |
| 14 | + 'poll-desc' => 'Add a [[Special:Poll|special page]] for using polls', |
15 | 15 | ); |
16 | 16 | |
17 | | -$messages['de'] = array( |
18 | | - 'poll' => 'Umfragen', |
19 | | - 'poll-desc' => 'Erstellt eine [[Special:Poll|Spezialsite]], um Umfragen in MedaWiki zu nutzen', |
| 17 | +$messages['de'] = array( |
| 18 | + 'poll' => 'Umfragen', |
| 19 | + 'poll-desc' => 'Erstellt eine [[Special:Poll|Spezialsite]], um Umfragen zu nutzen', |
20 | 20 | ); |
Index: trunk/extensions/Poll/Poll.php |
— | — | @@ -20,22 +20,23 @@ |
21 | 21 | // Die the extension, if not MediaWiki is used |
22 | 22 | if ( !defined( 'MEDIAWIKI' ) ) { |
23 | 23 | echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); |
24 | | - die( - 1 ); |
| 24 | + die( -1 ); |
25 | 25 | } |
26 | 26 | |
27 | 27 | // Extension credits that will show up on Special:Version |
28 | 28 | $wgExtensionCredits['specialpage'][] = array( |
29 | | - 'name' => 'Poll', |
30 | | - 'version' => '0.0', |
31 | | - 'path' => __FILE__, |
32 | | - 'author' => 'Jan Luca', |
33 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Poll2', |
| 29 | + 'name' => 'Poll', |
| 30 | + 'version' => '0.0.1', |
| 31 | + 'path' => __FILE__, |
| 32 | + 'author' => 'Jan Luca', |
| 33 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Poll2', |
34 | 34 | 'descriptionmsg' => 'poll-desc' |
35 | 35 | ); |
36 | 36 | |
37 | | -$dir = dirname(__FILE__) . '/'; |
38 | | - |
| 37 | +$dir = dirname( __FILE__ ) . '/'; |
| 38 | + |
39 | 39 | $wgAutoloadClasses['Poll'] = $dir . 'Poll_body.php'; # Tell MediaWiki to load the extension body. |
40 | 40 | $wgExtensionMessagesFiles['Poll'] = $dir . 'Poll.i18n.php'; |
41 | 41 | $wgExtensionAliasesFiles['Poll'] = $dir . 'Poll.alias.php'; |
42 | 42 | $wgSpecialPages['Poll'] = 'Poll'; # Let MediaWiki know about your new special page. |
| 43 | +// FIXME: add $wgSpecialPageGroups |