$versionsFormatted = array();
foreach ( $versions AS $version ) {
-
- $versionsFormatted[] = OCP\Util::formatDate( $version );
-
+ $versionsFormatted[] = OCP\Util::formatDate( doubleval($version) );
}
$versionsSorted = array_reverse( $versions );
$tmpl->assign( 'outcome_stat', 'success' );
- $tmpl->assign( 'outcome_msg', "File {$_GET['path']} was reverted to version ".OCP\Util::formatDate( $_GET['revert'] ) );
+ $tmpl->assign( 'outcome_msg', "File {$_GET['path']} was reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) );
} else {
$tmpl->assign( 'outcome_stat', 'failure' );
- $tmpl->assign( 'outcome_msg', "File {$_GET['path']} could not be reverted to version ".OCP\Util::formatDate( $_GET['revert'] ) );
+ $tmpl->assign( 'outcome_msg', "File {$_GET['path']} could not be reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) );
}
}
function addVersion(revision ) {
- name=formatDate(revision*1000);
+ name=formatDate(revision.version*1000);
var version=$('<option/>');
- version.attr('value',revision);
+ version.attr('value',revision.version);
version.text(name);
// } else {
echo('<p><em>Revert a file to a previous version by clicking on its revert button</em></p><br />');
foreach ( $_['versions'] as $v ) {
-
echo ' ';
- echo OCP\Util::formatDate( $v['version'] );
+ echo OCP\Util::formatDate( doubleval($v['version']) );
echo ' <a href="'.OCP\Util::linkTo('files_versions', 'history.php').'?path='.urlencode( $_['path'] ).'&revert='. $v['version'] .'" class="button">Revert</a><br /><br />';
if ( $v['cur'] ) { echo ' (<b>Current</b>)'; }
echo '<br /><br />';
-
}
}