mirror of
https://github.com/gamaio/lobli.git
synced 2025-08-13 18:28:47 +00:00
Change click tracking to sorted set.
Using a sorted set makes it easier to sort from highest to lowest on the stats page. Minor change how tracking is done on the index and link checking has been updated.
This commit is contained in:
@@ -47,8 +47,7 @@
|
||||
$redis->rpush("links:$short", date("d/m/Y", strtotime($str)));
|
||||
$redis->expireAt("links:$short", $now+$xTime);
|
||||
|
||||
$redis->set("tracking:clicks:$link", 1);
|
||||
$redis->expireAt("tracking:clicks:$link", $now+$xTime);
|
||||
$redis->zAdd("tracking:clicks", 1, $link);
|
||||
|
||||
return "0$seperator$short$seperator$title";
|
||||
}
|
||||
|
Reference in New Issue
Block a user