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 eba0ebbba7
commit 9f2d14abf8
9 changed files with 129 additions and 57 deletions
+3 -3
View File
@@ -390,9 +390,9 @@ class StaticQrcode {
* 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);
@@ -404,7 +404,7 @@ class StaticQrcode {
$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");
}