From faacfde925a466c5f8f83521b9d062c8d3c61b4e Mon Sep 17 00:00:00 2001 From: Thierry Bugier Pineau Date: Wed, 19 Jul 2017 11:52:41 +0200 Subject: [PATCH] feat(enrollment): reduce size of deeplink and QR code --- inc/invitation.class.php | 4 ++-- inc/notificationtargetinvitation.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/invitation.class.php b/inc/invitation.class.php index 538d3401..0b950132 100644 --- a/inc/invitation.class.php +++ b/inc/invitation.class.php @@ -291,11 +291,11 @@ protected function createQRCodeDocument(User $user, $învitationToken) { 'support_phone' => $entityConfig->getField('support_phone'), 'support_website' => $entityConfig->getField('support_website'), 'support_email' => $entityConfig->getField('support_email'), - 'support_address' => $entityConfig->getField('support_address'), + //'support_address' => $entityConfig->getField('support_address'), ]; $encodedRequest = PluginFlyvemdmNotificationTargetInvitation::DEEPLINK - . base64_encode(json_encode($enrollmentData, JSON_UNESCAPED_SLASHES)); + . addcslashes(implode(';', $enrollmentData), '\;'); // Generate a QRCode $barcodeobj = new TCPDF2DBarcode($encodedRequest, 'QRCODE,L'); diff --git a/inc/notificationtargetinvitation.class.php b/inc/notificationtargetinvitation.class.php index fbc27a32..170539d4 100644 --- a/inc/notificationtargetinvitation.class.php +++ b/inc/notificationtargetinvitation.class.php @@ -114,11 +114,11 @@ public static function getAdditionalDatasForTemplate(NotificationTarget $event) 'support_phone' => $entityConfig->getField('support_phone'), 'support_website' => $entityConfig->getField('support_website'), 'support_email' => $entityConfig->getField('support_email'), - 'support_address' => $entityConfig->getField('support_address'), + //'support_address' => $entityConfig->getField('support_address'), ]; $encodedRequest = PluginFlyvemdmNotificationTargetInvitation::DEEPLINK - . base64_encode(json_encode($enrollmentData, JSON_UNESCAPED_SLASHES)); + . addcslashes(implode(';', $enrollmentData), '\;'); // Fill the template $event->data['##flyvemdm.qrcode##'] = Document::getImageTag($document->getField('tag'));