Extension wernis now should fully work again, withdraw was broken
authorRoland Häder <roland@mxchange.org>
Sat, 22 Nov 2008 20:43:35 +0000 (20:43 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 22 Nov 2008 20:43:35 +0000 (20:43 +0000)
inc/databases.php
inc/libs/wernis_functions.php

index 40403a2..8ed9085 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "543");
+define('CURR_SVN_REVISION', "544");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index db76a64..635b338 100644 (file)
@@ -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;