diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 16:13:18 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 22:52:27 +0200 |
commit | 673f26829d0badb4e2e8094df69bb7db45707761 (patch) | |
tree | a7024691ffdc36465ccbce0f15d0ee0bee475961 | |
parent | 643fa4624dd7ba2db1349f16131bf330aeee3387 (diff) |
fix backgroundjobs and hooks
-rw-r--r-- | backgroundjob/task.php | 7 | ||||
-rw-r--r-- | hooks/user.php | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/backgroundjob/task.php b/backgroundjob/task.php index 587259378..1c602cce0 100644 --- a/backgroundjob/task.php +++ b/backgroundjob/task.php @@ -26,18 +26,19 @@ namespace OCA\News\Backgroundjob; -use \OCA\News\DependencyInjection\DIContainer; +use \OCA\News\App\News; class Task { static public function run() { - $container = new DIContainer(); + $app = new News(); + $container = $app->getContainer(); // make it possible to turn off cron updates if you use an external // script to execute updates in paralell - if ($container['useCronUpdates']) { + if ($container['Config']->getUseCronUpdates()) { $container['Updater']->beforeUpdate(); $container['Updater']->update(); $container['Updater']->afterUpdate(); diff --git a/hooks/user.php b/hooks/user.php index e7d18c129..148b62164 100644 --- a/hooks/user.php +++ b/hooks/user.php @@ -25,7 +25,7 @@ namespace OCA\News\Hooks; -use \OCA\News\DependencyInjection\DIContainer; +use \OCA\News\App\News; class User { @@ -34,7 +34,8 @@ class User { public static function deleteUser($params) { $userId = $params['uid']; - $container = new DIContainer(); + $app = new News(); + $container = $app->getContainer(); // order is important! $container['ItemBusinessLayer']->deleteUser($userId); |