From 80cba2f5d710f7c97a83c7801f29a5df51088bdc Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 3 Sep 2013 17:53:05 +0300 Subject: [PATCH] Do not show deleted files in documents --- lib/storage.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/storage.php b/lib/storage.php index 13386f72..59b07096 100755 --- a/lib/storage.php +++ b/lib/storage.php @@ -27,7 +27,17 @@ namespace OCA\Documents; class Storage { public static function getDocuments() { - $list=\OCP\Files::searchByMime('application/vnd.oasis.opendocument.text'); + $list = array_filter( + \OCP\Files::searchByMime('application/vnd.oasis.opendocument.text'), + function($item){ + //filter Deleted + if (strpos($item['path'], '_trashbin')===0){ + return false; + } + return true; + } + ); + return $list; }