[pmwiki-devel] bug in RestorePage()?
5ko at 5ko.fr
Mon Apr 13 14:10:58 CDT 2009
On Monday 13 April 2009 20:29:50 Daniel Roesler wrote:
> On Sat, Apr 11, 2009 at 7:19 PM, Petko Yotov <5ko at 5ko.fr> wrote:
> > $restore is also something like this: "diff:1234437773:1234437713".
> Right, but I think Mr. Bowers' point was that this is not documented
Please, feel free to improve the documentation where you feel it can be
> If you were going to take advantage of the RestorePage()
> function in a recipe (indeed, I'm working on one now), you would have
> to know that the $restore variable has to have the "diff:" in front of
> the timestamp to be compared correctly.
A developer working on a recipe, probably should be able to find it out by
reading the function, and by looking at the URL when a "Restore" link is
clicked from the diff page.
> Also, it's important to note that the RestorePage() function restores
> the edit previous to the timestamp. For example, if you have an edit
> where you add some text "xxyyzz" at 11223344 timestamp, then add some
> more text "aabbcc" at 22334455 timestamp. Calling the function
> RestorePage($pagename, $page, $new, $restore), where $restore is
> "diff:22334455", will return "xxyyzz" (without "aabbcc").
I have not enough time to test this right now, but it may be possible to use
something like "diff:22334455:22334455" or "diff:22334455:99999999" to make
sure the "22334455" version is included when we don't know the previous
timestamp. (Needs testing, I may be wrong.)
More information about the pmwiki-devel