diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-22 12:14:23 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-22 12:14:23 +0200 |
commit | 19910df42e93ef370048e8d0d2609af71bf46676 (patch) | |
tree | 2a9557b219a6f3d8efb830333900473a93241b19 /appinfo/application.php | |
parent | fa73d339df403506d58104ee60575972b88bfc09 (diff) |
fix #454, allow global enhancers
Diffstat (limited to 'appinfo/application.php')
-rw-r--r-- | appinfo/application.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/appinfo/application.php b/appinfo/application.php index 5b3414a52..37dace4c4 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -49,6 +49,7 @@ use \OCA\News\Fetcher\Fetcher; use \OCA\News\Fetcher\FeedFetcher; use \OCA\News\ArticleEnhancer\Enhancer; +use \OCA\News\ArticleEnhancer\GlobalArticleEnhancer; use \OCA\News\ArticleEnhancer\XPathArticleEnhancer; use \OCA\News\ArticleEnhancer\RegexArticleEnhancer; @@ -350,6 +351,10 @@ class Application extends App { return new \HTMLPurifier($config); }); + $container->registerService('GlobalArticleEnhancer', function($c) { + return new GlobalArticleEnhancer(); + }); + $container->registerService('Enhancer', function($c) { $enhancer = new Enhancer(); @@ -377,6 +382,8 @@ class Application extends App { } } + $enhancer->registerGlobalEnhancer($c->query('GlobalArticleEnhancer')); + return $enhancer; }); |