From 64ffedd69539de4a6635a624c277e5ce6c988777 Mon Sep 17 00:00:00 2001 From: "florian.azizian" <florian.azizian@maarch.org> Date: Mon, 30 Apr 2018 16:57:05 +0100 Subject: [PATCH] FIX signature in smartphone --- apps/maarch_entreprise/smartphone/view_baskets.php | 2 +- modules/visa/class/class_user_signatures_Abstract.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/maarch_entreprise/smartphone/view_baskets.php b/apps/maarch_entreprise/smartphone/view_baskets.php index 51b4ed85b50..4494beb5031 100755 --- a/apps/maarch_entreprise/smartphone/view_baskets.php +++ b/apps/maarch_entreprise/smartphone/view_baskets.php @@ -17,7 +17,7 @@ if (! isset($_REQUEST['noinit'])) { } $bask = new basket(); if (isset($_REQUEST['baskets']) && ! empty($_REQUEST['baskets'])) { - $bask->load_current_basket(trim($_REQUEST['baskets']), 'frame'); + $bask->load_current_basket(trim($_REQUEST['baskets'])); } $_SESSION['collection_id_choice'] = $_SESSION['current_basket']['coll_id']; $whereRequest = $_SESSION['current_basket']['clause']; diff --git a/modules/visa/class/class_user_signatures_Abstract.php b/modules/visa/class/class_user_signatures_Abstract.php index 8134dc13e3f..33a25a5d74d 100755 --- a/modules/visa/class/class_user_signatures_Abstract.php +++ b/modules/visa/class/class_user_signatures_Abstract.php @@ -112,8 +112,11 @@ abstract class UserSignaturesAbstract extends Database $storeInfos = $this->storeSignOnDocserver($tmpSourceCopy,'templates'); - $db->query('INSERT INTO ' . USER_SIGNATURES_TABLE . ' (user_id, signature_path, signature_file_name,fingerprint) VALUES (?, ?, ?, ?)', - [$_SESSION['user']['UserId'], + + $userInfos = \User\models\UserModel::get(['select' => ['id'], 'where' => ['user_id = ?'], 'data' => [$_SESSION['user']['UserId']]]); + + $db->query('INSERT INTO ' . USER_SIGNATURES_TABLE . ' (user_serial_id, signature_path, signature_file_name,fingerprint) VALUES (?, ?, ?, ?)', + [$userInfos[0]['id'], $storeInfos['destination_dir'], $storeInfos['file_destination_name'], Ds_doFingerprint($tmpSourceCopy,$docserverTypeObjectSign->fingerprint_mode) -- GitLab