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/LinkFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/LinkFilter.php') diff --git a/application/LinkFilter.php b/application/LinkFilter.php index 7bab46ba..daa6d9cc 100644 --- a/application/LinkFilter.php +++ b/application/LinkFilter.php @@ -120,7 +120,7 @@ class LinkFilter { $filtered = array(); foreach ($this->links as $key => $l) { - if ($smallHash == smallHash($l['created']->format('Ymd_His'))) { + if ($smallHash == $l['shorturl']) { // Yes, this is ugly and slow $filtered[$key] = $l; return $filtered; -- cgit v1.2.3