aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins/contrib/showdiff.mdwn
blob: 0436fdef61a298cf642d95a4c59327e1d373bedb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[[template id=plugin name=showdiff author="[[JeremieKoenig]]"]]
[[tag type/useful]]

This plugin, which can be downloaded
[here](http://www.jk.fr.eu.org/ikiwiki/showdiff.pm),
adds a "Show Diff" button to the page edition template.
When clicked, a diff between the stored page and provided content
is shown in the "Page Preview" area.

It depends on
[this patch](http://www.jk.fr.eu.org/ikiwiki/pluggable_editpage_buttons.diff),
which does the following:

  * add a title to the editpage form;
  * pass a reference to the list of buttons to the formbuilder_setup
    hooks, so we can add ours;
  * relax asumption about the possible submit values (use "Save Page"
    explicitly);
  * de-hardcode the submit buttons from the editpage template
    (was this intended to work around something?).

> That was there to work around a bug in CGI::FormBuilder 3.0401
> that broke FORM-SUBMIT on customised templates. That seems to be
> fixed in the newer version ikiwiki already depends on. Patch accepted.
> --[[Joey]]

## Problems

No special handling is done of concurrent edits: changes introduced
independently will show up in the requested diff, although they will
be merged when the page is saved. I suspect even detecting this case
would require changes in the RCS backends.