Changeset 497 for trunk/services/versions.php
- Timestamp:
- Sep 15, 2014 9:44:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/versions.php
r468 r497 32 32 require_once 'codebase/lib/Version.inc.php'; 33 33 require_once 'codebase/lib/Lock.inc.php'; 34 require_once 'codebase/lib/HTML.inc.php'; 34 35 35 36 /****************************************************************************** … … 39 40 // Since we're using the singleton pattern we can instantiate a Version object earlier with custom parameters. 40 41 $version =& Version::getInstance($auth); 42 $version->setParam(array( 43 // If true, makes an exact comparison of saved vs. live table schemas. If false, just checks that the saved columns are available. 44 'db_schema_strict' => false, 45 )); 41 46 42 47 // Query arguments to retain their values between page requests. … … 80 85 $data = $version->getData($version_id); 81 86 $versionrecord = $version->getVerson($version_id); 82 $nav->add(sprintf(_(" View <em>%s</em> version %s (%s)"), $versionrecord['version_title'], $version_id, $versionrecord['version_datetime']));87 $nav->add(sprintf(_("%s <small>Version %s (%s)</small>"), $versionrecord['version_title'], $version_id, date(sprintf('%s %s', $app->getParam('date_format'), $app->getParam('time_format')), strtotime($versionrecord['version_datetime'])))); 83 88 $main_template = 'versions_view.ihtml'; 84 89 break; … … 89 94 $current = $version->getCurrent($record_table, $record_key, $record_val); 90 95 if (serialize($data) == serialize($current)) { 91 $app->raiseMsg(sprintf(_("Version <em>%s</em>is identical to the current record"), $version_id), MSG_NOTICE, __FILE__, __LINE__);96 $app->raiseMsg(sprintf(_("Version %s is identical to the current record"), $version_id), MSG_NOTICE, __FILE__, __LINE__); 92 97 } 93 $nav->add(sprintf(_(" Difference between version %s (%s) and current record."), $version_id, $versionrecord['version_datetime']));98 $nav->add(sprintf(_("%s <small>Version %s (%s)</small>"), $versionrecord['version_title'], $version_id, date(sprintf('%s %s', $app->getParam('date_format'), $app->getParam('time_format')), strtotime($versionrecord['version_datetime'])))); 94 99 $main_template = 'versions_diff.ihtml'; 95 100 break; … … 119 124 if (is_array($versions) && !empty($versions)) { 120 125 $_POST['version_title'] = $versions[0]['version_title']; 121 $nav->add(sprintf(_("%s versions of record<em>%s</em>"), sizeof($versions), $versions[0]['version_title']));126 $nav->add(sprintf(_("%s versions of <em>%s</em>"), sizeof($versions), $versions[0]['version_title'])); 122 127 $main_template = 'versions_list.ihtml'; 123 128 } else { 124 $app->raiseMsg(sprintf(_("No saved versions available for this record"), null), MSG_NOTICE, __FILE__, __LINE__);129 $app->raiseMsg(sprintf(_("No saved versions available"), null), MSG_NOTICE, __FILE__, __LINE__); 125 130 $app->dieBoomerangURL('versions'); 126 131 }
Note: See TracChangeset
for help on using the changeset viewer.