From 1f7ac2c309b7a43746a65f4676373071a8c3b359 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 15 Sep 2015 21:11:52 +0300 Subject: Postrebase cleanup --- apps/files_versions/lib/backgroundjob/expireversions.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'apps/files_versions/lib') 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 +} -- cgit v1.2.3