aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/bookmark/LinkUtils.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/bookmark/LinkUtils.php')
-rw-r--r--application/bookmark/LinkUtils.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/application/bookmark/LinkUtils.php b/application/bookmark/LinkUtils.php
index de5b61cb..9e9d4f0a 100644
--- a/application/bookmark/LinkUtils.php
+++ b/application/bookmark/LinkUtils.php
@@ -220,3 +220,16 @@ function link_small_hash($date, $id)
220{ 220{
221 return smallHash($date->format(LinkDB::LINK_DATE_FORMAT) . $id); 221 return smallHash($date->format(LinkDB::LINK_DATE_FORMAT) . $id);
222} 222}
223
224/**
225 * Returns whether or not the link is an internal note.
226 * Its URL starts by `?` because it's actually a permalink.
227 *
228 * @param string $linkUrl
229 *
230 * @return bool true if internal note, false otherwise.
231 */
232function is_note($linkUrl)
233{
234 return isset($linkUrl[0]) && $linkUrl[0] === '?';
235}