That'd be fantastic, 1) what would be the replacement (some scope variables in macros?) 2) please point me to such code, we have quite a few other maintenance needs for the velocity code and tool-supporting this would be really helpful! paul Le 4 janv. 2012 à 08:24, Ludovic Dubost a écrit :
Hi paul,
There should be some code for adapting the curriki code to this in the trunk.
Ludovic
Envoyé de mon iPhone
Le 4 janv. 2012 à 02:07, Paul Libbrecht <[email protected]> a écrit :
Hello fellow developers,
I am working on upgrading our core, based on xwiki 1.5.4 to xwiki 3.2. Quite a jump.
Among the least jump, velocity seems to have jumped from version 1.5 to version 1.7.
Nonetheless, this seems to cause a surprising effect: while macros could redefine the value of parameters they were passed, and that change was honoured after the macro, they cannot anymore.
The following script:
#macro(redefine $var) #set($var="redefined") #end
#set($x="original")
x is $x
#redefine($x)
x is $x
gives the following output in a new core:
x is original
x is original
and the following in our old core:
x is original
x is redefined
This has all sorts of consequences including such macros as the navigation not receiving the result of normalizelink...
Did I miss an optional parameter of velocity to revert to the old method?
paul _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs