summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--assets/js/app.js.bvr6
-rwxr-xr-xdist/js/app.js8
-rwxr-xr-xdist/pages/about.html2
-rwxr-xr-xdist/sw.js4
-rw-r--r--server/report/index.php9
5 files changed, 19 insertions, 10 deletions
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index a75505e..8e150a2 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -62,7 +62,11 @@ var error_report_function = async function (msg, url, lineNo, columnNo, error) {
if(selectedE == "on") {
var data = {};
data.error = {"msg": msg, "url": url, "line": lineNo, "column": columnNo, "obj": error};
- data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit};
+ data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit, "username": };
+
+ // Load required data
+ data.client.username = await localforage.getItem("username");
+
data.type = "error";
$.post("https://beziapp-report.gimb.tk/", data);
} else {
diff --git a/dist/js/app.js b/dist/js/app.js
index 594c9a1..798c4c2 100755
--- a/dist/js/app.js
+++ b/dist/js/app.js
@@ -3,7 +3,7 @@
const app_version = "1.0.14-beta";
-const previous_commit = "a6a552efe42f84f439c82e21ba5dcc0f66e43a82";
+const previous_commit = "dfd78d5fa91f1c3844a3c9b828ba699775a0c0d4";
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js")
@@ -65,7 +65,11 @@ var error_report_function = async function (msg, url, lineNo, columnNo, error) {
if(selectedE == "on") {
var data = {};
data.error = {"msg": msg, "url": url, "line": lineNo, "column": columnNo, "obj": error};
- data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit};
+ data.client = {"ua": navigator.userAgent, "app_version": app_version, "previous_commit": previous_commit, "username": };
+
+ // Load required data
+ data.client.username = await localforage.getItem("username");
+
data.type = "error";
$.post("https://beziapp-report.gimb.tk/", data);
} else {
diff --git a/dist/pages/about.html b/dist/pages/about.html
index a784497..fe07d3a 100755
--- a/dist/pages/about.html
+++ b/dist/pages/about.html
@@ -142,7 +142,7 @@
<div class="row">
<p>
<small>
- ^HEAD a6a552efe42f84f439c82e21ba5dcc0f66e43a82
+ ^HEAD dfd78d5fa91f1c3844a3c9b828ba699775a0c0d4
</small>
</p>
</div>
diff --git a/dist/sw.js b/dist/sw.js
index 3494520..a759a9c 100755
--- a/dist/sw.js
+++ b/dist/sw.js
@@ -3,8 +3,8 @@
// Change version to cause cache refresh
-const static_cache_name = "site-static-1.0.14-beta-a6a552e";
-// commit before the latest is a6a552efe42f84f439c82e21ba5dcc0f66e43a82
+const static_cache_name = "site-static-1.0.14-beta-dfd78d5";
+// commit before the latest is dfd78d5fa91f1c3844a3c9b828ba699775a0c0d4
// Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js
// sw.js NE SME BITI CACHAN, ker vsebuje verzijo!
diff --git a/server/report/index.php b/server/report/index.php
index 7b48b35..b9ead0b 100644
--- a/server/report/index.php
+++ b/server/report/index.php
@@ -37,14 +37,15 @@
app_version VARCHAR(420) ,
previous_commit VARCHAR(69) ,
ip VARCHAR(69) ,
+ username VARCHAR(69)
)";
$result = mysqli_query($conn, $query);
- $stmt = $conn->prepare("INSERT INTO error_reports (msg, url, line, colno, obj, ua, app_version, previous_commit, ip) VALUES".
- "(?, ?, ?, ?, ?, ?, ?, ?, ?)");
- $stmt->bind_param("ssiisssss", $_REQUEST["error"]["msg"], $_REQUEST["error"]["url"], $_REQUEST["error"]["line"],
+ $stmt = $conn->prepare("INSERT INTO error_reports (msg, url, line, colno, obj, ua, app_version, previous_commit, ip, username) VALUES".
+ "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ $stmt->bind_param("ssiissssss", $_REQUEST["error"]["msg"], $_REQUEST["error"]["url"], $_REQUEST["error"]["line"],
$_REQUEST["error"]["column"], $_REQUEST["error"]["obj"], $_REQUEST["client"]["ua"], $_REQUEST["client"]["app_version"],
- $_REQUEST["client"]["previous_commit"], $_SERVER["REMOTE_ADDR"]);
+ $_REQUEST["client"]["previous_commit"], $_SERVER["REMOTE_ADDR"], $_REQUEST["client"]["username"]);
$stmt->execute();