From dbcc5ed91f1365a54a67c120e23dca99c38b6be0 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Wed, 22 Nov 2023 15:07:16 +0100 Subject: [PATCH] no need to press save twice --- application/controllers/Options.php | 6 +++++- application/views/options/email.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/application/controllers/Options.php b/application/controllers/Options.php index 728227af..a01e14ab 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -272,7 +272,11 @@ class Options extends CI_Controller { $smtpEncryptionupdate = $this->optionslib->update('smtpEncryption', $this->input->post('smtpEncryption'), 'yes'); // Update email sender name within the options system - $emailSenderNameupdate = $this->optionslib->update('emailSenderName', $this->input->post('emailSenderName'), 'yes'); + $emailSenderName_value = $this->input->post('emailSenderName'); + if (empty($emailSenderName_value)) { + $emailSenderName_value = 'Cloudlog'; + } + $emailSenderNameupdate = $this->optionslib->update('emailSenderName', $emailSenderName_value, 'yes'); // Update email address choice within the options system $emailAddressupdate = $this->optionslib->update('emailAddress', $this->input->post('emailAddress'), 'yes'); diff --git a/application/views/options/email.php b/application/views/options/email.php index 3ae70a55..9219d441 100644 --- a/application/views/options/email.php +++ b/application/views/options/email.php @@ -63,7 +63,7 @@
- optionslib->get_option('emailSenderName'));?>"> + optionslib->get_option('emailSenderName'); } ?>">