summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/appinfo
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-08-11 22:21:32 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2015-09-16 17:37:21 +0300
commit8ac3d5e36c7d628f1ba4d27c68d54786eed972b2 (patch)
treed6037ab97eff31a02ede7697074ff853cc258a9e /apps/files_trashbin/appinfo
parenta1e343ae7ce69fd8dd39e4d58e172c00d1992cbd (diff)
downloadnextcloud-server-8ac3d5e36c7d628f1ba4d27c68d54786eed972b2.tar.gz
nextcloud-server-8ac3d5e36c7d628f1ba4d27c68d54786eed972b2.zip
Add expiration cronjob
Diffstat (limited to 'apps/files_trashbin/appinfo')
-rw-r--r--apps/files_trashbin/appinfo/app.php1
-rw-r--r--apps/files_trashbin/appinfo/install.php23
-rw-r--r--apps/files_trashbin/appinfo/update.php3
3 files changed, 27 insertions, 0 deletions
diff --git a/apps/files_trashbin/appinfo/app.php b/apps/files_trashbin/appinfo/app.php
index 8f079fe6120..4805f9eeafd 100644
--- a/apps/files_trashbin/appinfo/app.php
+++ b/apps/files_trashbin/appinfo/app.php
@@ -23,6 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
+
$l = \OC::$server->getL10N('files_trashbin');
// register hooks
diff --git a/apps/files_trashbin/appinfo/install.php b/apps/files_trashbin/appinfo/install.php
new file mode 100644
index 00000000000..dc4c2847c22
--- /dev/null
+++ b/apps/files_trashbin/appinfo/install.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * @author Victor Dubiniuk <dubiniuk@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/>
+ *
+ */
+
+ // Cron job for deleting expired trash items
+\OC::$server->getJobList()->add('OCA\Files_Trashbin\BackgroundJob\ExpireTrash');
diff --git a/apps/files_trashbin/appinfo/update.php b/apps/files_trashbin/appinfo/update.php
index b77210ae4c0..ae018a9da5d 100644
--- a/apps/files_trashbin/appinfo/update.php
+++ b/apps/files_trashbin/appinfo/update.php
@@ -46,3 +46,6 @@ if (version_compare($installedVersion, '0.6.4', '<')) {
$config->setSystemValue('trashbin_retention_obligation', $newObligation);
$config->deleteSystemValue('trashbin_auto_expire');
}
+
+// Cron job for deleting expired trash items
+\OC::$server->getJobList()->add('OCA\Files_Trashbin\BackgroundJob\ExpireTrash');