Index: trunk/extensions/Variables/RELEASE-NOTES |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | svn era Changelog: |
3 | 3 | ================== |
4 | 4 | |
5 | | - * (trunk) -- Version 2.0rc by Daniel Werner |
| 5 | + * November 16, 2010 -- Version 2.0 by Daniel Werner |
6 | 6 | Version 2.0 almost is a complete rewrite of the extension, just the idea remains the |
7 | 7 | same. It's the attempt to get rid of several bugs caused by the fact that MediaWiki |
8 | 8 | is using several Parser objects. Therefore in v2 each Parser has its own Variables |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | using Parser::parse() recursivelly in any way (which should never be done!). |
17 | 17 | - For MW 1.12 and later, '#var' default value no longer gets expanded when not needed. |
18 | 18 | - Experimental new function '#var_final' which allows to insert the variables final |
19 | | - (last) value. |
| 19 | + (last) value after page processing is almost through. |
20 | 20 | - Global configuration variable '$egVariablesDisabledFunctions' added. |
21 | 21 | |
22 | 22 | Internal changes: |
Index: trunk/extensions/Variables/Variables.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * Support: http://www.mediawiki.org/wiki/Extension_talk:Variables |
13 | 13 | * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Variables |
14 | 14 | * |
15 | | - * @version: 2.0rc |
| 15 | + * @version: 2.0 |
16 | 16 | * @license: ISC License |
17 | 17 | * @author: Rob Adams |
18 | 18 | * @author: Tom Hempel |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | * |
62 | 62 | * @var string |
63 | 63 | */ |
64 | | - const VERSION = '2.0rc'; |
| 64 | + const VERSION = '2.0'; |
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Internal store for variable values |
— | — | @@ -299,15 +299,14 @@ |
300 | 300 | } |
301 | 301 | |
302 | 302 | /** |
303 | | - * Defines a variable, accessible by getVarValue() or '#var' parser function |
| 303 | + * Defines a variable, accessible by getVarValue() or '#var' parser function. Name and |
| 304 | + * value will be trimmed and converted to string. |
304 | 305 | * |
305 | 306 | * @param string $varName |
306 | 307 | * @param string $value will be converted to string if no string is given |
307 | 308 | */ |
308 | 309 | public function setVarValue( $varName, $value = '' ) { |
309 | | - $varName = trim( $varName ); |
310 | | - $value = trim( $value ); |
311 | | - $this->mVariables[ $varName ] = $value; |
| 310 | + $this->mVariables[ trim( $varName ) ] = trim( $value ); |
312 | 311 | } |
313 | 312 | |
314 | 313 | /** |