devshort

private self-hosted shortlink service
git clone https://git.clttr.info/devshort.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 40fd4668588fe8ce3cb889a39c97d13794cf74d0
parent c0c8766b4d565047b3d3d4f437cca2f5837fedf2
Author: Florian <flokx@users.noreply.github.com>
Date:   Mon, 10 Feb 2020 10:06:54 +0100

Fix index counter

Diffstat:
Mdata/stats.json | 2+-
Mindex.php | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/stats.json b/data/stats.json @@ -1,4 +1,4 @@ { "404-request": [], - "Index": [] + "index": [] } diff --git a/index.php b/index.php @@ -8,7 +8,7 @@ $stats_path = implode(DIRECTORY_SEPARATOR, array(__DIR__, "data", "stats.json")) $stats_content = json_decode(file_get_contents($stats_path), true); // Count the access -$stats_content["Index"][date("Y-m-d")] += 1; +$stats_content["index"][date("Y-m-d")] += 1; file_put_contents($stats_path, json_encode($stats_content, JSON_PRETTY_PRINT)); // Generate custom buttons for the footer