diff options
-rw-r--r-- | apps/files_versions/appinfo/app.php | 5 | ||||
-rw-r--r-- | apps/files_versions/lib/backgroundjob/expireversions.php | 14 |
2 files changed, 3 insertions, 16 deletions
diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 218d5351152..eadc7c69a23 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -20,11 +20,6 @@ * */ -namespace OCA\Files_Versions\AppInfo; - -$app = new Application(); -$container = $app->getContainer(); - \OCP\Util::addStyle('files_versions', 'versions'); \OCA\Files_Versions\Hooks::connectHooks(); diff --git a/apps/files_versions/lib/backgroundjob/expireversions.php b/apps/files_versions/lib/backgroundjob/expireversions.php index 8aa1fcb0635..ec5612b5a67 100644 --- a/apps/files_versions/lib/backgroundjob/expireversions.php +++ b/apps/files_versions/lib/backgroundjob/expireversions.php @@ -21,7 +21,6 @@ namespace OCA\Files_Versions\BackgroundJob; -use OCP\IDBConnection; use OCP\IUserManager; use OCA\Files_Versions\AppInfo\Application; use OCA\Files_Versions\Storage; @@ -35,25 +34,19 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob { * @var Expiration */ private $expiration; - - /** - * @var IDBConnection - */ - private $dbConnection; /** * @var IUserManager */ private $userManager; - public function __construct(IDBConnection $dbConnection = null, IUserManager $userManager = null, Expiration $expiration = null) { + public function __construct(IUserManager $userManager = null, Expiration $expiration = null) { // Run once per 30 minutes $this->setInterval(60 * 30); - if (is_null($expiration) || is_null($userManager) || is_null($dbConnection)) { + if (is_null($expiration) || is_null($userManager)) { $this->fixDIForJobs(); } else { - $this->dbConnection = $dbConnection; $this->expiration = $expiration; $this->userManager = $userManager; } @@ -61,7 +54,6 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob { protected function fixDIForJobs() { $application = new Application(); - $this->dbConnection = \OC::$server->getDatabaseConnection(); $this->expiration = $application->getContainer()->query('Expiration'); $this->userManager = \OC::$server->getUserManager(); } @@ -103,4 +95,4 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob { return true; } -}
\ No newline at end of file +} |