This allows easier identifying of which version has been restored (FS#2522) #100

Merged
merged 1 commit into from May 9, 2012

Projects

None yet

4 participants

@lupo49
lupo49 commented May 8, 2012

No description provided.

@lupo49 lupo49 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)
d6b9c7b
@dom-mel
Collaborator
dom-mel commented May 8, 2012

what about a link to the version on the timestamp?

@lupo49
lupo49 commented May 8, 2012

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>'; 
@lupo49
lupo49 commented May 8, 2012

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.

@splitbrain
Owner

wl($ID,array('rev'=>$REV)) is the function you're looking for.

@splitbrain
Owner

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.

@lupo49
lupo49 commented May 8, 2012

What would you suggest? I think the plain timestamp would help a lot and the link is just a bonus.

@dom-mel
Collaborator
dom-mel commented May 9, 2012

I think its ok - but with link would be better :-)

@splitbrain
Owner

Hmm let's have short discussion on the why first. @lupo49 what's your usecase for that feature?

@lupo49
lupo49 commented May 9, 2012
  1. User A, B, C are modifying a wiki page
  2. User D accidentally restored an older version of the page
  3. User A, B, C are know modifying the old page version -> All old stuff of 1. is lost
  4. User D noticed that the restored wasn't that good and he needs to know which version has been restored by him in 2. The version information would help to locate the page changes between 1. and 2. to manually recover them.

In general, you "always" know when an old page version has been restored but never which version it was.

@dom-mel
Collaborator
dom-mel commented May 9, 2012

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.

@splitbrain
Owner

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.

@splitbrain splitbrain merged commit c7217c0 into splitbrain:master May 9, 2012
@selfthinker
Collaborator

I noticed today that the pre-populated message reads old revision restored (%s), i.e. the "%s" is not interpreted.

@selfthinker
Collaborator

$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.

@lupo49
lupo49 commented Jun 10, 2012

I opened another Pull Request to fix this. (#105) 7656ee3

(Sorry, don't know how to apply the commit to this request.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment