summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-02-23 12:07:46 +0400
committerAndrew Dolgov <[email protected]>2013-02-23 12:07:46 +0400
commite02555c1b8efad4fdc918e8245624e0b641ac6df (patch)
treefc30ca23ff7b1b82359cd7bb03b3a1fc808ceac4 /include
parent389859b5d459f3b6ce3c09755b2d15069a77334a (diff)
add af_* plugin workaround for already processed article
Diffstat (limited to 'include')
-rw-r--r--include/rssfuncs.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 5cb22f8b8..4ad637342 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -516,14 +516,20 @@
_debug("update_rss_feed: applying plugin filters..");
}
- // Todo unify with id checking below
- $result = db_query($link, "SELECT plugin_data FROM ttrss_entries
- WHERE guid = '".db_escape_string($entry_guid)."'");
+ // FIXME not sure if owner_uid is a good idea here, we may have a base entry without user entry (?)
+ $result = db_query($link, "SELECT plugin_data,title,content,link,tag_cache,author FROM ttrss_entries, ttrss_user_entries
+ WHERE ref_id = id AND guid = '".db_escape_string($entry_guid)."' AND owner_uid = $owner_uid");
if (db_num_rows($result) != 0) {
$entry_plugin_data = db_fetch_result($result, 0, "plugin_data");
+ $stored_article = array("title" => db_fetch_result($result, 0, "title"),
+ "content" => db_fetch_result($result, 0, "content"),
+ "link" => db_fetch_result($result, 0, "link"),
+ "tags" => explode(",", db_fetch_result($result, 0, "tag_cache")),
+ "author" => db_fetch_result($result, 0, "author"));
} else {
$entry_plugin_data = "";
+ $stored_article = array();
}
$article = array("owner_uid" => $owner_uid, // read only
@@ -533,7 +539,8 @@
"link" => $entry_link,
"tags" => $entry_tags,
"plugin_data" => $entry_plugin_data,
- "author" => $entry_author);
+ "author" => $entry_author,
+ "stored" => $stored_article);
foreach ($pluginhost->get_hooks($pluginhost::HOOK_ARTICLE_FILTER) as $plugin) {
$article = $plugin->hook_article_filter($article);