From 031acde003b85ae34a4996d0c02fdc41ffae5515 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 13 Jun 2018 09:27:02 +0200 Subject: Fix extension hook for updated articles (#1932) * Fix extension hook for updated articles https://github.com/FreshRSS/FreshRSS/issues/1926 * Enable extensions during PubSubHubbub * A little array protection * Changelog 1926 https://github.com/FreshRSS/FreshRSS/issues/1926 https://github.com/FreshRSS/FreshRSS/pull/1932 * Add null check --- p/api/pshb.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'p/api') diff --git a/p/api/pshb.php b/p/api/pshb.php index 57a7bb0dd..ac78bfd74 100644 --- a/p/api/pshb.php +++ b/p/api/pshb.php @@ -116,6 +116,8 @@ if ($self !== base64url_decode($canonical64)) { $self = base64url_decode($canonical64); } +Minz_ExtensionManager::init(); + $nb = 0; foreach ($users as $userFilename) { $username = basename($userFilename, '.txt'); @@ -132,6 +134,10 @@ foreach ($users as $userFilename) { join_path(FRESHRSS_PATH, 'config-user.default.php')); new Minz_ModelPdo($username); //TODO: FIXME: Quick-fix while waiting for a better FreshRSS() constructor/init FreshRSS_Context::init(); + if (FreshRSS_Context::$user_conf != null) { + Minz_ExtensionManager::enableByList(FreshRSS_Context::$user_conf->extensions_enabled); + } + list($updated_feeds, $feed, $nb_new_articles) = FreshRSS_feed_Controller::actualizeFeed(0, $self, false, $simplePie); if ($updated_feeds > 0 || $feed != false) { $nb++; -- cgit v1.2.3