summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backgroundjob/task.php7
-rw-r--r--hooks/user.php5
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);