[xwiki-devs] [Proposal] Rename Context.isVirtual and XWiki.isVirtual
Hi all, After reviewing the code and doing some debug I found that Context/XWikiContext.isVirtual and XWiki.isVirtual are two things different : * context : "is not in the main wiki" * xwiki : "platform is in virtual mode" This is very disturbing and i'm pretty sure context.isVirtual is used in the wrong way at some places... Plus, context does not need to store a "virtual" variable (like it does actually), it just need to compare getMainXWiki and getDatabase. I propose to rename XWiki method to "isVirtualMode" and refactor XWikiContext/Context isVirtual/setVirtual to "isMainWiki" and of course deprecate old methods. WDYT ? PS : I already asked that in http://jira.xwiki.org/jira/browse/XWIKI-1874 but I think it deserve a mailing list thread -- Thomas Mortagne
+1 On Sun, Mar 16, 2008 at 2:28 PM, Thomas Mortagne <[email protected]> wrote:
Hi all,
After reviewing the code and doing some debug I found that Context/XWikiContext.isVirtual and XWiki.isVirtual are two things different : * context : "is not in the main wiki" * xwiki : "platform is in virtual mode"
This is very disturbing and i'm pretty sure context.isVirtual is used in the wrong way at some places... Plus, context does not need to store a "virtual" variable (like it does actually), it just need to compare getMainXWiki and getDatabase.
I propose to rename XWiki method to "isVirtualMode" and refactor XWikiContext/Context isVirtual/setVirtual to "isMainWiki" and of course deprecate old methods.
WDYT ?
PS : I already asked that in http://jira.xwiki.org/jira/browse/XWIKI-1874 but I think it deserve a mailing list thread
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 Thomas Mortagne wrote:
Hi all,
After reviewing the code and doing some debug I found that Context/XWikiContext.isVirtual and XWiki.isVirtual are two things different : * context : "is not in the main wiki" * xwiki : "platform is in virtual mode"
This is very disturbing and i'm pretty sure context.isVirtual is used in the wrong way at some places... Plus, context does not need to store a "virtual" variable (like it does actually), it just need to compare getMainXWiki and getDatabase.
I propose to rename XWiki method to "isVirtualMode" and refactor XWikiContext/Context isVirtual/setVirtual to "isMainWiki" and of course deprecate old methods.
WDYT ?
PS : I already asked that in http://jira.xwiki.org/jira/browse/XWIKI-1874 but I think it deserve a mailing list thread
-- Sergiu Dumitriu http://purl.org/net/sergiu/
3 +1, no 0 and no -1 Committing the changes on trunk now. On Sun, Mar 16, 2008 at 2:28 PM, Thomas Mortagne <[email protected]> wrote:
Hi all,
After reviewing the code and doing some debug I found that Context/XWikiContext.isVirtual and XWiki.isVirtual are two things different : * context : "is not in the main wiki" * xwiki : "platform is in virtual mode"
This is very disturbing and i'm pretty sure context.isVirtual is used in the wrong way at some places... Plus, context does not need to store a "virtual" variable (like it does actually), it just need to compare getMainXWiki and getDatabase.
I propose to rename XWiki method to "isVirtualMode" and refactor XWikiContext/Context isVirtual/setVirtual to "isMainWiki" and of course deprecate old methods.
WDYT ?
PS : I already asked that in http://jira.xwiki.org/jira/browse/XWIKI-1874 but I think it deserve a mailing list thread
-- Thomas Mortagne
-- Thomas Mortagne
participants (3)
-
Jean-Vincent Drean -
Sergiu Dumitriu -
Thomas Mortagne