On Fri, Jun 26, 2009 at 20:40, Sergiu Dumitriu<[email protected]> wrote:
> tmortagne (SVN) wrote:
>> Author: tmortagne
>> Date: 2009-06-21 11:52:13 +0200 (Sun, 21 Jun 2009)
>> New Revision: 21370
>>
>> Modified:
>>    
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/ldap/XWikiLDAPConfig.java
>>    
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/render/DefaultVelocityManager.java
>>    
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiScriptContextInitializer.java
>> Log:
>> XWIKI-3942: Can't have the xwiki api Context as "context" binding in most of 
>> the JSR-223 engines
>> * add "xcontext" binding and deprecate "context" in velocity
>>
>> Modified: 
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/ldap/XWikiLDAPConfig.java
>> ===================================================================
>> --- 
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/ldap/XWikiLDAPConfig.java
>>        2009-06-20 16:35:07 UTC (rev 21369)
>> +++ 
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/ldap/XWikiLDAPConfig.java
>>        2009-06-21 09:52:13 UTC (rev 21370)
>> @@ -134,7 +134,7 @@
>>       */
>>      public String getLDAPParam(String prefName, String cfgName, String def, 
>> XWikiContext context)
>>      {
>
> Wrong commit.
>
>> -        String param = def;
>> +        String param = null;
>>
>>          try {
>>              param = context.getWiki().getXWikiPreference(prefName, context);
>>
>> Modified: 
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/render/DefaultVelocityManager.java
>> ===================================================================
>> --- 
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/render/DefaultVelocityManager.java
>>      2009-06-20 16:35:07 UTC (rev 21369)
>> +++ 
>> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/render/DefaultVelocityManager.java
>>      2009-06-21 09:52:13 UTC (rev 21370)
>> @@ -85,7 +85,9 @@
>>
>>              // We put the com.xpn.xwiki.api.Context object into the context 
>> and not the com.xpn.xwiki.XWikiContext one
>>              // which is for internal use only. In this manner we control 
>> what the user can access.
>
> "Deprecated" should be more than this. How about printing a warning in
> the log when using $context?

Before doing that we would need first to rewrite the whole XE and XEM
scripts or it will fail in xmlrpc integration test so it did not done
that yet.

>
>> +            // "context" binding is deprecated since 1.9.1
>>              vcontext.put("context", new Context(xcontext));
>> +            vcontext.put("xcontext", new Context(xcontext));
>>
>>              // Make the Syntax Factory component available from Velocity.
>>              // TODO: We need to decide how we want to expose components in 
>> general and how to protect users from
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to