r50142 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50141‎ | r50142 | r50143 >
Date:21:22, 2 May 2009
Author:jan
Status:deferred
Tags:
Comment:
* Control if $args['id'] != ""
* Resolve todo's
Modified paths:
  • /trunk/extensions/TSPoll/TSPoll.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TSPoll/TSPoll.php
@@ -57,21 +57,19 @@
5858
5959 function efTSPollRender( $input, $args, $parser ) {
6060
61 - if ( isset( $args['id'] ) ) {
 61+ if ( isset( $args['id'] ) && $args['id'] != "" ) {
6262 $id = wfUrlencode( $args['id'] );
6363 } else {
64 - wfLoadExtensionMessages( 'TSPoll' );
65 - return wfMsgExt( 'tspoll-id-error', array( 'parse' ) );
 64+ wfLoadExtensionMessages( 'TSPoll' );
 65+ return wfMsg('tspoll-id-error');
6666 }
6767
68 - // @todo Can't we just use the Http class?
6968 $get_server = Http::get( 'http://toolserver.org/~jan/poll/dev/main.php?page=wiki_output&id='.$id );
7069 if( $get_server != '' ) {
7170 return $get_server;
7271 }
7372 else {
7473 wfLoadExtensionMessages( 'TSPoll' );
75 - // @todo: Should this be parsing before returning?
76 - return wfMsgExt( 'tspoll-fetch-error', array( 'parse' ) );
 74+ return wfMsg('tspoll-fetch-error');
7775 }
7876 }

Status & tagging log