summaryrefslogtreecommitdiffstats
path: root/appinfo
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-08 15:24:19 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-08 15:24:19 +0200
commit483d2551eaea6ffc3f7e13c8ea9c3ea215fadff0 (patch)
treedbc064b807becd290f772d383789beb24b943701 /appinfo
parent331b832fc0f48015ee49743352f654fcceea781b (diff)
get rid of simplepie absolute url function and use Net url2
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/application.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/appinfo/application.php b/appinfo/application.php
index 6028d7c1c..ad15dac84 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -54,16 +54,20 @@ use \OCA\News\ArticleEnhancer\XPathArticleEnhancer;
use \OCA\News\ArticleEnhancer\RegexArticleEnhancer;
-require_once __DIR__ . '/../3rdparty/htmlpurifier/library/HTMLPurifier.auto.php';
+$thirdPartyLibs = [
+ '\HTMLPurifier' => 'htmlpurifier/library/HTMLPurifier.auto.php',
+ '\SimplePie' => 'simplepie/autoloader.php',
+ '\ZendXML\Security' => 'ZendXml/vendor/autoload.php',
+ '\Net_URL2' => 'Net_URL2/Net/URL2.php'
+];
// to prevent clashes with installed app framework versions
-if (!class_exists('\SimplePie')) {
- require_once __DIR__ . '/../3rdparty/simplepie/autoloader.php';
+foreach ($thirdPartyLibs as $class => $path) {
+ if (!class_exists($class)) {
+ require_once __DIR__ . '/../3rdparty/' . $path;
+ }
}
-if (!class_exists('\ZendXML\Security')) {
- require_once __DIR__ . '/../3rdparty/ZendXml/vendor/autoload.php';
-}
class Application extends App {