From 40af1b8d0be524563dc6a931206eefc24a21a49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Fri, 15 Dec 2017 17:22:59 +0100 Subject: [PATCH] fixed statslog --- www/index.php | 2 +- www/pages/api_stats.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/www/index.php b/www/index.php index 89db3c6..9324a24 100644 --- a/www/index.php +++ b/www/index.php @@ -138,6 +138,6 @@ foreach ($URL_RULES as $rule) //TODO fast //TODO gzip (?) //TODO better gh widget - +//TODO remove db table prefixes diff --git a/www/pages/api_stats.php b/www/pages/api_stats.php index 0cbfecd..3698853 100644 --- a/www/pages/api_stats.php +++ b/www/pages/api_stats.php @@ -9,13 +9,14 @@ $ver = $OPTIONS['Version']; $prv = $OPTIONS['ProviderStr']; $pid = $OPTIONS['ProviderID']; - $tnc = $OPTIONS['NoteCount']; + $tnc = $OPTIONS['NoteCount']; + $uip = $OPTIONS['NoteCount']; if ($nam === 'AlephNote') { Database::connect(); - Database::sql_exec_prep('REPLACE INTO ms4_an_statslog (ClientID, Version, ProviderStr, ProviderID, NoteCount) VALUES (:cid, :ver, :prv, :pid, :tnc)', + Database::sql_exec_prep('INSERT INTO ms4_an_statslog (ClientID, Version, ProviderStr, ProviderID, NoteCount) VALUES (:cid, :ver, :prv, :pid, :tnc) ON DUPLICATE KEY UPDATE Version=:v,ProviderStr=:pstr,ProviderID=:pid,NoteCount=:nc', [ [':cid', $cid, PDO::PARAM_STR], [':ver', $ver, PDO::PARAM_STR],