https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103347

Revision: 103347
Author:   danwe
Date:     2011-11-16 18:27:59 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
Stable release of Variables 2.0, testing complete.

Modified Paths:
--------------
    trunk/extensions/Variables/RELEASE-NOTES
    trunk/extensions/Variables/Variables.php

Modified: trunk/extensions/Variables/RELEASE-NOTES
===================================================================
--- trunk/extensions/Variables/RELEASE-NOTES    2011-11-16 18:21:28 UTC (rev 
103346)
+++ trunk/extensions/Variables/RELEASE-NOTES    2011-11-16 18:27:59 UTC (rev 
103347)
@@ -1,7 +1,7 @@
  svn era Changelog:
  ==================
  
- * (trunk) -- Version 2.0rc by Daniel Werner
+ * November 16, 2010 -- Version 2.0 by Daniel Werner
    Version 2.0 almost is a complete rewrite of the extension, just the idea 
remains the
    same. It's the attempt to get rid of several bugs caused by the fact that 
MediaWiki
    is using several Parser objects. Therefore in v2 each Parser has its own 
Variables
@@ -15,7 +15,7 @@
      using Parser::parse() recursivelly in any way (which should never be 
done!).
    - For MW 1.12 and later, '#var' default value no longer gets expanded when 
not needed.
    - Experimental new function '#var_final' which allows to insert the 
variables final
-     (last) value.
+     (last) value after page processing is almost through.
    - Global configuration variable '$egVariablesDisabledFunctions' added.
 
    Internal changes:

Modified: trunk/extensions/Variables/Variables.php
===================================================================
--- trunk/extensions/Variables/Variables.php    2011-11-16 18:21:28 UTC (rev 
103346)
+++ trunk/extensions/Variables/Variables.php    2011-11-16 18:27:59 UTC (rev 
103347)
@@ -11,7 +11,7 @@
  * Support:       http://www.mediawiki.org/wiki/Extension_talk:Variables
  * Source code:   
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Variables
  * 
- * @version: 2.0rc
+ * @version: 2.0
  * @license: ISC License
  * @author: Rob Adams
  * @author: Tom Hempel
@@ -60,7 +60,7 @@
         * 
         * @var string
         */
-       const VERSION = '2.0rc';
+       const VERSION = '2.0';
        
        /**
         * Internal store for variable values
@@ -299,15 +299,14 @@
        }
        
        /**
-        * Defines a variable, accessible by getVarValue() or '#var' parser 
function
+        * Defines a variable, accessible by getVarValue() or '#var' parser 
function. Name and
+        * value will be trimmed and converted to string.
         * 
         * @param string $varName
         * @param string $value will be converted to string if no string is 
given
         */
        public function setVarValue( $varName, $value = '' ) {
-               $varName = trim( $varName );
-               $value = trim( $value );
-               $this->mVariables[ $varName ] = $value;
+               $this->mVariables[ trim( $varName ) ] = trim( $value );
        }
        
        /**


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to