Index: trunk/extensions/TSPoll/TSPoll.i18n.php |
— | — | @@ -9,9 +9,9 @@ |
10 | 10 | $messages = array(); |
11 | 11 | |
12 | 12 | $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!', |
16 | 16 | ); |
17 | 17 | |
18 | 18 | /** German (Deutsch) |
Index: trunk/extensions/TSPoll/TSPoll.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
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) |
5 | 5 | * |
6 | 6 | * To activate this extension, add the following into your LocalSettings.php file: |
7 | 7 | * require_once("$IP/extensions/TSPoll/TSPoll.php"); |
— | — | @@ -11,29 +11,29 @@ |
12 | 12 | * @link http://www.mediawiki.org/wiki/User:Jan_Luca/Extension:TSPoll Documentation |
13 | 13 | * @license http://creativecommons.org/licenses/by-sa/3.0/ Attribution-Share Alike 3.0 Unported or later |
14 | 14 | */ |
15 | | - |
| 15 | + |
16 | 16 | /** |
17 | 17 | * Protect against register_globals vulnerabilities. |
18 | 18 | * This line must be present before any global variable is referenced. |
19 | 19 | */ |
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' ) ) { |
23 | 23 | echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); |
24 | | - die( -1 ); |
| 24 | + die( - 1 ); |
25 | 25 | } |
26 | | - |
27 | | -// Extension credits that will show up on Special:Version |
| 26 | + |
| 27 | +// Extension credits that will show up on Special:Version |
28 | 28 | $wgExtensionCredits['parserhook'][] = array( |
29 | 29 | 'name' => 'TSPoll', |
30 | 30 | 'version' => '1.0 Dev', |
31 | 31 | 'path' => __FILE__, |
32 | | - 'author' => 'Jan Luca', |
| 32 | + 'author' => 'Jan Luca', |
33 | 33 | 'url' => 'http://www.mediawiki.org/wiki/User:Jan_Luca/Extension:TSPoll', |
34 | | - 'descriptionmsg'=> 'tspoll-desc' |
| 34 | + 'descriptionmsg' => 'tspoll-desc' |
35 | 35 | ); |
36 | 36 | |
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 |
38 | 38 | if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
39 | 39 | $wgHooks['ParserFirstCallInit'][] = 'efTSPollSetup'; |
40 | 40 | } else { // Otherwise do things the old fashioned way |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | $wgExtensionMessagesFiles['TSPoll'] = dirname( __FILE__ ) . '/TSPoll.i18n.php'; |
45 | | - |
| 45 | + |
46 | 46 | function efTSPollSetup() { |
47 | 47 | global $wgParser; |
48 | 48 | $wgParser->setHook( 'TSPoll', 'efTSPollRender' ); |
— | — | @@ -60,16 +60,16 @@ |
61 | 61 | if ( isset( $args['id'] ) && $args['id'] != "" ) { |
62 | 62 | $id = wfUrlencode( $args['id'] ); |
63 | 63 | } else { |
64 | | - wfLoadExtensionMessages( 'TSPoll' ); |
65 | | - return wfMsg('tspoll-id-error'); |
| 64 | + wfLoadExtensionMessages( 'TSPoll' ); |
| 65 | + return wfMsg( 'tspoll-id-error' ); |
66 | 66 | } |
67 | 67 | |
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 != '' ) { |
70 | 70 | return $get_server; |
71 | 71 | } |
72 | 72 | else { |
73 | 73 | wfLoadExtensionMessages( 'TSPoll' ); |
74 | | - return wfMsg('tspoll-fetch-error'); |
| 74 | + return wfMsg( 'tspoll-fetch-error' ); |
75 | 75 | } |
76 | 76 | } |