$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]);
$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)) {
$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) {
}
}
- $expanded_class = $expand_cdm ? "expanded" : "expandable";
+ $content_encoded = htmlspecialchars(json_encode($line["content"]));
- $tmp_content = "<div class=\"cdm $hlc_suffix $expanded_class $class\"
- id=\"RROW-$id\" data-article-id='$id' data-orig-feed-id='$feed_id' $mouseover_attrs>";
+ $tmp_content = "<div class=\"cdm expanded $hlc_suffix $class\"
+ id=\"RROW-$id\" data-content=\"$content_encoded\" data-article-id='$id' data-orig-feed-id='$feed_id' $mouseover_attrs>";
$tmp_content .= "<div class=\"cdmHeader\">";
$tmp_content .= "<div style=\"vertical-align : middle\">";
$tmp_content .= "<span id=\"RTITLE-$id\"
onclick=\"return cdmClicked(event, $id);\"
data-article-id=\"$id\"
- class=\"titleWrap hlMenuAttach $hlc_suffix\">
+ class=\"titleWrap hlMenuAttach $hlc_suffix\">
<a class=\"title $hlc_suffix\"
title=\"".htmlspecialchars($line["title"])."\"
target=\"_blank\" rel=\"noopener noreferrer\" href=\"".
$tmp_content .= $labels_str;
- $tmp_content .= "<span class='collapseBtn' style='display : none'>
- <img src=\"images/collapse.png\" onclick=\"cdmCollapseArticle(event, $id)\"
- title=\"".__("Collapse article")."\"/></span>";
-
- if (!$expand_cdm)
- $content_hidden = "style=\"display : none\"";
- else
- $excerpt_hidden = "style=\"display : none\"";
-
- $tmp_content .= "<span $excerpt_hidden id=\"CEXC-$id\" class=\"cdmExcerpt\">" . $content_preview . "</span>";
-
$tmp_content .= "</span>";
if (!$vfeed_group_enabled) {
$tmp_content .= "</div>"; //cdmHeader
- $tmp_content .= "<div class=\"cdmContent\" $content_hidden
- onclick=\"return cdmClicked(event, $id, true);\"
- id=\"CICD-$id\">";
+ $tmp_content .= "<div class=\"cdmContent\" onclick=\"return cdmClicked(event, $id, true);\" id=\"CICD-$id\">";
$tmp_content .= "<div id=\"POSTNOTE-$id\">";
if ($line['note']) {
if (!$line['lang']) $line['lang'] = 'en';
+ // this is filled from RROW data-content
$tmp_content .= "<div class=\"cdmContentInner\" lang=\"".$line['lang']."\">";
if ($line["orig_feed_id"]) {
}
}
- $tmp_content .= "<span id=\"CWRAP-$id\">";
- $tmp_content .= "<span id=\"CENCW-$id\" class=\"cencw\" style=\"display : none\">";
- $tmp_content .= htmlspecialchars($line["content"]);
- $tmp_content .= "</span>";
- $tmp_content .= "</span>";
-
$tmp_content .= "</div>"; //cdmContentInner
-
$tmp_content .= "<div class=\"cdmIntermediate\">";
$always_display_enclosures = $line["always_display_enclosures"];
$tmp_content .= "</div>"; // cdmIntermediate
- $tmp_content .= "<div class=\"cdmFooter\" onclick=\"cdmFooterClick(event)\">";
+ $tmp_content .= "<div class=\"cdmFooter\" onclick=\"event.stopPropagation()\">";
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) {
$tmp_content .= $p->hook_article_left_button($line);
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"];
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)";