]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/wernis_functions.php
More references to removed (still some left)
[mailer.git] / inc / libs / wernis_functions.php
index 0fbc50f3fa04b276a8137997d1d771029e036298..89adec715d09d743c95ba49ba2e06bb75876a27f 100644 (file)
@@ -210,7 +210,7 @@ function WERNIS_TEST_API () {
 // Widthdraw this amount
 function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) {
        // Is the sponsor extension installed?
-       if (getConfig('wernis_withdraw_active') == "N") {
+       if (getConfig('wernis_withdraw_active') != "Y") {
                if (!EXT_IS_ACTIVE("sponsor")) {
                        // No, abort here
                        return false;
@@ -261,20 +261,18 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) {
 
 // Payout this amount
 function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) {
-       global $_CONFIG;
-
        // Default is failed attempt
        $result = false;
 
        // Prepare the purpose
-       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_PAYOUT, $GLOBALS['userid']))."\";";
+       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), $GLOBALS['userid']))."\";";
        eval($eval);
 
        // Prepare the request data
        $requestData = array(
                'sub_request'   => "send",
                't_uid'                 => getConfig('wernis_refid'),
-               't_md5'                 => $_CONFIG['wernis_pass_md5'],
+               't_md5'                 => getConfig('wernis_pass_md5'),
                'r_uid'                 => bigintval($wdsId),
                'amount'                => bigintval($amount),
                'purpose'               => urlencode(base64_encode($purpose))