r50156 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50155‎ | r50156 | r50157 >
Date:11:13, 3 May 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* tweak message text
* stylize.php, indentation updates, removed trailing whitespace
Modified paths:
  • /trunk/extensions/TSPoll/TSPoll.i18n.php (modified) (history)
  • /trunk/extensions/TSPoll/TSPoll.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TSPoll/TSPoll.i18n.php
@@ -9,9 +9,9 @@
1010 $messages = array();
1111
1212 $messages['en'] = array(
13 - 'tspoll-desc' => 'Include the [http://www.toolserver.org/~jan/poll/index.php Toolserver-Poll-Skript] as a HTML-tag',
14 - 'tspoll-fetch-error' => 'Error while fetching the URL!',
15 - 'tspoll-id-error' => 'No ID is giving!',
 13+ 'tspoll-desc' => 'Include the [http://www.toolserver.org/~jan/poll/index.php Toolserver-Poll-Skript] as a HTML-tag',
 14+ 'tspoll-fetch-error' => 'Error while fetching the URL!',
 15+ 'tspoll-id-error' => 'No ID is given!',
1616 );
1717
1818 /** German (Deutsch)
Index: trunk/extensions/TSPoll/TSPoll.php
@@ -1,6 +1,6 @@
22 <?php
33 /**
4 - * Toolserver Poll - Include the Toolserver-Poll-Skript(http://toolserver.org/~jan/poll/index.php)
 4+ * Toolserver Poll - Include the Toolserver-Poll-Skript(http://toolserver.org/~jan/poll/index.php)
55 *
66 * To activate this extension, add the following into your LocalSettings.php file:
77 * require_once("$IP/extensions/TSPoll/TSPoll.php");
@@ -11,29 +11,29 @@
1212 * @link http://www.mediawiki.org/wiki/User:Jan_Luca/Extension:TSPoll Documentation
1313 * @license http://creativecommons.org/licenses/by-sa/3.0/ Attribution-Share Alike 3.0 Unported or later
1414 */
15 -
 15+
1616 /**
1717 * Protect against register_globals vulnerabilities.
1818 * This line must be present before any global variable is referenced.
1919 */
20 -
21 -//Abbrechen des Skriptes, wenn es nicht in Mediawiki eingebunden ist
22 -if( !defined( 'MEDIAWIKI' ) ) {
 20+
 21+// Abbrechen des Skriptes, wenn es nicht in Mediawiki eingebunden ist
 22+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 }
26 -
27 -// Extension credits that will show up on Special:Version
 26+
 27+// Extension credits that will show up on Special:Version
2828 $wgExtensionCredits['parserhook'][] = array(
2929 'name' => 'TSPoll',
3030 'version' => '1.0 Dev',
3131 'path' => __FILE__,
32 - 'author' => 'Jan Luca',
 32+ 'author' => 'Jan Luca',
3333 'url' => 'http://www.mediawiki.org/wiki/User:Jan_Luca/Extension:TSPoll',
34 - 'descriptionmsg'=> 'tspoll-desc'
 34+ 'descriptionmsg' => 'tspoll-desc'
3535 );
3636
37 -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980
 37+// Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980
3838 if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
3939 $wgHooks['ParserFirstCallInit'][] = 'efTSPollSetup';
4040 } else { // Otherwise do things the old fashioned way
@@ -41,7 +41,7 @@
4242 }
4343
4444 $wgExtensionMessagesFiles['TSPoll'] = dirname( __FILE__ ) . '/TSPoll.i18n.php';
45 -
 45+
4646 function efTSPollSetup() {
4747 global $wgParser;
4848 $wgParser->setHook( 'TSPoll', 'efTSPollRender' );
@@ -60,16 +60,16 @@
6161 if ( isset( $args['id'] ) && $args['id'] != "" ) {
6262 $id = wfUrlencode( $args['id'] );
6363 } else {
64 - wfLoadExtensionMessages( 'TSPoll' );
65 - return wfMsg('tspoll-id-error');
 64+ wfLoadExtensionMessages( 'TSPoll' );
 65+ return wfMsg( 'tspoll-id-error' );
6666 }
6767
68 - $get_server = Http::get( 'http://toolserver.org/~jan/poll/dev/main.php?page=wiki_output&id='.$id );
69 - if( $get_server != '' ) {
 68+ $get_server = Http::get( 'http://toolserver.org/~jan/poll/dev/main.php?page=wiki_output&id=' . $id );
 69+ if ( $get_server != '' ) {
7070 return $get_server;
7171 }
7272 else {
7373 wfLoadExtensionMessages( 'TSPoll' );
74 - return wfMsg('tspoll-fetch-error');
 74+ return wfMsg( 'tspoll-fetch-error' );
7575 }
7676 }

Status & tagging log