From 0084f0d1ba81522b243bb3b9138334ba0a7d2f00 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 12 Aug 2014 19:36:29 +0400 Subject: [PATCH] update stored article after filter has finished processing to prevent plugins from reverting changes of earlier invoked plugins (experimental) --- include/rssfuncs.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/rssfuncs.php b/include/rssfuncs.php index cdc490cb0..f657f8413 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -687,6 +687,12 @@ foreach ($pluginhost->get_hooks(PluginHost::HOOK_ARTICLE_FILTER) as $plugin) { $article = $plugin->hook_article_filter($article); + + $article["stored"] = array("title" => $article["title"], + "content" => $article["content"], + "link" => $article["link"], + "tags" => $article["tags"], + "author" => $article["author"]); } $entry_tags = $article["tags"]; @@ -697,7 +703,6 @@ $entry_plugin_data = db_escape_string($article["plugin_data"]); $entry_content = $article["content"]; // escaped below - _debug("plugin data: $entry_plugin_data", $debug_enabled); if ($cache_images && is_writable(CACHE_DIR . '/images'))