Merge branch 'master' of git.fakecake.org:tt-rss

This commit is contained in:
Andrew Dolgov 2015-08-11 09:05:39 +03:00
commit 023737c756
4 changed files with 21 additions and 9 deletions

View File

@ -991,6 +991,11 @@ class Pref_Feeds extends Handler_Protected {
if (!$batch) { if (!$batch) {
$result = db_query("SELECT feed_url FROM ttrss_feeds WHERE id = " . $feed_id);
$orig_feed_url = db_fetch_result($result, 0, "feed_url");
$reset_basic_info = $orig_feed_url != $feed_link;
$this->dbh->query("UPDATE ttrss_feeds SET $this->dbh->query("UPDATE ttrss_feeds SET
$category_qpart $category_qpart
title = '$feed_title', feed_url = '$feed_link', title = '$feed_title', feed_url = '$feed_link',
@ -1008,6 +1013,12 @@ class Pref_Feeds extends Handler_Protected {
feed_language = '$feed_language' feed_language = '$feed_language'
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]); WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
if ($reset_basic_info) {
require_once "rssfuncs.php";
set_basic_feed_info($feed_id);
}
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_SAVE_FEED, PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_SAVE_FEED,
"hook_prefs_save_feed", $feed_id); "hook_prefs_save_feed", $feed_id);

View File

@ -739,7 +739,8 @@
marked, marked,
published, published,
last_marked, last_marked,
last_published last_published,
last_read
FROM FROM
$from_qpart $from_qpart
WHERE WHERE

View File

@ -796,7 +796,7 @@
$entry_content = db_escape_string($entry_content, false); $entry_content = db_escape_string($entry_content, false);
db_query("BEGIN"); //db_query("BEGIN");
$result = db_query("SELECT id FROM ttrss_entries $result = db_query("SELECT id FROM ttrss_entries
WHERE (guid = '$entry_guid' OR guid = '$entry_guid_hashed')"); WHERE (guid = '$entry_guid' OR guid = '$entry_guid_hashed')");
@ -889,7 +889,7 @@
} }
if (find_article_filter($article_filters, "filter")) { if (find_article_filter($article_filters, "filter")) {
db_query("COMMIT"); // close transaction in progress //db_query("COMMIT"); // close transaction in progress
continue; continue;
} }
@ -1020,7 +1020,7 @@
} }
} }
db_query("COMMIT"); //db_query("COMMIT");
_debug("assigning labels [other]...", $debug_enabled); _debug("assigning labels [other]...", $debug_enabled);
@ -1054,7 +1054,7 @@
print_r($enclosures); print_r($enclosures);
} }
db_query("BEGIN"); //db_query("BEGIN");
// debugging // debugging
// db_query("DELETE FROM ttrss_enclosures WHERE post_id = '$entry_ref_id'"); // db_query("DELETE FROM ttrss_enclosures WHERE post_id = '$entry_ref_id'");
@ -1077,7 +1077,7 @@
} }
} }
db_query("COMMIT"); //db_query("COMMIT");
// check for manual tags (we have to do it here since they're loaded from filters) // check for manual tags (we have to do it here since they're loaded from filters)
@ -1121,7 +1121,7 @@
if (count($filtered_tags) > 0) { if (count($filtered_tags) > 0) {
db_query("BEGIN"); //db_query("BEGIN");
foreach ($filtered_tags as $tag) { foreach ($filtered_tags as $tag) {
@ -1154,7 +1154,7 @@
SET tag_cache = '$tags_str' WHERE ref_id = '$entry_ref_id' SET tag_cache = '$tags_str' WHERE ref_id = '$entry_ref_id'
AND owner_uid = $owner_uid"); AND owner_uid = $owner_uid");
db_query("COMMIT"); //db_query("COMMIT");
} }
_debug("article processed", $debug_enabled); _debug("article processed", $debug_enabled);

View File

@ -95,7 +95,7 @@ class Af_RedditImgur extends Plugin {
if ($tmpdoc) { if ($tmpdoc) {
$tmpxpath = new DOMXPath($tmpdoc); $tmpxpath = new DOMXPath($tmpdoc);
$source_meta = $tmpxpath->query("//meta[@property='og:video']")->item(0); $source_meta = $tmpxpath->query("//meta[@name='twitter:player:stream' and contains(@content, '.mp4')]")->item(0);
$poster_meta = $tmpxpath->query("//meta[@property='og:image' and contains(@content,'thumbs.gfycat.com')]")->item(0); $poster_meta = $tmpxpath->query("//meta[@property='og:image' and contains(@content,'thumbs.gfycat.com')]")->item(0);
if ($source_meta) { if ($source_meta) {