From 2150e4d2e88fe505de6c885ed235c4207ebc22d2 Mon Sep 17 00:00:00 2001 From: objecttothis Date: Fri, 17 Feb 2023 17:27:06 +0400 Subject: [PATCH] Fix encryption and missing call --- app/Config/Encryption.php | 6 +- app/Controllers/Customers.php | 2 +- app/Libraries/Mailchimp_lib.php | 1 + app/Views/partial/daterangepicker.php | 306 +++++++++++++------------- 4 files changed, 160 insertions(+), 155 deletions(-) diff --git a/app/Config/Encryption.php b/app/Config/Encryption.php index e37b4e2a1..640bd5860 100644 --- a/app/Config/Encryption.php +++ b/app/Config/Encryption.php @@ -63,7 +63,7 @@ class Encryption extends BaseConfig * * Set to false for CI3 Encryption compatibility. */ - public bool $rawData = true; + public bool $rawData = false; /** * Encryption key info. @@ -71,7 +71,7 @@ class Encryption extends BaseConfig * * Set to 'encryption' for CI3 Encryption compatibility. */ - public string $encryptKeyInfo = ''; + public string $encryptKeyInfo = 'encryption'; /** * Authentication key info. @@ -79,5 +79,5 @@ class Encryption extends BaseConfig * * Set to 'authentication' for CI3 Encryption compatibility. */ - public string $authKeyInfo = ''; + public string $authKeyInfo = 'authentication'; } diff --git a/app/Controllers/Customers.php b/app/Controllers/Customers.php index ab1f65332..b450a6eb9 100644 --- a/app/Controllers/Customers.php +++ b/app/Controllers/Customers.php @@ -34,7 +34,7 @@ class Customers extends Persons public function __construct() { parent::__construct('customers'); - + helper('tabular'); $this->mailchimp_lib = new Mailchimp_lib(); $this->customer = model('Customer'); diff --git a/app/Libraries/Mailchimp_lib.php b/app/Libraries/Mailchimp_lib.php index 08cba4e54..a36efe0df 100644 --- a/app/Libraries/Mailchimp_lib.php +++ b/app/Libraries/Mailchimp_lib.php @@ -38,6 +38,7 @@ class MailchimpConnector public function __construct(string $api_key = '') { $config = config('OSPOS')->settings; + $encrypter = Services::encrypter(); $this->_api_key = empty($api_key) diff --git a/app/Views/partial/daterangepicker.php b/app/Views/partial/daterangepicker.php index 9a6f13837..dc4939944 100644 --- a/app/Views/partial/daterangepicker.php +++ b/app/Views/partial/daterangepicker.php @@ -1,109 +1,113 @@ -lang->load("calendar"); $this->lang->load("date"); + $('#daterangepicker').css("width","180"); - var start_date = ""; - var end_date = ""; + var start_date = ""; + var end_date = ""; $('#daterangepicker').daterangepicker({ "ranges": { - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], }, "locale": { - "format": '', + "format": '', "separator": " - ", - "applyLabel": "", - "cancelLabel": "", - "fromLabel": "", - "toLabel": "", - "customRangeLabel": "", + "applyLabel": "", + "cancelLabel": "", + "fromLabel": "", + "toLabel": "", + "customRangeLabel": "", "daysOfWeek": [ - "", - "", - "", - "", - "", - "", - "", - "" + "", + "", + "", + "", + "", + "", + "", + "" ], "monthNames": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" ], - "firstDay": + "firstDay": }, "alwaysShowCalendars": true, - "startDate": "", - "endDate": "", - "minDate": "", - "maxDate": "" + "startDate": "", + "endDate": "", + "minDate": "", + "maxDate": "" }, function(start, end, label) { start_date = start.format('YYYY-MM-DD'); end_date = end.format('YYYY-MM-DD'); @@ -114,108 +118,108 @@ { ?> $('#daterangepicker').css("width","305"); - var start_date = ""; - var end_date = ""; + var start_date = ""; + var end_date = ""; $('#daterangepicker').daterangepicker({ "ranges": { - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], - "": [ - "", - "" + "": [ + "", + "" ], }, "locale": { - "format": '', + "format": '', "separator": " - ", - "applyLabel": "", - "cancelLabel": "", - "fromLabel": "", - "toLabel": "", - "customRangeLabel": "", + "applyLabel": "", + "cancelLabel": "", + "fromLabel": "", + "toLabel": "", + "customRangeLabel": "", "daysOfWeek": [ - "", - "", - "", - "", - "", - "", - "", - "" + "", + "", + "", + "", + "", + "", + "", + "" ], "monthNames": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" ], - "firstDay": + "firstDay": }, "timePicker": true, "timePickerSeconds": true, "alwaysShowCalendars": true, - "startDate": "", - "endDate": "", - "minDate": "", - "maxDate": "" + "startDate": "", + "endDate": "", + "minDate": "", + "maxDate": "" }, function(start, end, label) { start_date = start.format('YYYY-MM-DD HH:mm:ss'); end_date = end.format('YYYY-MM-DD HH:mm:ss');