]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-primera.php
More calls of DEBUG_LOG() added
[mailer.git] / inc / modules / member / what-primera.php
index 78f68da347cf6dce7b6b159e2a009d84ab2caacf..ad350d165c5f56b946cec51bc8c1772221fc387d 100644 (file)
@@ -32,7 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!IS_MEMBER()) {
@@ -45,7 +45,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
 }
 
 // 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['primera_api_name'])) || (empty($_CONFIG['primera_api_md5']))) {
@@ -59,7 +59,7 @@ $content = array(); $points = false;
 
 // Is the mode set (payout only)
 if (!isset($_GET['mode'])) {
-       // Get referral id
+       // Get referal id
        $content['refid'] = bigintval($_CONFIG['primera_refid']);
 
        // Get Primus id
@@ -187,7 +187,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                        // Default is locked!
                                        $locked = true;
 
-                                       // Shall I "pay" the referral points imidiately?
+                                       // Shall I "pay" the referal points imidiately?
                                        if ($_CONFIG['ref_payout'] == "0") {
                                                // Yes, "pay" it now
                                                $locked = false;
@@ -216,10 +216,11 @@ 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(PRIMERA_MEMBER_MODE_INVALID, SQL_ESCAPE($_GET['mode'])));
                        return;
        }
-}
+} // END - if
 
 // Prepare mode for template name
 $mode = sprintf("member_primera_mode_%s", SQL_ESCAPE($_GET['mode']));