X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_primera.php;h=69afcbf6cd6b2fd3a7fbe9166b81be11dfeeb8b9;hb=08b3c51b70b6498fd92a2760979d64470ad1b586;hp=349d7ad52b70cb18908b13a916651fcb41912979;hpb=50cec5fbac1b8b7427f016bf02c93cb1aa7bb9e1;p=mailer.git diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index 349d7ad52b..69afcbf6cd 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -32,17 +32,17 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) { +if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +ADD_DESCR("admin", __FILE__); if (isset($_POST['ok'])) { // First merge temporarily the new API data into the current config - $_CONFIG = array_merge($_CONFIG, $_POST); + $_CONFIG = merge_array($_CONFIG, $_POST); // Is the password set? if (isset($_POST['pass'])) { @@ -51,7 +51,7 @@ if (isset($_POST['ok'])) { unset($_POST['pass']); } // END - if - // Let's test the API first (hold your horses here, cowboy! Thanks. :) ) + // Let's test the API first (hold your horses here, cowboy! Thank you. :) ) if (PRIMERA_TEST_API()) { // Save settings ADMIN_SAVE_SETTINGS($_POST); @@ -62,10 +62,11 @@ if (isset($_POST['ok'])) { } else { // Prepare data for template output $content = array( - 'min_payout' => bigintval($_CONFIG['primera_min_payout']), - 'min_withdraw' => bigintval($_CONFIG['primera_min_withdraw']), - 'api_name' => $_CONFIG['primera_api_name'], - 'api_md5' => $_CONFIG['primera_api_md5'] + 'min_payout' => bigintval(getConfig('primera_min_payout')), + 'min_withdraw' => bigintval(getConfig('primera_min_withdraw')), + 'api_name' => getConfig('primera_api_name'), + 'api_md5' => getConfig('primera_api_md5'), + 'refid' => getConfig('primera_refid') ); // Load template