* working database link.
*/
SQL_SET_LINK(__FUNCTION__, __LINE__, $linkResource);
+
+ // Init charsets (UTF-8 is default now)
+ SQL_QUERY("SET
+ `character_set_results`='utf8',
+ `character_set_client`='utf8',
+ `character_set_connection`='utf8',
+ `character_set_database`='utf8',
+ `character_set_server`='utf8'", __FUNCTION__, __LINE__);
} // END - if
// Return the resource
$str = str_replace('.', '', $str);
// Replace german commata with decimal dot and cast it
- $float = (float) str_replace(',', '.', $str);
+ $float = sprintf('%01.5f', str_replace(',', '.', $str));
break;
default: // US and so on
// Remove thousand commatas first and cast
- $float = (float) str_replace(',', '', $str);
+ $float = sprintf('%01.5f', str_replace(',', '', $str));
break;
} // END - switch
setPostRequestElement('network_type_id', bigintval(getRequestElement('network_type_id')));
// Translate German comma to dot
- setPostRequestElement('network_min_payment', convertCommaToDot(postRequestElement('network_min_payment')));
+ convertCommaToDotInPostData('network_min_payment');
/*
* Some parameters are optional, at least one must be given so check a bunch
// Only changes network type configuration if not yet present
function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) {
+ // Translate German comma to dot
+ convertCommaToDotInPostData('network_min_payment');
+
/*
* Some parameters are optional, at least one must be given so check a bunch
* of parameters.
$SQL = 'INSERT INTO
`{?_MYSQL_PREFIX?}_' . $tableName . '`
(
-`' . implode('`, `', array_keys(postRequestArray())) . '`
+`' . implode('`, `', array_keys($array)) . '`
) VALUES (';
// Walk through all entries
- foreach (postRequestArray() as $key => $value) {
+ foreach ($array as $key => $value) {
// Log debug message
//* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',key=' . $key . ',value=' . $value);
return $extensions;
}
+// Wrapper function to allow full float values as supported by current database layout
+function translateFullComma ($dotted) {
+ // Call inner function
+ return translateComma($dotted, TRUE, 5);
+}
+
// [EOF]
?>
<div class="bottom" style="padding-top:3px;padding-bottom:3px">
<label for="network_min_payment">{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_MIN_PAYMENT--}</label>
- <input type="text" class="form_normal" name="network_min_payment" size="7" maxlength="20" value="$content[network_min_payment]" />
+ <input type="text" class="form_normal" name="network_min_payment" size="7" maxlength="20" value="{%pipe,translateFullComma=$content[network_min_payment]%}" />
</div>
<div class="bottom" style="padding-top:3px;padding-bottom:3px">
<div class="table_footer">
<input type="hidden" name="network_data_id" value="$content[network_data_id]" />
- <input type="submit" class="form_submit" name="edit" value="{--ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_FORM_SUBMIT--}" />
+ <input type="submit" class="form_submit" name="do_edit" value="{--ADMIN_EDIT_CONFIG_NETWORK_HANDLER_TYPE_FORM_SUBMIT--}" />
</div>
</div>
{%form_close%}