bug fix in read.php, bump version in footer, NEW: bulk delete

This commit is contained in:
giandonato.inverso@edempg.it
2024-04-18 20:33:20 +02:00
parent 5bdcb8e2bf
commit 096c239715
9 changed files with 129 additions and 57 deletions
+3 -3
View File
@@ -89,9 +89,9 @@ class DynamicQrcode {
* Delete qr code
*
*/
public function deleteQrcode($id) {
public function deleteQrcode($id, $async = false) {
if($_SESSION['type'] === "super") {
$this->qrcode_instance->deleteQrcode($id);
$this->qrcode_instance->deleteQrcode($id, $async);
} else if ($_SESSION['type'] === "admin") {
$qrcode = $this->getQrcode($id);
@@ -103,7 +103,7 @@ class DynamicQrcode {
$user = $users->getUser($_SESSION['user_id']);
if($user["id"] === $qrcode["id_owner"])
$this->qrcode_instance->deleteQrcode($id);
$this->qrcode_instance->deleteQrcode($id, $async);
else
$this->failure("You cannot delete this qrcode because it's of another user");
}