Index: trunk/extensions/TSPoll/TSPoll.i18n.php |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | $messages['en'] = array( |
13 | 13 | 'tspoll-desc' => 'Include the [http://www.toolserver.org/~jan/poll/index.php Toolserver-Poll-Skript] as a HTML-tag', |
14 | 14 | 'tspoll-fetch-error' => 'Error while fetching the URL!', |
| 15 | + 'tspoll-id-error' => 'No ID is giving!', |
15 | 16 | ); |
16 | 17 | |
17 | 18 | /** German (Deutsch) |
— | — | @@ -19,4 +20,5 @@ |
20 | 21 | $messages['de'] = array( |
21 | 22 | 'tspoll-desc' => 'Bindet das [http://www.toolserver.org/~jan/poll/index.php Toolserver-Poll-Skript] als ein HTML-Tag ein', |
22 | 23 | 'tspoll-fetch-error' => 'Fehler beim Aufrufen der URL!', |
| 24 | + 'tspoll-id-error' => 'Keine ID angegeben!', |
23 | 25 | ); |
Index: trunk/extensions/TSPoll/TSPoll.php |
— | — | @@ -61,15 +61,14 @@ |
62 | 62 | if ( isset( $args['id'] ) ) { |
63 | 63 | $id = wfUrlencode( $args['id'] ); |
64 | 64 | } else { |
65 | | - // @todo: maybe output an error? |
66 | | - $id = ''; |
| 65 | + wfLoadExtensionMessages( 'TSPoll' ); |
| 66 | + return wfMsgExt( 'tspoll-id-error', array( 'parse' ) ); |
67 | 67 | } |
68 | 68 | |
69 | 69 | // @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 != '' ) { |
74 | 73 | return $get_server; |
75 | 74 | } |
76 | 75 | else { |