X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fwernis_functions.php;h=ee8a5d9958e5b862c6d23bd7c02efd03fd3bedca;hb=249af9b67343a73df780d95982ccc32d81e564ab;hp=011e2175bb3308f67e236a1f05f6c61f0019a823;hpb=5f8c1a333627cd0145f778a6eebdb251f5bb40b6;p=mailer.git diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index 011e2175bb..ee8a5d9958 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -170,6 +170,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { break; default: // Unknown error (maybe new?) + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown error %s from WDS66 API received.", $data[1])); $return = array( 'status' => "request_failed", 'message' => sprintf(WERNIS_API_REQUEST_FAILED, $data[1]) @@ -214,13 +215,15 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { global $_CONFIG; // Is the sponsor extension installed? - if (!EXT_IS_ACTIVE("sponsor")) { - // No, abort here - return false; - } elseif (!IS_SPONSOR()) { - // No sponsor, not allowed to withdraw! - return false; - } + if ($_CONFIG['wernis_withdraw_active'] == "N") { + if (!EXT_IS_ACTIVE("sponsor")) { + // No, abort here + return false; + } elseif (!IS_SPONSOR()) { + // No sponsor, not allowed to withdraw! + return false; + } + } // END - if // Default is failed attempt $result = false;