r50136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50135‎ | r50136 | r50137 >
Date:16:54, 2 May 2009
Author:jan
Status:deferred
Tags:
Comment:
* Update i18n
* Add a massage into TSPoll.php
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
@@ -11,6 +11,7 @@
1212 $messages['en'] = array(
1313 'tspoll-desc' => 'Include the [http://www.toolserver.org/~jan/poll/index.php Toolserver-Poll-Skript] as a HTML-tag',
1414 'tspoll-fetch-error' => 'Error while fetching the URL!',
 15+ 'tspoll-id-error' => 'No ID is giving!',
1516 );
1617
1718 /** German (Deutsch)
@@ -19,4 +20,5 @@
2021 $messages['de'] = array(
2122 'tspoll-desc' => 'Bindet das [http://www.toolserver.org/~jan/poll/index.php Toolserver-Poll-Skript] als ein HTML-Tag ein',
2223 'tspoll-fetch-error' => 'Fehler beim Aufrufen der URL!',
 24+ 'tspoll-id-error' => 'Keine ID angegeben!',
2325 );
Index: trunk/extensions/TSPoll/TSPoll.php
@@ -61,15 +61,14 @@
6262 if ( isset( $args['id'] ) ) {
6363 $id = wfUrlencode( $args['id'] );
6464 } else {
65 - // @todo: maybe output an error?
66 - $id = '';
 65+ wfLoadExtensionMessages( 'TSPoll' );
 66+ return wfMsgExt( 'tspoll-id-error', array( 'parse' ) );
6767 }
6868
6969 // @todo Can't we just use the Http class?
70 - $http = new http_w( 'toolserver.org', '/~jan/poll/main.php?page=wiki_output&id=' . $id );
71 - $get_server = $http->get( '' );
72 - // @todo If false? How can this ever be true?
73 - if( false&& $get_server != '' ) {
 70+ $http = new http_w( 'toolserver.org', '/~jan/poll/dev/main.php?page=wiki_output&id=' . $id );
 71+ $get_server = $http->get();
 72+ if( $get_server != '' ) {
7473 return $get_server;
7574 }
7675 else {

Status & tagging log