]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-extensions.php
Our convention says if(-else) blocks should not be put in one line
[mailer.git] / inc / modules / admin / what-extensions.php
index 9df38198aba19058e89800318697653ba9342cc3..b3cc40546d28d3bd1f15a9472b7b37eda6fdeeb1 100644 (file)
@@ -63,10 +63,15 @@ if (isGetRequestParameterSet('reg_ext')) {
                        loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($taskId)));
                } else {
                        // De/activate extension
-                       $ACT = 'N'; setExtensionMode('deactivate');
-                       if ($active != 'Y') { $ACT = 'Y'; setExtensionMode('activate'); }
+                       $active = 'N'; setExtensionMode('deactivate');
+                       if ($active != 'Y') {
+                               $active = 'Y';
+                               setExtensionMode('activate');
+                       } // END - if
+
+                       // Update database
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
-                               array($ACT, bigintval($taskId), $active), __FILE__, __LINE__);
+                               array($active, bigintval($taskId), $active), __FILE__, __LINE__);
 
                        // Run embeded SQL commands
                        doExtensionSqls($taskId, getExtensionMode());