X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fprimera_functions.php;h=0ca43bcfecf08d0937f1c4b793186238612b8f4b;hb=46f2e389417a40f1029612b58cb285416ccae7a5;hp=58c7f4fff85a942d6e74f586553e6f201d298bc6;hpb=e71e9e1380d65ccd06beef6fbc594bec10371f5f;p=mailer.git diff --git a/inc/libs/primera_functions.php b/inc/libs/primera_functions.php index 58c7f4fff8..0ca43bcfec 100644 --- a/inc/libs/primera_functions.php +++ b/inc/libs/primera_functions.php @@ -236,15 +236,13 @@ class PrimeraApi { // is not false the API data is valid, else invalid function PRIMERA_TEST_API () { // Get new instance - $api = new PrimeraApi($_POST['primera_api_name'], $_POST['primera_api_md5']); + $api = new PrimeraApi(REQUEST_POST('primera_api_name'), REQUEST_POST('primera_api_md5')); // Was that fine? return ($api->getPrimera() !== false); } // Execute the withdraw of a sponsor only! function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) { - global $_CONFIG; - // Is the sponsor extension installed? if (!EXT_IS_ACTIVE("sponsor")) { // No, abort here @@ -258,7 +256,7 @@ function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) { $api = new PrimeraApi($primusNick, $userMd5); // Prepare purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(PRIMERA_API_PURPOSE_WITHDRAW, get_session('sponsorid')))."\";"; + $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('PRIMERA_API_PURPOSE_WITHDRAW'), get_session('sponsorid')))."\";"; eval($eval); // Pay the Primera @@ -266,13 +264,11 @@ function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) { } // Execute the payout function PRIMERA_EXECUTE_PAYOUT ($primusNick, $userMd5, $amount) { - global $_CONFIG; - // Get new instance $api = new PrimeraApi(getConfig('primera_api_name'), getConfig('primera_api_md5')); // Prepare purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(PRIMERA_API_PURPOSE_PAYOUT, $GLOBALS['userid']))."\";"; + $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('PRIMERA_API_PURPOSE_PAYOUT'), getUserId()))."\";"; eval($eval); // Pay the Primera