[pmwiki-devel] [patch] New function in pagerev.php

Daniel Roesler diafygi at gmail.com
Thu Apr 23 15:04:39 CDT 2009


Howdy all,

I've attached a patch that basically moves a bit of code out of the
PrintDiff() function in /scripts/pagerev.php to it's own function.
Originally, the rendering of the diff code from page histories was
handled within PrintDiff() function. However, this limits the
rendering of that code to only History pages (?action=diff) which
means that recipes can't utilize this the same rendering without
basically duplicating the internal code (bad for upgrades, security,
size, etc.). So I removed the diff rendering part and put it in it's
own function called RenderDiff(). Unfortunately, I couldn't just
create a new recipe that adds the function because PrintDiff()
wouldn't utilize it. I've attached the new php file and a diff file.

Avast!
Daniel Roesler
diafygi at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pagerev_with_renderdiff.php
Type: application/x-httpd-php
Size: 6685 bytes
Desc: not available
Url : http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20090423/083f494f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pagerev_with_renderdiff.diff
Type: text/x-patch
Size: 4097 bytes
Desc: not available
Url : http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20090423/083f494f/attachment-0001.bin 


More information about the pmwiki-devel mailing list