From 8ac3d5e36c7d628f1ba4d27c68d54786eed972b2 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 11 Aug 2015 22:21:32 +0300 Subject: Add expiration cronjob --- apps/files_trashbin/appinfo/app.php | 1 + apps/files_trashbin/appinfo/install.php | 23 +++++++++++++++++++++++ apps/files_trashbin/appinfo/update.php | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 apps/files_trashbin/appinfo/install.php (limited to 'apps/files_trashbin/appinfo') 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 * */ + $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 @@ + + * + * @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 + * + */ + + // 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'); -- cgit v1.2.3