Index: trunk/extensions/Variables/Variables.php |
— | — | @@ -3,9 +3,6 @@ |
4 | 4 | /** |
5 | 5 | * 'Variables' introduces parser functions for defining page-scoped variables within |
6 | 6 | * wiki pages. |
7 | | - * Version 2.0 is a major re-write of the extension by Daniel Werner, as attempt to |
8 | | - * get rid of any problems related to the fact that there are multiple Parser instances |
9 | | - * for which 'Variables' extension should bring separate variable stores. |
10 | 7 | * |
11 | 8 | * Documentation: http://www.mediawiki.org/wiki/Extension:Variables |
12 | 9 | * Support: http://www.mediawiki.org/wiki/Extension_talk:Variables |
— | — | @@ -22,7 +19,7 @@ |
23 | 20 | * @ingroup Variables |
24 | 21 | */ |
25 | 22 | |
26 | | -if ( ! defined( 'MEDIAWIKI' ) ) { die( ); } |
| 23 | +if ( ! defined( 'MEDIAWIKI' ) ) { die(); } |
27 | 24 | |
28 | 25 | $wgExtensionCredits['parserhook'][] = array( |
29 | 26 | 'path' => __FILE__, |
— | — | @@ -251,9 +248,8 @@ |
252 | 249 | * MessageCaches Parser clone will mess things up if we don't reset the entire object. |
253 | 250 | * Only resetting the array would unset it in the original object as well! This instead |
254 | 251 | * will break the entire reference to the object |
255 | | - */ |
| 252 | + */ |
256 | 253 | $parser->mExtVariables = new self(); |
257 | | - |
258 | 254 | return true; |
259 | 255 | } |
260 | 256 | |
— | — | @@ -282,17 +278,17 @@ |
283 | 279 | # |
284 | 280 | # public non-parser functions, accessible for |
285 | 281 | # other extensions doing interactive stuff |
286 | | - # with variables (like Extension:Loops) |
| 282 | + # with 'Variables' (like Extension:Loops) |
287 | 283 | # |
288 | 284 | |
289 | 285 | /** |
290 | | - * Convenience function to return the variables extensions variables store connected |
| 286 | + * Convenience function to return the 'Variables' extensions variables store connected |
291 | 287 | * to a certain Parser object. Each parser has its own store which will be reset after |
292 | 288 | * a parsing process [Parser::parse()] has finished. |
293 | 289 | * |
294 | 290 | * @param Parser &$parser |
295 | 291 | * |
296 | | - * @return ExtVariables by reference so we still have the right objecdt after 'ParserClearState' |
| 292 | + * @return ExtVariables by reference so we still have the right object after 'ParserClearState' |
297 | 293 | */ |
298 | 294 | public static function &get( Parser &$parser ) { |
299 | 295 | return $parser->mExtVariables; |
— | — | @@ -358,6 +354,7 @@ |
359 | 355 | * @param Parser $parser |
360 | 356 | * @param string $varName |
361 | 357 | * @param string $defaultVal |
| 358 | + * |
362 | 359 | * @return string strip-item |
363 | 360 | */ |
364 | 361 | function requestFinalizedVar( Parser &$parser, $varName, $defaultVal = '' ) { |