]> git.wh0rd.org - tt-rss.git/blobdiff - classes/feeds.php
some more eslint-related stuff
[tt-rss.git] / classes / feeds.php
index 015418328729ccb3cc7849be80c99f399533e338..7e48efd6c3bb7ff7521cb6865408bf998d3531da 100755 (executable)
@@ -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]);
@@ -477,6 +477,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) {
 
@@ -525,7 +527,7 @@ class Feeds extends Handler_Protected {
                                        $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=\"".
@@ -630,7 +632,7 @@ class Feeds extends Handler_Protected {
 
                                        $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);
@@ -1466,6 +1468,10 @@ class Feeds extends Handler_Protected {
 
                $contents = @fetch_file_contents($url, false, $auth_login, $auth_pass);
 
+               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)";
@@ -1474,10 +1480,6 @@ class Feeds extends Handler_Protected {
                        return array("code" => 5, "message" => $fetch_last_error);
                }
 
-               foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SUBSCRIBE_FEED) as $plugin) {
-                       $contents = $plugin->hook_subscribe_feed($contents, $url, $auth_login, $auth_pass);
-               }
-
                if (is_html($contents)) {
                        $feedUrls = get_feeds_from_html($url, $contents);