// 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;
// 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))