From d6b9c7bffaacf3b0b983386eca336e4f8d60a2f3 Mon Sep 17 00:00:00 2001 From: lupo49 Date: Tue, 8 May 2012 20:18:35 +0200 Subject: Restore page versions - add timestamp of the restored version to to the summary field. This allows easier identifying of which version has been restored. (FS#2522) --- inc/actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index 4a2e200ae..458926345 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -380,7 +380,7 @@ function act_revert($act){ if($REV){ $text = rawWiki($ID,$REV); if(!$text) return 'show'; //something went wrong - $sum = $lang['restored']; + $sum = sprintf($lang['restored'], dformat($REV)); } // spam check -- cgit v1.2.3 From 78035fe8ffc269afc488a230cb7c7f73e2fb10a0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 22 May 2012 21:49:59 +0200 Subject: don't rely on metadata for conflict detection This also fixes a problem wiht PHP 5.4 when there is metadata but the date key is empty. --- inc/actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index 458926345..adc251bc4 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -506,7 +506,7 @@ function act_edit($act){ // Use the date of the newest revision, not of the revision we edit // This is used for conflict detection - if(!$DATE) $DATE = $INFO['meta']['date']['modified']; + if(!$DATE) $DATE = @filemtime(wikiFN($ID)); //check if locked by anyone - if not lock for my self //do not lock when the user can't edit anyway -- cgit v1.2.3 From 7656ee3b68e4877d64b1931c584ad433da62632c Mon Sep 17 00:00:00 2001 From: lupo49 Date: Sun, 10 Jun 2012 17:34:42 +0200 Subject: Fix for FS#2522 / Now all places of $lang['restored'] are covered with the restored-date information --- inc/actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index adc251bc4..e85cbfccc 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -498,7 +498,7 @@ function act_edit($act){ //set summary default if(!$SUM){ if($REV){ - $SUM = $lang['restored']; + $SUM = sprintf($lang['restored'], dformat($REV)); }elseif(!$INFO['exists']){ $SUM = $lang['created']; } -- cgit v1.2.3