r50364 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50363‎ | r50364 | r50365 >
Date:11:37, 9 May 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* fix typos in messages, shorter where possible
* remove empty README
* styilize.php, trailing whitespace removed, updated indentation
* add FIXME for no $wgSpecialPageGroups
* bumped version
Modified paths:
  • /trunk/extensions/Poll/Poll.alias.php (modified) (history)
  • /trunk/extensions/Poll/Poll.i18n.php (modified) (history)
  • /trunk/extensions/Poll/Poll.php (modified) (history)
  • /trunk/extensions/Poll/Poll_body.php (modified) (history)
  • /trunk/extensions/Poll/README (deleted) (history)

Diff [purge]

Index: trunk/extensions/Poll/Poll.alias.php
@@ -10,11 +10,10 @@
1111
1212 /** English */
1313 $aliases['en'] = array(
14 - 'Poll' => array( 'Poll' ),
 14+ 'Poll' => array( 'Poll' ),
1515 );
1616
1717 /** German(Deutsch) */
1818 $aliases['de'] = array(
19 - 'Poll' => array( 'Umfrage' ,'Poll' ),
 19+ 'Poll' => array( 'Umfrage' , 'Poll' ),
2020 );
21 -
Index: trunk/extensions/Poll/Poll_body.php
@@ -1,18 +1,19 @@
22 <?php
 3+
34 class Poll extends SpecialPage {
45 function __construct() {
56 parent::__construct( 'Poll' );
6 - wfLoadExtensionMessages('Poll');
 7+ wfLoadExtensionMessages( 'Poll' );
78 }
8 -
 9+
910 function execute( $par ) {
1011 global $wgRequest, $wgOut;
11 -
 12+
1213 $this->setHeaders();
13 -
 14+
1415 # 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+
1819 }
1920 }
Index: trunk/extensions/Poll/Poll.i18n.php
@@ -1,6 +1,6 @@
22 <?php
33 /**
4 - * Internationalisation file for TSPoll extension.
 4+ * Internationalisation file for Poll extension.
55 *
66 * @file
77 * @ingroup Extensions
@@ -8,12 +8,12 @@
99
1010 $messages = array();
1111
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',
1515 );
1616
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',
2020 );
Index: trunk/extensions/Poll/Poll.php
@@ -20,22 +20,23 @@
2121 // Die the extension, if not MediaWiki is used
2222 if ( !defined( 'MEDIAWIKI' ) ) {
2323 echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" );
24 - die( - 1 );
 24+ die( -1 );
2525 }
2626
2727 // Extension credits that will show up on Special:Version
2828 $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',
3434 'descriptionmsg' => 'poll-desc'
3535 );
3636
37 -$dir = dirname(__FILE__) . '/';
38 -
 37+$dir = dirname( __FILE__ ) . '/';
 38+
3939 $wgAutoloadClasses['Poll'] = $dir . 'Poll_body.php'; # Tell MediaWiki to load the extension body.
4040 $wgExtensionMessagesFiles['Poll'] = $dir . 'Poll.i18n.php';
4141 $wgExtensionAliasesFiles['Poll'] = $dir . 'Poll.alias.php';
4242 $wgSpecialPages['Poll'] = 'Poll'; # Let MediaWiki know about your new special page.
 43+// FIXME: add $wgSpecialPageGroups

Status & tagging log