Script rewritten to setConfigEntry(), getConfig() and incrementConfigEntry()
[mailer.git] / inc / mysql-manager.php
index 1539e82f8abab09da5cae208add7bf1c985929d4..6413d766877b4076ddb0a7e58799d0362b5eaf09 100644 (file)
@@ -1707,6 +1707,7 @@ function UPDATE_CONFIG ($entries, $values, $updateMode="") {
                        // Update mode set?
                        if (!empty($updateMode)) {
                                // Update entry
+                               // @TODO Find a way for updating $_CONFIG here
                                $all .= sprintf("%s=%s%s%s,", $entry, $entry, $updateMode, (float)$values[$idx]);
                        } else {
                                // Check if string or number
@@ -1721,14 +1722,21 @@ function UPDATE_CONFIG ($entries, $values, $updateMode="") {
                                        $all .= sprintf("%s='%s',", $entry, SQL_ESCAPE($values[$idx]));
                                }
                        }
+
+                       // Set it in $_CONFIG as well
+                       setConfigEntry($entry, $values[$idx]);
                } // END - foreach
 
                // Remove last comma
                $entries = substr($all, 0, -1);
        } elseif (!empty($updateMode)) {
                // Update mode set
+               // @TODO Find a way for updating $_CONFIG here
                $entries .= sprintf("=%s%s%s", $entries, $updateMode, (float)$values);
        } else {
+               // Set it in $_CONFIG first
+               setConfigEntry($entries, $values);
+
                // Regular entry to update
                $entries .= sprintf("='%s'", SQL_ESCAPE($values));
        }