Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2230

Rename XWikiContext/Context.isVirtual and XWiki.isVirtual

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4 M1
    • Component/s: {Unused} Core
    • Labels:
      None
    • Similar issues:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              tmortagne Thomas Mortagne
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: