]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/wernis_functions.php
Templates rewritten/fixed, surfbar extended with per-entry reload lock
[mailer.git] / inc / libs / wernis_functions.php
index db76a6474938c2dd600972ecaef8dec50e8292db..ee8a5d9958e5b862c6d23bd7c02efd03fd3bedca 100644 (file)
@@ -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;