From b3dc1ddc29f83eb7541b48dfda90303c3fc181c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 30 Dec 2012 00:18:34 +0000 Subject: [PATCH] Used isPostRequestElementSet() instead of comparing postRequestElement() with empty string --- inc/libs/network_functions.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 1787a7518f..264642dfc3 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -1407,7 +1407,7 @@ function doAdminNetworkProcessAddNetworkType () { setPostRequestElement('network_id', bigintval(getRequestElement('network_id'))); // Is network_type_banner_url set? - if (postRequestElement('network_type_banner_url') == '') { + if (!isPostRequestElementSet('network_type_banner_url')) { // Remove empty value to get a NULL for an optional entry unsetPostRequestElement('network_type_banner_url'); } // END - if @@ -1680,7 +1680,7 @@ function doAdminNetworkProcessAddRequestParam () { setPostRequestElement('network_id', bigintval(getRequestElement('network_id'))); // Is network_request_param_default set? - if (postRequestElement('network_request_param_default') == '') { + if (!isPostRequestElementSet('network_request_param_default')) { // Remove empty value to get a NULL for an optional entry unsetPostRequestElement('network_request_param_default'); } // END - if @@ -1713,7 +1713,7 @@ function doAdminNetworkProcessAddVcheckParam () { setPostRequestElement('network_id', bigintval(getRequestElement('network_id'))); // Is network_vcheck_param_default set? - if (postRequestElement('network_vcheck_param_default') == '') { + if (!isPostRequestElementSet('network_vcheck_param_default')) { // Remove empty value to get a NULL for an optional entry unsetPostRequestElement('network_vcheck_param_default'); } // END - if @@ -1838,7 +1838,7 @@ function doAdminNetworkProcessNetworkApiConfig () { setPostRequestElement('network_id', bigintval(getRequestElement('network_id'))); // Is network_api_referral_button set? - if (postRequestElement('network_api_referral_button') == '') { + if (!isPostRequestElementSet('network_api_referral_button')) { // Remove empty value to get a NULL for an optional entry unsetPostRequestElement('network_api_referral_button'); } // END - if @@ -1871,13 +1871,16 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) { setPostRequestElement('network_id', bigintval(getRequestElement('network_id'))); setPostRequestElement('network_type_id', bigintval(getRequestElement('network_type_id'))); + // Translate German comma to dot + setPostRequestElement('network_min_payment', convertCommaToDot(postRequestElement('network_min_payment'))); + /* * Some parameters are optional, at least one must be given so check a bunch * of parameters. */ foreach (array('network_min_waiting_time', 'network_min_remain_clicks', 'network_min_payment', 'network_allow_erotic') as $element) { // Is this element empty? - if (postRequestElement($element) == '') { + if (!isPostRequestElementSet($element)) { // Then unset it to get a NULL for optional parameter unsetPostRequestElement($element); } // END - if @@ -1965,7 +1968,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) { */ foreach (array('network_min_waiting_time', 'network_min_remain_clicks', 'network_min_payment', 'network_allow_erotic') as $element) { // Is this element empty? - if (postRequestElement($element) == '') { + if (!isPostRequestElementSet($element)) { // Then unset it to get a NULL for optional parameter unsetPostRequestElement($element); } // END - if -- 2.39.5