summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-06-24 15:11:02 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-06-24 19:09:20 +0200
commit407db913de26d090567529546be2bab6424607cf (patch)
tree3911442c757cbfc0f18aa5f6f843c901edb84825 /apps/files_trashbin/appinfo
parent7a3cfbc3c8d7e2453e962ace592212f00148176e (diff)
downloadnextcloud-server-407db913de26d090567529546be2bab6424607cf.tar.gz
nextcloud-server-407db913de26d090567529546be2bab6424607cf.zip
add occ command to trashbin to remove deleted files
Diffstat (limited to 'apps/files_trashbin/appinfo')
-rw-r--r--apps/files_trashbin/appinfo/register_command.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/files_trashbin/appinfo/register_command.php b/apps/files_trashbin/appinfo/register_command.php
new file mode 100644
index 00000000000..ae4196dd506
--- /dev/null
+++ b/apps/files_trashbin/appinfo/register_command.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * @author Björn Schießle <schiessle@owncloud.com>
+ *
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+
+use OCA\Files_Trashbin\Command\CleanUp;
+
+$userManager = OC::$server->getUserManager();
+$rootFolder = \OC::$server->getRootFolder();
+$dbConnection = \OC::$server->getDatabaseConnection();
+/** @var Symfony\Component\Console\Application $application */
+$application->add(new CleanUp($rootFolder, $userManager, $dbConnection));