diff --git a/admin/qrcode.php b/admin/qrcode.php index 3ade663a..0bc605cb 100644 --- a/admin/qrcode.php +++ b/admin/qrcode.php @@ -1,5 +1,5 @@ url = $url; + $saturneQRCode->url = $url; $saturneQRCode->encoded_qr_code = $saturneQRCode->getQRCodeBase64($url); - $saturneQRCode->module_name = 'saturne'; - $saturneQRCode->status = 1; + $saturneQRCode->module_name = 'saturne'; $saturneQRCode->create($user); setEventMessage('QRCodeCreated'); @@ -87,7 +86,7 @@ if ($action == 'update') { $saturneQRCode->fetch(GETPOST('id')); - $saturneQRCode->url = GETPOST('url'); + $saturneQRCode->url = GETPOST('url'); $saturneQRCode->encoded_qr_code = $saturneQRCode->getQRCodeBase64($saturneQRCode->url); $saturneQRCode->update($user); diff --git a/class/saturneqrcode.class.php b/class/saturneqrcode.class.php index 0b1b1a90..11578c98 100644 --- a/class/saturneqrcode.class.php +++ b/class/saturneqrcode.class.php @@ -79,7 +79,6 @@ class SaturneQRCode extends SaturneObject 'date_creation' => ['type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'position' => 40, 'notnull' => 1, 'visible' => 0], 'tms' => ['type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'position' => 50, 'notnull' => 1, 'visible' => 0], 'import_key' => ['type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'position' => 60, 'notnull' => 0, 'visible' => 0, 'index' => 0], - 'status' => ['type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 70, 'notnull' => 1, 'visible' => 2, 'default' => 0, 'index' => 1, 'validate' => 1, 'arrayofkeyval' => [0 => 'StatusDraft', 1 => 'ValidatePendingSignature', 2 => 'Expired', 3 => 'Archived']], 'module_name' => ['type' => 'varchar(128)', 'label' => 'ModuleName', 'enabled' => 1, 'position' => 90, 'notnull' => 0, 'visible' => 0], 'url' => ['type' => 'text', 'label' => 'Url', 'enabled' => 1, 'position' => 80, 'notnull' => 0, 'visible' => 0, 'index' => 0], 'encoded_qr_code' => ['type' => 'text', 'label' => 'EncodedData', 'enabled' => 1, 'position' => 90, 'notnull' => 0, 'visible' => 0, 'index' => 0], @@ -111,11 +110,6 @@ class SaturneQRCode extends SaturneObject */ public $import_key; - /** - * @var int Status - */ - public $status; - /** * @var string Module name */ diff --git a/lib/saturne_functions.lib.php b/lib/saturne_functions.lib.php index 96ff40c6..8f027707 100644 --- a/lib/saturne_functions.lib.php +++ b/lib/saturne_functions.lib.php @@ -348,7 +348,6 @@ function saturne_load_langs(array $domains = []) global $langs, $moduleNameLowerCase; $langs->loadLangs(['saturne@saturne', 'object@saturne', 'signature@saturne', 'medias@saturne', $moduleNameLowerCase . '@' . $moduleNameLowerCase]); - if (!empty($domains)) { foreach ($domains as $domain) { $langs->load($domain); diff --git a/sql/qrcode/llx_saturne_qrcode.key.sql b/sql/qrcode/llx_saturne_qrcode.key.sql index 8551b3c1..2fc71717 100644 --- a/sql/qrcode/llx_saturne_qrcode.key.sql +++ b/sql/qrcode/llx_saturne_qrcode.key.sql @@ -14,6 +14,4 @@ -- along with this program. If not, see https://www.gnu.org/licenses/. ALTER TABLE llx_saturne_qrcode ADD INDEX idx_saturne_object_qrcode_rowid (rowid); -ALTER TABLE llx_saturne_qrcode ADD INDEX idx_saturne_object_qrcode_ref (ref); -ALTER TABLE llx_saturne_qrcode ADD INDEX idx_saturne_object_qrcode_status (status); ALTER TABLE llx_saturne_qrcode ADD CONSTRAINT llx_saturne_qrcode_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid); diff --git a/sql/qrcode/llx_saturne_qrcode.sql b/sql/qrcode/llx_saturne_qrcode.sql index dea2b39b..3b795690 100644 --- a/sql/qrcode/llx_saturne_qrcode.sql +++ b/sql/qrcode/llx_saturne_qrcode.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2021-2023 EVARISK +-- Copyright (C) 2024 EVARISK -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -19,7 +19,6 @@ CREATE TABLE llx_saturne_qrcode( date_creation datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14), - status integer DEFAULT 1 NOT NULL, module_name varchar(255), url text, encoded_qr_code longtext,