summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/ajax/isEmpty.php
blob: 897ee26289507002e383fcc8e072aa4a4a3a43e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

/*
 * Check if trash bin is empty to re-enable the deleted files button if needed
 */

OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
\OC::$server->getSession()->close();

$trashStatus = OCA\Files_Trashbin\Trashbin::isEmpty(OCP\User::getUser());

OCP\JSON::success(array("data" => array("isEmpty" => $trashStatus)));