diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-09-15 21:11:52 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2015-09-15 21:12:49 +0300 |
commit | 1f7ac2c309b7a43746a65f4676373071a8c3b359 (patch) | |
tree | 8f29dba4430e0029d02429d26ccb5bfb924c6a28 /apps/files_versions | |
parent | 0cefbd76b9369135075fda8c210dfa9ff88a264c (diff) |
Postrebase cleanup
Diffstat (limited to 'apps/files_versions')
-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 +} |