Browse Source

Change o_smtp_ssl

Visman 3 years ago
parent
commit
75e4e11029

+ 1 - 1
app/Models/Pages/Admin/Install.php

@@ -1242,7 +1242,7 @@ class Install extends Admin
             'o_smtp_host'             => NULL,
             'o_smtp_user'             => NULL,
             'o_smtp_pass'             => NULL,
-            'o_smtp_ssl'              => 0,
+            'b_smtp_ssl'              => 0,
             'o_regs_allow'            => 1,
             'o_regs_verify'           => 1,
             'o_announcement'          => 0,

+ 3 - 3
app/Models/Pages/Admin/Options.php

@@ -75,7 +75,7 @@ class Options extends Admin
                     'o_smtp_user'             => 'string:trim|max:255',
                     'o_smtp_pass'             => 'string:trim|max:255',
                     'changeSmtpPassword'      => 'checkbox',
-                    'o_smtp_ssl'              => 'required|integer|in:0,1',
+                    'b_smtp_ssl'              => 'required|integer|in:0,1',
                     'o_regs_allow'            => 'required|integer|in:0,1',
                     'o_regs_verify'           => 'required|integer|in:0,1',
                     'b_regs_report'           => 'required|integer|in:0,1',
@@ -610,9 +610,9 @@ class Options extends Admin
                     'caption' => '',
                     'label'   => 'SMTP change password help',
                 ],
-                'o_smtp_ssl' => [
+                'b_smtp_ssl' => [
                     'type'    => 'radio',
-                    'value'   => $config->o_smtp_ssl,
+                    'value'   => $config->b_smtp_ssl,
                     'values'  => $yn,
                     'caption' => 'SMTP SSL label',
                     'help'    => 'SMTP SSL help',

+ 2 - 0
app/Models/Pages/Admin/Update.php

@@ -517,7 +517,9 @@ class Update extends Admin
         $config->b_avatars             = '1' == $config->o_avatars ? 1 : 0;
         $config->b_forum_subscriptions = '1' == $config->o_forum_subscriptions ? 1 : 0;
         $config->b_topic_subscriptions = '1' == $config->o_topic_subscriptions ? 1 : 0;
+        $config->b_smtp_ssl            = '1' == $config->o_smtp_ssl ? 1 : 0;
 
+        unset($config->o_smtp_ssl);
         unset($config->o_topic_subscriptions);
         unset($config->o_forum_subscriptions);
         unset($config->o_avatars);

+ 1 - 1
app/config/install.php

@@ -48,7 +48,7 @@ return [
         'o_smtp_host'      => '',
         'o_smtp_user'      => '',
         'o_smtp_pass'      => '',
-        'o_smtp_ssl'       => '',
+        'b_smtp_ssl'       => 0,
     ],
 
     'shared' => [