summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/appinfo
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-07-30 22:31:18 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-10 20:40:43 +0200
commit4ef26157880f5cd5d5bd27abe0a6991d7c8a415a (patch)
treeb5ca833cb5f26b4097ff0653f70be284a328f618 /apps/files_trashbin/appinfo
parentc2856c05aa9cbdc3adddea127a8588183647ee0a (diff)
downloadnextcloud-server-4ef26157880f5cd5d5bd27abe0a6991d7c8a415a.tar.gz
nextcloud-server-4ef26157880f5cd5d5bd27abe0a6991d7c8a415a.zip
Enhance trashbin expiration settings
Diffstat (limited to 'apps/files_trashbin/appinfo')
-rw-r--r--apps/files_trashbin/appinfo/application.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/files_trashbin/appinfo/application.php b/apps/files_trashbin/appinfo/application.php
index 8d76d40f639..08ab7cd5c1d 100644
--- a/apps/files_trashbin/appinfo/application.php
+++ b/apps/files_trashbin/appinfo/application.php
@@ -1,6 +1,7 @@
<?php
/**
* @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author Victor Dubiniuk <dubiniuk@owncloud.com>
*
* @copyright Copyright (c) 2015, ownCloud, Inc.
* @license AGPL-3.0
@@ -22,16 +23,26 @@
namespace OCA\Files_Trashbin\AppInfo;
use OCP\AppFramework\App;
+use OCA\Files_Trashbin\Expiration;
class Application extends App {
- public function __construct(array $urlParams = array()) {
+ public function __construct (array $urlParams = []) {
parent::__construct('files_trashbin', $urlParams);
$container = $this->getContainer();
-
/*
* Register capabilities
*/
$container->registerCapability('OCA\Files_Trashbin\Capabilities');
+
+ /*
+ * Register expiration
+ */
+ $container->registerService('Expiration', function($c) {
+ return new Expiration(
+ $c->query('ServerContainer')->getConfig(),
+ $c->query('OCP\AppFramework\Utility\ITimeFactory')
+ );
+ });
}
}