diff options
Diffstat (limited to 'application/bookmark/LinkUtils.php')
-rw-r--r-- | application/bookmark/LinkUtils.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/application/bookmark/LinkUtils.php b/application/bookmark/LinkUtils.php index 988970bd..35a5b290 100644 --- a/application/bookmark/LinkUtils.php +++ b/application/bookmark/LinkUtils.php | |||
@@ -204,3 +204,16 @@ function link_small_hash($date, $id) | |||
204 | { | 204 | { |
205 | return smallHash($date->format(LinkDB::LINK_DATE_FORMAT) . $id); | 205 | return smallHash($date->format(LinkDB::LINK_DATE_FORMAT) . $id); |
206 | } | 206 | } |
207 | |||
208 | /** | ||
209 | * Returns whether or not the link is an internal note. | ||
210 | * Its URL starts by `?` because it's actually a permalink. | ||
211 | * | ||
212 | * @param string $linkUrl | ||
213 | * | ||
214 | * @return bool true if internal note, false otherwise. | ||
215 | */ | ||
216 | function is_note($linkUrl) | ||
217 | { | ||
218 | return isset($linkUrl[0]) && $linkUrl[0] === '?'; | ||
219 | } | ||