]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/bookmark/LinkUtils.php
Do not try to retrieve thumbnails for internal link
[github/shaarli/Shaarli.git] / application / bookmark / LinkUtils.php
index de5b61cbcaf6e8467d57eb9c49aa009d0a832754..9e9d4f0ad822f2fa63e5111769429d1b9191aef3 100644 (file)
@@ -220,3 +220,16 @@ function link_small_hash($date, $id)
 {
     return smallHash($date->format(LinkDB::LINK_DATE_FORMAT) . $id);
 }
+
+/**
+ * Returns whether or not the link is an internal note.
+ * Its URL starts by `?` because it's actually a permalink.
+ *
+ * @param string $linkUrl
+ *
+ * @return bool true if internal note, false otherwise.
+ */
+function is_note($linkUrl)
+{
+    return isset($linkUrl[0]) && $linkUrl[0] === '?';
+}