On Oct 1, 2009, at 1:10 PM, Asiri Rathnayake wrote:

> Hi,
>
>
>
>>> +    private boolean isMainXWiki()
>>> +    {
>>> +        String currentWiki =
>>> docBridge.getCurrentDocumentName().getWiki();
>>> +        return (currentWiki != null) &&  
>>> currentWiki.equals("xwiki");
>>
>> This is bad....
>>
>> We shouldn't hardcode the main wiki name. What if we change it later
>> on? We'll need to check every places. It needs to be centralized and
>> there's already a method for this in the XWiki class AFAIK.
>>
>
> I can't find such a method which can be accessed from components. I  
> agree
> that we need this, I asked this question today in jabber chat, nobody
> answered :(

It's not because everyone is busy that you should do something not  
right... :)

Thanks
-Vincent

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

Reply via email to