aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Utils.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-11-28 18:24:15 +0100
committerArthurHoaro <arthur@hoa.ro>2016-12-12 03:03:12 +0100
commitd592daea8343bb4dfecff5d97e93699581ccc58c (patch)
treed508b902b3aba45795fafe16e0b921ac5ea7c4c4 /application/Utils.php
parentc3dfd8995921083ff7250c25d0b6ab1184b91aff (diff)
downloadShaarli-d592daea8343bb4dfecff5d97e93699581ccc58c.tar.gz
Shaarli-d592daea8343bb4dfecff5d97e93699581ccc58c.tar.zst
Shaarli-d592daea8343bb4dfecff5d97e93699581ccc58c.zip
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.
Diffstat (limited to 'application/Utils.php')
-rw-r--r--application/Utils.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/application/Utils.php b/application/Utils.php
index 0166ee2a..0a5b476e 100644
--- a/application/Utils.php
+++ b/application/Utils.php
@@ -31,7 +31,11 @@ function logm($logFile, $clientIp, $message)
31 * - are NOT cryptographically secure (they CAN be forged) 31 * - are NOT cryptographically secure (they CAN be forged)
32 * 32 *
33 * In Shaarli, they are used as a tinyurl-like link to individual entries, 33 * In Shaarli, they are used as a tinyurl-like link to individual entries,
34 * e.g. smallHash('20111006_131924') --> yZH23w 34 * built once with the combination of the date and item ID.
35 * e.g. smallHash('20111006_131924' . 142) --> eaWxtQ
36 *
37 * @warning before v0.8.1, smallhashes were built only with the date,
38 * and their value has been preserved.
35 * 39 *
36 * @param string $text Create a hash from this text. 40 * @param string $text Create a hash from this text.
37 * 41 *