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

api.Document#getAttachmentDiff() exposes the protected XWikiAttachment instances

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.0-rc-1
    • 5.4-milestone-1
    • Old Core
    • None
    • High
    • Easy
    • N/A
    • N/A

    Description

      XWIKI-9120 has added new methods to AttachmentDiff that expose the protected XWikiAttachment instances. But AttachmentDiff is exposed to the public scripting API through api.Document#getAttachmentDiff() (used by the History UI when comparing two document versions) which means we can now access the protected XWikiAttachment instances from Velocity.

      $doc.getAttachmentDiff($oldDoc, $newDoc).get(0).getOrigAttachment()
      

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: