Changeset 21 for trunk/services/versions.php
- Timestamp:
- Nov 17, 2005 7:37:40 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/versions.php
r20 r21 79 79 if ($lock->isLocked() && !$lock->isMine()) { 80 80 $lock->dieErrorPage(); 81 } 82 83 if ($v = $version->restore($version_id)) { 84 // Create version of this restored record as the "current" version. 85 $version->create($record_table, $record_key, $record_val, $v['version_title']); 86 App::raiseMsg(sprintf(_("The record <strong>%s</strong> has been replaced with <strong>%s</strong> version <strong>%s</strong> from <strong>%s</strong>."), getFormData('version_title'), $v['version_title'], $version_id, $v['version_datetime']), MSG_SUCCESS, __FILE__, __LINE__); 87 App::dieBoomerangURL('versions', array('break_list_cache'=>'true', false)); 81 88 } else { 82 if ($v = $version->restore($version_id)) { 83 // Create version of this restored record as the "current" version. 84 $version->create($record_table, $record_key, $record_val, $v['version_title']); 85 App::raiseMsg(sprintf(_("The record <strong>%s</strong> has been replaced with <strong>%s</strong> version <strong>%s</strong> from <strong>%s</strong>."), getFormData('version_title'), $v['version_title'], $version_id, $v['version_datetime']), MSG_SUCCESS, __FILE__, __LINE__); 86 App::dieBoomerangURL('versions', array('break_list_cache'=>'true', false)); 87 } else { 88 App::raiseMsg(_("Version restoration failed."), MSG_ERR, __FILE__, __LINE__); 89 App::dieURL($_SERVER['PHP_SELF']); 90 } 89 App::raiseMsg(_("Version restoration failed."), MSG_ERR, __FILE__, __LINE__); 90 App::dieURL($_SERVER['PHP_SELF']); 91 91 } 92 92 break;
Note: See TracChangeset
for help on using the changeset viewer.