summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-19 22:29:01 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-19 22:29:01 -0400
commit82d81e8d39ce69211ec6b29fe3f803c57714b8dd (patch)
tree09dbd675480a02fd626f6634e083f3d6a01b4404 /apps/files_versions
parentf893d21660695d1d1cd594c102e2bcba6919dee3 (diff)
parent5eca531f99f9615d1a09bbb0b03dda2063901aa7 (diff)
downloadnextcloud-server-82d81e8d39ce69211ec6b29fe3f803c57714b8dd.tar.gz
nextcloud-server-82d81e8d39ce69211ec6b29fe3f803c57714b8dd.zip
Merge branch 'share_api'
Conflicts: apps/contacts/lib/vcard.php apps/files/index.php lib/files.php
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/appinfo/api.php36
-rw-r--r--apps/files_versions/js/versions.js2
2 files changed, 37 insertions, 1 deletions
diff --git a/apps/files_versions/appinfo/api.php b/apps/files_versions/appinfo/api.php
new file mode 100644
index 00000000000..a7386bc2c9f
--- /dev/null
+++ b/apps/files_versions/appinfo/api.php
@@ -0,0 +1,36 @@
+<?php
+/**
+* ownCloud
+*
+* @author Michael Gapczynski
+* @copyright 2012 Michael Gapczynski mtgap@owncloud.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+return array(
+ 'list' => array('method' => 'GET', 'class' => 'Storage', 'function' => 'getVersions',
+ 'parameters' => array(
+ 'file' => array('required' => true, 'type' => 'string')
+ )
+ ),
+ 'revert' => array('method' => 'POST', 'class' => 'Storage', 'function' => 'rollback',
+ 'parameters' => array(
+ 'file' => array('required' => true, 'type' => 'string'),
+ 'time' => array('required' => true, 'type' => 'int')
+ )
+ )
+);
+
+?> \ No newline at end of file
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index a090fde446e..c5c1553f1a8 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -11,7 +11,7 @@ $(document).ready(function() {
$(document).ready(function(){
if (typeof FileActions !== 'undefined') {
// Add history button to files/index.php
- FileActions.register('file','History',function(){return OC.imagePath('core','actions/history')},function(filename){
+ FileActions.register('file','History', FileActions.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/history')},function(filename){
if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback