From cd49e9819bea35a4db05e3e76910b739898c2219 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 22 Mar 2020 16:31:20 +0100 Subject: New core-extensions to allow Docker volumes for third-party extensions (#2837) * New core-extensions to allow Docker volumes for third-party extensions #Fix https://github.com/FreshRSS/FreshRSS/issues/2650 Split our extensions directory into two: 1) Core extensions shipped with FreshRSS in ./lib/core-extensions/ 2) Third-party extensions modified by end-users in ./extensions/ which can easily be mounted as a Docker volume * Example of Docker Compose with extensions * Back-compatibility + fix array merge bug --- lib/Minz/ExtensionManager.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/Minz/ExtensionManager.php') diff --git a/lib/Minz/ExtensionManager.php b/lib/Minz/ExtensionManager.php index e6b8dafb0..b2814e4a3 100644 --- a/lib/Minz/ExtensionManager.php +++ b/lib/Minz/ExtensionManager.php @@ -1,7 +1,7 @@ extensions_enabled; - foreach ($list_potential_extensions as $ext_dir) { - $ext_pathname = EXTENSIONS_PATH . '/' . $ext_dir; + foreach ($list_potential_extensions as $ext_pathname) { if (!is_dir($ext_pathname)) { continue; } @@ -111,7 +112,7 @@ class Minz_ExtensionManager { // Try to load extension itself $extension = self::load($meta_json); - if (!is_null($extension)) { + if ($extension != null) { self::register($extension); } } -- cgit v1.2.3