]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
Renamed showEntriesByXmlCallback() to doGenericXmlTemplateCallback() as it is no...
[mailer.git] / inc / modules / admin / admin-inc.php
index 86c378e821b6e9723b28531ab24459336ea6e689..860301125b7522138f9a0cc3320a303c37177bf2 100644 (file)
@@ -559,6 +559,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
        $skip = FALSE;
 
        // Now, walk through all entries and prepare them for saving
+       //* BUG: */ reportBug(__FUNCTION__, __LINE__, '<pre>'.print_r(postRequestArray(),true).'</pre>');
        foreach ($postData as $id => $val) {
                // Process only formular field but not submit buttons ;)
                if ($id == 'ok') {
@@ -577,8 +578,13 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
                                $val = convertCommaToDot($val);
                        } // END - if
 
-                       // Shall we add numbers or strings?
+                       // Test value on float
                        $test = (float) $val;
+
+                       // Debug message
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'test=' . $test . ',val=' . $val . ',id=' . $id);
+
+                       // Shall we add numbers or strings?
                        if ('' . $val . '' == '' . $test . '') {
                                // Add numbers
                                array_push($tableData, sprintf("`%s`=%s", $id, $test));
@@ -630,7 +636,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
 
                // Add both in one line
                $keys   = implode('`, `', $keys);
-               $values = implode(', ' , $values);
+               $values = implode(', '  , $values);
 
                // Generate SQL string
                $sql = sprintf("INSERT INTO `{?_MYSQL_PREFIX?}%s` (%s) VALUES (%s)",
@@ -653,7 +659,10 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
        rebuildCache('config', 'config');
 
        // Settings saved, so display message?
-       if ($displayMessage === TRUE) displayMessage('{--SETTINGS_SAVED--}');
+       if ($displayMessage === TRUE) {
+               // Display a message
+               displayMessage('{--SETTINGS_SAVED--}');
+       } // END - if
 
        // Return affected rows
        return $affected;
@@ -1067,6 +1076,12 @@ function adminUndeleteEntriesConfirm ($tableName, $columns = array(), $filterFun
 
 // Adds a given entry to the database
 function adminAddEntries ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $timeColumns = array(), $columnIndex = NULL) {
+       // Is the userid set?
+       if (!isPostRequestElementSet('userid')) {
+               // Then set NULL here
+               setPostRequestElement('userid', NULL);
+       } // END - if
+
        // Call inner function
        doGenericAddEntries($tableName, $columns, $filterFunctions, $extraValues, $timeColumns, $columnIndex);