X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Ffeeds.php;h=fd3d8f757cfda1e91312ad9214db1f1084c7eb00;hb=76733318506542543b91c53458058c931e2fd7f4;hp=47a6b56b87973356161d5129ebeda4020efcbb41;hpb=5d95676ecc665395bad96b3a8b2930715e5b947b;p=tt-rss.git diff --git a/classes/feeds.php b/classes/feeds.php index 47a6b56b..fd3d8f75 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -173,7 +173,7 @@ class Feeds extends Handler_Protected { $method_split = explode(":", $method); if ($method == "ForceUpdate" && $feed > 0 && is_numeric($feed)) { - $sth = $this->pdo->prepare("UPDATE ttrss_feeds + $sth = $this->pdo->prepare("UPDATE ttrss_feeds SET last_updated = '1970-01-01', last_update_started = '1970-01-01' WHERE id = ?"); $sth->execute([$feed]); @@ -277,7 +277,6 @@ class Feeds extends Handler_Protected { $lnum = $offset; $num_unread = 0; if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PS", $timing_info); - $expand_cdm = get_pref('CDM_EXPANDED'); if (is_object($result)) { @@ -477,6 +476,8 @@ class Feeds extends Handler_Protected { $line = $p->hook_render_article_cdm($line); } + $line['content'] = rewrite_cached_urls($line['content']); + if ($vfeed_group_enabled && $line["feed_title"]) { if ($feed_id != $vgroup_last_feed) { @@ -495,10 +496,10 @@ class Feeds extends Handler_Protected { } } - $expanded_class = $expand_cdm ? "expanded" : "expandable"; + $content_encoded = htmlspecialchars(json_encode($line["content"])); - $tmp_content = "
"; + $tmp_content = "
"; $tmp_content .= "
"; $tmp_content .= "
"; @@ -525,7 +526,7 @@ class Feeds extends Handler_Protected { $tmp_content .= " + class=\"titleWrap hlMenuAttach $hlc_suffix\"> "; - - if (!$expand_cdm) - $content_hidden = "style=\"display : none\""; - else - $excerpt_hidden = "style=\"display : none\""; - - $tmp_content .= "" . $content_preview . ""; - $tmp_content .= ""; if (!$vfeed_group_enabled) { @@ -574,9 +564,7 @@ class Feeds extends Handler_Protected { $tmp_content .= "
"; //cdmHeader - $tmp_content .= "
"; + $tmp_content .= "
"; $tmp_content .= "
"; if ($line['note']) { @@ -586,6 +574,7 @@ class Feeds extends Handler_Protected { if (!$line['lang']) $line['lang'] = 'en'; + // this is filled from RROW data-content $tmp_content .= "
"; if ($line["orig_feed_id"]) { @@ -614,14 +603,7 @@ class Feeds extends Handler_Protected { } } - $tmp_content .= ""; - $tmp_content .= ""; - $tmp_content .= htmlspecialchars($line["content"]); - $tmp_content .= ""; - $tmp_content .= ""; - $tmp_content .= "
"; //cdmContentInner - $tmp_content .= "
"; $always_display_enclosures = $line["always_display_enclosures"]; @@ -630,7 +612,7 @@ class Feeds extends Handler_Protected { $tmp_content .= "
"; // cdmIntermediate - $tmp_content .= "
"; + $tmp_content .= "
"; foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) { $tmp_content .= $p->hook_article_left_button($line); @@ -1132,6 +1114,9 @@ class Feeds extends Handler_Protected { function update_debugger() { header("Content-type: text/html"); + Debug::set_enabled(true); + Debug::set_loglevel($_REQUEST["xdebug"]); + $feed_id = (int)$_REQUEST["feed_id"]; @$do_update = $_REQUEST["action"] == "do_update"; $csrf_token = $_REQUEST["csrf_token"]; @@ -1469,7 +1454,7 @@ class Feeds extends Handler_Protected { foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SUBSCRIBE_FEED) as $plugin) { $contents = $plugin->hook_subscribe_feed($contents, $url, $auth_login, $auth_pass); } - + if (!$contents) { if (preg_match("/cloudflare\.com/", $fetch_last_error_content)) { $fetch_last_error .= " (feed behind Cloudflare)";