summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-07-30 09:28:39 -0700
committerMorris Jobke <morris.jobke@gmail.com>2013-07-30 09:28:39 -0700
commitdc8132f3a39c687b6315616f9f9f4ed9f81245b0 (patch)
tree648a938eaba50fe0890b3204c5c5d1331f61029d
parentf35aadb5760923a42c8c4395a1dd381faef5251d (diff)
parent6f20e081e47ac5ef2f2dde3f4cc9cdb0bf562283 (diff)
downloadnextcloud-server-dc8132f3a39c687b6315616f9f9f4ed9f81245b0.tar.gz
nextcloud-server-dc8132f3a39c687b6315616f9f9f4ed9f81245b0.zip
Merge pull request #4238 from owncloud/fix_4235
added missing isEmpty ajax file
-rw-r--r--apps/files_trashbin/ajax/isEmpty.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_trashbin/ajax/isEmpty.php b/apps/files_trashbin/ajax/isEmpty.php
new file mode 100644
index 00000000000..2e54c7e77b9
--- /dev/null
+++ b/apps/files_trashbin/ajax/isEmpty.php
@@ -0,0 +1,14 @@
+<?php
+
+/*
+ * Check if trash bin is empty to re-enable the deleted files button if needed
+ */
+
+OCP\JSON::checkLoggedIn();
+OCP\JSON::callCheck();
+
+$trashStatus = OCA\Files_Trashbin\Trashbin::isEmpty(OCP\User::getUser());
+
+OCP\JSON::success(array("data" => array("isEmpty" => $trashStatus)));
+
+