From a8e7da01146455f13ef06b151a7dafedd3acf769 Mon Sep 17 00:00:00 2001
From: ArthurHoaro <arthur@hoa.ro>
Date: Sat, 9 Feb 2019 14:13:08 +0100
Subject: Do not try to retrieve thumbnails for internal link

Also adds a helper function to determine if a link is a note and apply it across multiple files.
---
 application/feed/FeedBuilder.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'application/feed')

diff --git a/application/feed/FeedBuilder.php b/application/feed/FeedBuilder.php
index b66f2f91..fec0452b 100644
--- a/application/feed/FeedBuilder.php
+++ b/application/feed/FeedBuilder.php
@@ -147,8 +147,8 @@ class FeedBuilder
     protected function buildItem($link, $pageaddr)
     {
         $link['guid'] = $pageaddr . '?' . $link['shorturl'];
-        // Check for both signs of a note: starting with ? and 7 chars long.
-        if ($link['url'][0] === '?' && strlen($link['url']) === 7) {
+        // Prepend the root URL for notes
+        if (is_note($link['url'])) {
             $link['url'] = $pageaddr . $link['url'];
         }
         if ($this->usePermalinks === true) {
-- 
cgit v1.2.3