]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-wernis.php
More deprecated checking boolean expressions fixed
[mailer.git] / inc / modules / member / what-wernis.php
index a2d9e43ed464e888102deee4e8cc6fa335c60059..627ac41651dea3f0093dba0ad5018d1bec572062 100644 (file)
@@ -38,14 +38,14 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
+} elseif (!EXT_IS_ACTIVE("wernis"))
        // Extension "wernis" is not activated
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
        return;
 }
 
 // Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
 
 // Check if the admin has entered the data
 if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) {
@@ -232,7 +232,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                        $success = WERNIS_EXECUTE_WITHDRAW($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']);
                                        if ($success) {
                                                // Add it to this amount
-                                               $DEPTH = 0;
+                                               unset($DEPTH);
                                                ADD_POINTS_REFSYSTEM($GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct");
 
                                                // Update the user data as well..
@@ -265,7 +265,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                        OUTPUT_HTML("<br />");
                                } else {
                                        // All is fine here so do the withdraw
-                                       $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']);
+                                       $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], $_POST['amount']);
                                        if ($success) {
                                                // Sub points
                                                SUB_POINTS($GLOBALS['userid'], $_POST['amount']);
@@ -290,11 +290,12 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                break;
 
                        default: // Invalid mode!
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", $_GET['mode']));
                                LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, SQL_ESCAPE($_GET['mode'])));
                                return;
                }
        }
-}
+} // END - if
 
 // Prepare mode for template name
 $mode = sprintf("member_wernis_mode_%s", SQL_ESCAPE($_GET['mode']));