r103347 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103346‎ | r103347 | r103348 >
Date:18:27, 16 November 2011
Author:danwe
Status:deferred
Tags:
Comment:
Stable release of Variables 2.0, testing complete.
Modified paths:
  • /trunk/extensions/Variables/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/Variables/Variables.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Variables/RELEASE-NOTES
@@ -1,7 +1,7 @@
22 svn era Changelog:
33 ==================
44
5 - * (trunk) -- Version 2.0rc by Daniel Werner
 5+ * November 16, 2010 -- Version 2.0 by Daniel Werner
66 Version 2.0 almost is a complete rewrite of the extension, just the idea remains the
77 same. It's the attempt to get rid of several bugs caused by the fact that MediaWiki
88 is using several Parser objects. Therefore in v2 each Parser has its own Variables
@@ -15,7 +15,7 @@
1616 using Parser::parse() recursivelly in any way (which should never be done!).
1717 - For MW 1.12 and later, '#var' default value no longer gets expanded when not needed.
1818 - Experimental new function '#var_final' which allows to insert the variables final
19 - (last) value.
 19+ (last) value after page processing is almost through.
2020 - Global configuration variable '$egVariablesDisabledFunctions' added.
2121
2222 Internal changes:
Index: trunk/extensions/Variables/Variables.php
@@ -11,7 +11,7 @@
1212 * Support: http://www.mediawiki.org/wiki/Extension_talk:Variables
1313 * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Variables
1414 *
15 - * @version: 2.0rc
 15+ * @version: 2.0
1616 * @license: ISC License
1717 * @author: Rob Adams
1818 * @author: Tom Hempel
@@ -60,7 +60,7 @@
6161 *
6262 * @var string
6363 */
64 - const VERSION = '2.0rc';
 64+ const VERSION = '2.0';
6565
6666 /**
6767 * Internal store for variable values
@@ -299,15 +299,14 @@
300300 }
301301
302302 /**
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.
304305 *
305306 * @param string $varName
306307 * @param string $value will be converted to string if no string is given
307308 */
308309 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 );
312311 }
313312
314313 /**

Status & tagging log