diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index 4306e41640004b15186238bc7c91adb5bf92602e..59288b6c62d315ec474c1368276d7aebfb11a8b1 100755 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -54,8 +54,8 @@ if ( isset( $_GET['path'] ) ) { // show the history only if there is something to show if( OCA_Versions\Storage::isversioned( $path ) ) { - $count=999; //show the newest revisions - $versions=OCA_Versions\Storage::getversions( $path, $count); + $count = 999; //show the newest revisions + $versions = OCA_Versions\Storage::getversions( $path, $count ); $tmpl->assign( 'versions', array_reverse( $versions ) ); diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index 2c92dfa3c65e7b91997e0df70c0ecd6332bef6fa..eadf7a510399f00cc15f34386f201813021ca98f 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -25,8 +25,8 @@ $(document).ready(function(){ function createVersionsDropdown(filename, files) { - var historyUrl = '../apps/files_versions/history.php?path='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); - + var historyUrl = OC.linkTo('files_versions', 'history.php?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ) ) + var html = '<div id="dropdown" class="drop" data-file="'+files+'">'; html += '<div id="private">'; html += '<select data-placeholder="File Version" id="found_versions" class="chzen-select">';