X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_wernis.php;h=9f1fa093f5a5c6ccc5d0d5f840229abc0c7fde43;hb=abc82902f6ca318dcbb75ba5952a4478387569af;hp=7650ae1bad076f26bad92b0ef7176ed5efd9582c;hpb=846a1a71674cfb710c7cc083eaebaf6612812aad;p=mailer.git diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 7650ae1bad..9f1fa093f5 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -41,24 +41,26 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) ADD_DESCR("admin", basename(__FILE__)); if (isset($_POST['ok'])) { - // First merge temporary the new API data into config - $CONFIG = array_merge($CONFIG, $_POST); + // First merge temporarily the new API data into the current config + $_CONFIG = array_merge($_CONFIG, $_POST); // Let's test the API first (hold your horses here, cowboy! Thanks. :) ) if (WERNIS_TEST_API()) { // Save settings - ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'"); + ADMIN_SAVE_SETTINGS($_POST); } else { // Failed to test the API! - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_ERROR_MESSAGE()); + LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE()); } } else { // Prepare data for template output $content = array( - 'min_amount' => $CONFIG['wernis_min_amount'], - 'api_id' => $CONFIG['wernis_api_id'], - 'api_md5' => $CONFIG['wernis_api_md5'], - 'api_url' => $CONFIG['wernis_api_url'] + 'min_payout' => bigintval($_CONFIG['wernis_min_payout']), + 'min_withdraw' => bigintval($_CONFIG['wernis_min_withdraw']), + 'api_id' => bigintval($_CONFIG['wernis_api_id']), + 'api_md5' => $_CONFIG['wernis_api_md5'], + 'api_url' => $_CONFIG['wernis_api_url'], + 'refid' => bigintval($_CONFIG['wernis_refid']) ); // Load template