]> source.dussan.org Git - nextcloud-server.git/commitdiff
added missing isEmpty ajax file
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 30 Jul 2013 10:48:41 +0000 (12:48 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Tue, 30 Jul 2013 10:48:41 +0000 (12:48 +0200)
apps/files_trashbin/ajax/isEmpty.php [new file with mode: 0644]

diff --git a/apps/files_trashbin/ajax/isEmpty.php b/apps/files_trashbin/ajax/isEmpty.php
new file mode 100644 (file)
index 0000000..2e54c7e
--- /dev/null
@@ -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)));
+
+