summaryrefslogtreecommitdiffstats
path: root/settings/ajax/decryptall.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-10 14:04:43 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-07-29 13:39:56 +0200
commit830f5d24c77b863bd49eda0cbc4ba812add8065d (patch)
tree462a6b6c95a5dc309b3ad1375613b8ae9bf4372e /settings/ajax/decryptall.php
parent0a3d662dd0a7d1e3066a3f8781eaaaba853ce0d8 (diff)
downloadnextcloud-server-830f5d24c77b863bd49eda0cbc4ba812add8065d.tar.gz
nextcloud-server-830f5d24c77b863bd49eda0cbc4ba812add8065d.zip
add decryptall.php
Diffstat (limited to 'settings/ajax/decryptall.php')
-rw-r--r--settings/ajax/decryptall.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php
new file mode 100644
index 00000000000..02a9bfe96b1
--- /dev/null
+++ b/settings/ajax/decryptall.php
@@ -0,0 +1,14 @@
+<?php
+
+$status = OC_App::isEnabled('files_encryption');
+OC_App::enable('files_encryption');
+
+OCA\Encryption\Crypt::decryptAll();
+
+if ($status === false) {
+ OC_App::disable('files_encryption');
+}
+
+
+\OCP\JSON::success(array('data' => array('message' => 'looks good')));
+