From 6117057c593c909408c48ec60dea335c7c77801d Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Wed, 15 May 2013 14:13:01 +1200 Subject: [PATCH] Update doRollback messages to work well with the new reverts. Currently reverts are not creating the new versions anymore - they are simply copying the Version over. Remove incorrect message about new version creation and remove the "cancel draft changes" message that's not correct. --- code/controllers/CMSMain.php | 9 ++++----- lang/en.yml | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index fbe29135..cf7209fd 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -1092,15 +1092,14 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr if($version) { $record->doRollbackTo($version); $message = _t( - 'CMSMain.ROLLEDBACKVERSION', - "Rolled back to version #%d. New version number is #%d", - array('version' => $data['Version'], 'versionnew' => $record->Version) + 'CMSMain.ROLLEDBACKVERSIONv2', + "Rolled back to version #%d.", + array('version' => $data['Version']) ); } else { $record->doRollbackTo('Live'); $message = _t( - 'CMSMain.ROLLEDBACKPUB',"Rolled back to published version. New version number is #{version}", - array('version' => $record->Version) + 'CMSMain.ROLLEDBACKPUBv2',"Rolled back to published version." ); } diff --git a/lang/en.yml b/lang/en.yml index f0cda7bf..30c55b4b 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -101,8 +101,8 @@ en: RESTORE: Restore RESTORED: 'Restored ''{title}'' successfully' ROLLBACK: 'Roll back to this version' - ROLLEDBACKPUB: 'Rolled back to published version. New version number is #{version}' - ROLLEDBACKVERSION: 'Rolled back to version #%d. New version number is #%d' + ROLLEDBACKPUBv2: 'Rolled back to published version.' + ROLLEDBACKVERSIONv2: 'Rolled back to version #%d.' SAVE: Save SAVEDRAFT: 'Save Draft' TabContent: Content