Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-7983

Backport CMS 7924 to 7.8: Revision history - one particular revision access - revision predecessor access

    XMLWordPrintable

Details

    Description

      I wanted to create an excel plugin for the cms to extract documents diff between to dates.
      In order to develop it, I tried to use getPredecessor() on Revision.

      I failed since the revision.index properties does not match the index in the revisionHistory list of revision (so history.getRevision(index - 1) does not match predecessor).

      The load() fonction in revisionHistory

      Possible patch : RevisionHistory => Revision getRevision(int index) :

      Revision getRevision(int index) {
      load();
      if (index >= 0 && index < list.size())

      { return list.get(list.size() - 1 - index); }

      return null;
      }

      Or : remove Collections.reverse(list); in "RevisionHistory.load() "

      (but i didn't study the consequence of the second solution)

      Best regards.

      Attachments

        Issue Links

          Activity

            People

              jsheriff Junaidh Kadhar Sheriff
              jsheriff Junaidh Kadhar Sheriff
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: