]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/bookmark/LinkUtils.php
Merge pull request #1273 from ArthurHoaro/feature/ban-manager
[github/shaarli/Shaarli.git] / application / bookmark / LinkUtils.php
index 988970bdf924854ba06fa352a61a1d3c62da94bd..35a5b290454b32870464c6457fea73059d613f4c 100644 (file)
@@ -204,3 +204,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] === '?';
+}