X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fwernis_functions.php;h=ee8a5d9958e5b862c6d23bd7c02efd03fd3bedca;hb=3df5cfd765d32de200a4db2a21a04cb2fde40b23;hp=db76a6474938c2dd600972ecaef8dec50e8292db;hpb=feda50ff73c05935417ed33164d30caf966ba854;p=mailer.git diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index db76a64749..ee8a5d9958 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -170,7 +170,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { break; default: // Unknown error (maybe new?) - DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error %s from WDS66 API received.", $data[1])); + 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]) @@ -215,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;