From d592daea8343bb4dfecff5d97e93699581ccc58c Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 28 Nov 2016 18:24:15 +0100 Subject: Add a persistent 'shorturl' key to all links All existing link will keep their permalinks. New links will have smallhash generated with date+id. The purpose of this is to avoid collision between links due to their creation date. --- application/NetscapeBookmarkUtils.php | 1 + 1 file changed, 1 insertion(+) (limited to 'application/NetscapeBookmarkUtils.php') diff --git a/application/NetscapeBookmarkUtils.php b/application/NetscapeBookmarkUtils.php index 8a939adb..e7148d00 100644 --- a/application/NetscapeBookmarkUtils.php +++ b/application/NetscapeBookmarkUtils.php @@ -174,6 +174,7 @@ class NetscapeBookmarkUtils $newLinkDate->setTimezone(new DateTimeZone(date_default_timezone_get())); $newLink['created'] = $newLinkDate; $newLink['id'] = $linkDb->getNextId(); + $newLink['shorturl'] = link_small_hash($newLink['created'], $newLink['id']); $linkDb[$newLink['id']] = $newLink; $importCount++; } -- cgit v1.2.3