$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') {
$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));
// 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)",
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;
// 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);