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

Expose Document.isTranslation() to the web API

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2-milestone-1
    • Fix Version/s: 6.2-milestone-2
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Trivial
    • Documentation:
      N/A
    • Similar issues:

      Description

      From the web API it is not that easy to find out if the Document instance you are holding is the main document or a translation.

      Such situations can occur when using:

      - $doc.getTranslatedDocument()
      - $xwiki.getDeletedDocument(...).getDocument()
      - etc...
      

      The new method should look something like this:

      $doc.isTranslation()
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                enygma Eduard Moraru
                Reporter:
                enygma Eduard Moraru
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: