No description provided.
Restore page versions - add timestamp of the restored version to to t…
…he summary field.
This allows easier identifying of which version has been restored. (FS#2522)
what about a link to the version on the timestamp?
Is there any function which receives the $ID and $REV and returns the wiki link or should I use
$oldversion = '<a class="wikilink1" href="'. wl($ID).'&rev='.$REV.'">'.dformat($REV).'</a>';
Mh.. it seems you can not add links to the revision listing nor the recent changes? It just shows plain text instead of the link.
wl($ID,array('rev'=>$REV)) is the function you're looking for.
The revision summary is HTML escaped and is not passed through the wiki parser. To link it we'd need to run it through its own little parser, eg. replacing everything that looks like a timestamp.
What would you suggest? I think the plain timestamp would help a lot and the link is just a bonus.
I think its ok - but with link would be better :-)
Hmm let's have short discussion on the why first. @lupo49 what's your usecase for that feature?
In general, you "always" know when an old page version has been restored but never which version it was.
talked to @splitbrain, a link isn't necessary. The old page and the restored page have exactly the same content. So i'm fine with this.
I just talked with @dom-mel about this. A link wouldn't be that helpful anyway, because it would link to the the old revision that is exactly the same as the current one.
So I guess we can just merge this as is.
I noticed today that the pre-populated message reads old revision restored (%s), i.e. the "%s" is not interpreted.
old revision restored (%s)
$lang['restored'] is used in three places and was only changed to use sprintf() in one place. It should either be changed in the other places, too, or this one instance should be changed to use something else for the replacement.
I opened another Pull Request to fix this. (#105) 7656ee3
(Sorry, don't know how to apply the commit to this request.)