]> git.mxchange.org Git - mailer.git/commitdiff
More calls of DEBUG_LOG() added
authorRoland Häder <roland@mxchange.org>
Sat, 22 Nov 2008 19:22:52 +0000 (19:22 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 22 Nov 2008 19:22:52 +0000 (19:22 +0000)
22 files changed:
inc/databases.php
inc/functions.php
inc/install-inc.php
inc/libs/sponsor_functions.php
inc/libs/wernis_functions.php
inc/modules/admin.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-guestedit.php
inc/modules/admin/what-list_task.php
inc/modules/guest/what-login.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/login.php
inc/modules/member/what-mydata.php
inc/modules/member/what-order.php
inc/modules/member/what-primera.php
inc/modules/member/what-wernis.php
inc/mysql-manager.php
mailid.php
modules.php

index 8e09b8e81b431f0ffde8efc04baa39888572bc5b..6457ef2cd471329c6b365c4d35d69180e5aacc3a 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', "533");
+define('CURR_SVN_REVISION', "534");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 8e533d35822ad210f7f3e9e8ad0883fcff96d914..bf8b9b907b8d54041be49c64ff27013248d58243 100644 (file)
@@ -132,7 +132,8 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
 
                default:
                        // Huh, something goes wrong or maybe you have edited config.php ???
-                       die ("<STRONG>".FATAL_ERROR.":</STRONG> ".LANG_NO_RENDER_DIRECT);
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid renderer %s detected.", OUTPUT_MODE));
+                       MXCHANGE_DIE("<STRONG>".FATAL_ERROR.":</STRONG> ".LANG_NO_RENDER_DIRECT);
                        break;
                }
        } elseif ((_OB_CACHING == "on") && ($footer == 1)) {
@@ -537,13 +538,13 @@ function GEN_PASS($LEN = 0) {
        $PASS = "";
        for ($i = 0; $i < $LEN; $i++) {
                $PASS .= $ABC[mt_rand(0, sizeof($ABC) -1)];
-       }
+       } // END - for
 
        // When the size is below 40 we can also add additional security by scrambling it
        if (strlen($PASS) <= 40) {
                // Also scramble the password
                $PASS = scrambleString($PASS);
-       }
+       } // END - if
 
        // Return the password
        return $PASS;
@@ -567,6 +568,9 @@ function MAKE_DATETIME ($time, $mode="0")
                        case "1": $ret = strtolower(date("d.m.Y - H:i", $time)); break;
                        case "2": $ret = date("d.m.Y|H:i", $time); break;
                        case "3": $ret = date("d.m.Y", $time); break;
+                       default:
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
+                               break;
                }
                break;
 
@@ -576,6 +580,9 @@ function MAKE_DATETIME ($time, $mode="0")
                        case "1": $ret = date("Y-m-d - g:i A", $time); break;
                        case "2": $ret = date("y-m-d|H:i", $time); break;
                        case "3": $ret = date("y-m-d", $time); break;
+                       default:
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
+                               break;
                }
        }
        return $ret;
@@ -696,6 +703,7 @@ function TRANSLATE_STATUS($status) {
                break;
 
        default:
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $status));
                $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2;
                break;
        }
index f19cf3a718928e19c6b463653dd5bb2c932870b5..f9ce4811d86f8057fe55d2c55be8cad977485725 100644 (file)
@@ -479,6 +479,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                break;
 
        default:
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected.", $_GET['page']));
                OUTPUT_HTML("    <STRONG class=\"install_error\">".WRONG_PAGE."</STRONG>");
                break;
        }
index beebdc41cd52bb3bc716316d0f6233b860698033..340958e686779c7bf07ebbc2067c2d945cd17077 100644 (file)
@@ -283,6 +283,7 @@ function SPONSOR_TRANSLATE_STATUS($status)
                break;
 
        default:
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $status));
                $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2;
                break;
        }
@@ -567,6 +568,7 @@ function SPONSOR_SAVE_DATA($POST, $content)
                break;
 
        default: // Unknown sponsor what value!
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $_GET['what']));
                $MSG = SPONSOR_UNKNOWN_WHAT_1.$_GET['what'].SPONSOR_UNKNOWN_WHAT_2;
                $templ = ""; $subj = "";
                break;
index 011e2175bb3308f67e236a1f05f6c61f0019a823..db76a6474938c2dd600972ecaef8dec50e8292db 100644 (file)
@@ -170,6 +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]));
                                $return = array(
                                        'status'  => "request_failed",
                                        'message' => sprintf(WERNIS_API_REQUEST_FAILED, $data[1])
index 1017c5b164705944c20cd1611f67304cbe962214..d416353943a48b21069446b62bd7d3bfbfd76d22 100644 (file)
@@ -90,6 +90,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                                $ret = "done";
                        }
 
+                       // Admin still not registered?
                        if (!isBooleanConstantAndTrue('admin_registered')) {
                                // Write to config that registration is done
                                admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
@@ -97,7 +98,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                                // Load URL for login
                                $URL = URL."/modules.php?module=admin&amp;action=login";
                                LOAD_URL($URL);
-                       }
+                       } // END - if
                        break;
                }
        }
index 9a81ae87955ba1428fbd2b75f9530fe95e8d6388..db0af358c5b296fb8178d6fbd0e744d2d2c2bd2c 100644 (file)
@@ -277,6 +277,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
                                        switch ($mode)
                                        {
                                        default: // Unknown support mode
+                                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode));
                                                $OUT .= "<FONT class=\"admin_failed medium\">".ADMIN_UNKNOWN_SUPPORT_MODE_1.$mode.ADMIN_UNKNOWN_SUPPORT_MODE_2."</FONT>\n";
                                                break;
                                        }
@@ -356,6 +357,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) {
                                        break;
 
                                default: // Unknown task type
+                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
                                        $OUT .= "<FONT class=\"admin_failed medium\">".ADMIN_UNKNOWN_TASK_TYPE_1.$type.ADMIN_UNKNOWN_TASK_TYPE_2.$id.ADMIN_UNKNOWN_TASK_TYPE_3."</FONT>\n";
                                        break;
                                }
index 75045efc2b05c1bf9480a279c9ee39e0ae2da60d..688b5758c54556f97822cfca6c995dc546b90706 100644 (file)
@@ -146,15 +146,12 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) {
 
        // Load template
        LOAD_TEMPLATE("admin_amenu_delete");
-}
- elseif ((isset($_POST['ok'])) && (!IS_DEMO()))
-{
+} elseif ((isset($_POST['ok'])) && (!IS_DEMO())) {
        // An action is done...
        switch ($_POST['ok'])
        {
        case "edit": // Edit menu
-               foreach ($_POST['sel'] as $sel => $menu)
-               {
+               foreach ($_POST['sel'] as $sel => $menu) {
                        // Secure ID
                        $sel = bigintval($sel);
 
@@ -173,33 +170,35 @@ WHERE ".$AND." AND id=%s LIMIT 1",
        $sel,
 ), __FILE__, __LINE__);
                }
+
+               // Purge admin menu cache
                CACHE_PURGE_ADMIN_MENU(0, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel]);
+
+               // Load template
                LOAD_TEMPLATE("admin_data_saved");
                break;
 
        case "del": // Delete menu
-               foreach ($_POST['sel'] as $sel => $menu)
-               {
+               foreach ($_POST['sel'] as $sel => $menu) {
                        $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$AND." AND id=%s LIMIT 1",
                         array(bigintval($sel)), __FILE__, __LINE__);
                        CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
-               }
+               } // END - foreach
+
+               // Load template
                LOAD_TEMPLATE("admin_data_saved");
                break;
 
        default: // Unexpected action
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", $_POST['ok']));
                define('__OK_VALUE', $_POST['ok']);
                LOAD_TEMPLATE("admin_menu_unknown_okay");
                break;
        }
-}
- else
-{
-       if ((!empty($_GET['act'])) && (!empty($_GET['tid'])) && (!empty($_GET['fid'])))
-       {
+} else {
+       if ((!empty($_GET['act'])) && (!empty($_GET['tid'])) && (!empty($_GET['fid']))) {
                // Get IDs
-               if (!empty($_GET['w']))
-               {
+               if (!empty($_GET['w'])) {
                        // Sub menus selected
                        $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND sort='%s' LIMIT 1",
                         array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
index 5ab5c8ec3a957fbba76527f6de23b94351c8d553..631eef75314a46e14a88bced7ce0b8bca4082716 100644 (file)
@@ -170,6 +170,7 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
                                break;
 
                        default: // Unknown mode
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", $_GET['mode']));
                                $MSG = ADMIN_INVALID_MODE_1.SQL_ESCAPE($_GET['mode']).ADMIN_INVALID_MODE_2;
                                break;
                        }
index cf7ed37a8325b8754ebe4b9a236d3ddcd7dd730a..dc1d4bad6853d5e2187d2e3a753b6b8e53dae368 100644 (file)
@@ -188,6 +188,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 
        default: // Unexpected action
                define('__OK_VALUE', $_POST['ok']);
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", $_POST['ok']));
                LOAD_TEMPLATE("admin_menu_unknown_okay");
                break;
        }
index 251cf29082cdd2a8956954a1060d033c03a34bf4..22dd312f094242c0876578ad0cf94349dba66392 100644 (file)
@@ -73,6 +73,7 @@ case "closed": // List all closed
        break;
 
 default: // Unknown type
+       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $_GET['type']));
        LOAD_TEMPLATE("admin_settings_saved", false, TASK_ADMIN_UNKNOWN_MODE_1.$_GET['type'].TASK_ADMIN_UNKNOWN_MODE_2);
        break;
 }
index efaf745c31b68e4e2eec7f094356e73609993f2e..6dddc59702f3de78384c9c01f84c3ba95a42f5cd 100644 (file)
@@ -213,6 +213,7 @@ if (IS_MEMBER()) {
                                        break;
 
                                default:
+                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error status %s detected.", $status));
                                        $ERROR = CODE_UNKNOWN_STATUS;
                                        break;
                        }
@@ -325,6 +326,7 @@ if (!empty($ERROR)) {
                        break;
 
                default:
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $ERROR));
                        $MSG .= LOGIN_WRONG_ID;
                        break;
                }
index c38e2e5bb5676d069c12a2f56a91a9c81e320308..542db3ef969f75038831abe7f647f9f1d265d874 100644 (file)
@@ -398,6 +398,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
                break;
 
        default: // Default is the US date format... :)
+               define('BIRTHDAY_SELECTION', ADD_SELECTION("month", $_POST['month']).ADD_SELECTION("day", $_POST['day']).ADD_SELECTION("year", $_POST['year']));
                break;
        }
 
index d3af4b373c8a05ea408c3ce996f588cd476d057c..9e61d124e340f1ca7591b7dc2dfd9794001b09ff 100644 (file)
@@ -279,13 +279,11 @@ WHERE id='%s' LIMIT 1", array($_POST['pay_type']), __FILE__, __LINE__);
                break;
 
        default:
-               if (!IS_ADMIN())
-               {
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS));
+               if (!IS_ADMIN()) {
                        // Message for testing admin
                        $MSG = ADMIN_SPONSOR_UNKOWN_STATUS_1.$STATUS.ADMIN_SPONSOR_UNKOWN_STATUS_2;
-               }
-                else
-               {
+               } else {
                        // Message for the guest
                        $MSG = SPONSOR_UNKOWN_STATUS_1.$STATUS.SPONSOR_UNKOWN_STATUS_2;
                }
@@ -294,15 +292,12 @@ WHERE id='%s' LIMIT 1", array($_POST['pay_type']), __FILE__, __LINE__);
 
        // Display message
        LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-}
- else
-{
+} else {
        // Check for payment types
        $result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_currency, pay_min_count
 FROM "._MYSQL_PREFIX."_sponsor_paytypes
 ORDER BY pay_name", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0)
-       {
+       if (SQL_NUMROWS($result) > 0) {
                // Load all types...
                $OUT = "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"300\" class=\"left2 right2 top2\">\n";
                $SW = 2;
@@ -381,16 +376,14 @@ ORDER BY pay_name", __FILE__, __LINE__);
   <STRONG><FONT class=\"guest_failed\">".SPONSOR_REGISTER_SOMETHING_MISSING.":</FONT></STRONG><br />
 </P>
 <OL>\n";
-                       foreach ($FORM_ERRORS as $error)
-                       {
+                       foreach ($FORM_ERRORS as $error) {
                                $OUT .= "<LI>".$error."</LI>\n";
-                       }
+                       } // END - if
+
                        $OUT .= "</OL><br />\n";
                        define('__SPONSOR_FORM_ERRORS', $OUT);
                        define('__SPONSOR_REFID', $_POST['refid']);
-               }
-                else
-               {
+               } else {
                        // None found, first call
                        define('__COMPANY'  , "");
                        define('__POSITION' , "");
@@ -418,22 +411,17 @@ ORDER BY pay_name", __FILE__, __LINE__);
                }
 
                // Prepare referal things
-               if (!isset($_GET['refid']))
-               {
+               if (!isset($_GET['refid'])) {
                        // No referal link
                        define('__SPONSOR_REFID', "0");
-               }
-                else
-               {
+               } else  {
                        // Referal ID transmitted, we don't care here if it is right or not
                        define('__SPONSOR_REFID', bigintval($_GET['refid']));
                }
 
                // Display registration form
                LOAD_TEMPLATE("guest_sponsor_reg");
-       }
-        else
-       {
+       } else {
                // Nothing added so far
                LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_PAYMENT_LIST_IS_EMPTY);
        }
index 9ca58e5f02d8f8b16c17f742753cf0865aaf059c..5928f54c6057342a5ff8c661113012e47d1105fc 100644 (file)
@@ -54,6 +54,7 @@ if ($status != "CONFIRMED") {
                break;
 
        default:
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $status));
                $ERROR = CODE_UNKNOWN_STATUS;
                break;
        }
index 848b54f136ea8cc18b47d8bb6f7bf014ba6fe39f..8213cb1644315351f88206ce7a3596d2c4b446c6 100644 (file)
@@ -168,11 +168,11 @@ FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                default: // Default is the US date format... :)
                        break;
                }
+
                define('DOB', $DOB);
                define('MAX_REC_LIST', ADD_MAX_RECEIVE_LIST("member", $DATA[11], true));
 
-               if (EXT_IS_ACTIVE("country"))
-               {
+               if (EXT_IS_ACTIVE("country")) {
                        // Generate selection box
                        $OUT  = "<SELECT name=\"country_code\" class=\"member_select\" size=\"1\">\n";
                        $whereStatement = "WHERE is_active='Y'";
@@ -180,9 +180,7 @@ FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                        $OUT .= ADD_OPTION_LINES("countries", "id", "descr", $DATA[3], "code", $whereStatement);
                        $OUT .= "</SELECT>";
                        define('__COUNTRY_CONTENT', $OUT);
-               }
-                else
-               {
+               } else {
                        // Ouput default input box
                        define('__COUNTRY_CONTENT', "<INPUT type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\">");
                }
index 1f216e16b72a314189dd5c00b6e46a1c7ce3f801..51c11ef419de7f4a493d4b32e21a536d02d9e822 100644 (file)
@@ -603,20 +603,20 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                        break;
 
                                default:
+                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", $_GET['msg']));
                                        $MSG = UNKNOWN_CODE_1.$_GET['msg'].UNKNOWN_CODE_2;
                                        break;
                                }
-                               if (!empty($MSG))
-                               {
+
+                               if (!empty($MSG)) {
                                        // We got system message so we drop it out to the user
                                        LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-                               }
+                               } // END - if
 
                                // Load all email types...
-                               while ($typeS[] = SQL_FETCHROW($result))
-                               {
+                               while ($typeS[] = SQL_FETCHROW($result)) {
                                        // Nothing to do here... ;-)
-                               }
+                               } // END - while
 
                                // Free memory
                                SQL_FREERESULT($result);
@@ -634,6 +634,11 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                case "ORDER": // He is allowed to send as much as he setup the receiving value
                                        define('ORDER_MAX_VALUE', ORDER_ALLOWED_RECEIVE_1.$ALLOWED.ORDER_ALLOWED_RECEIVE_2.$MAXI.ORDER_ALLOWED_RECEIVE_3);
                                        break;
+
+                               default: // Unknown/invalid
+                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", $_CONFIG['order_max_full']));
+                                       define('ORDER_MAX_VALUE', ORDER_ALLOED_UNKNOWN);
+                                       break;
                                }
 
                                // Load final template
index 7b8343db0e954bf572c48f43b37bf78cf2949f0c..ad350d165c5f56b946cec51bc8c1772221fc387d 100644 (file)
@@ -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']));
index f38498b40bfc94c92d6069b30d64f21e606c66a0..eba573efd6aa7a8d4fccf870bf7d65f515e53992 100644 (file)
@@ -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']));
index e92f1e4d502bcefcb63320432a60acfec7680d13..093ea4ee8f24d6e8bf93e80b8acaf7c2bb14b8eb 100644 (file)
@@ -205,13 +205,13 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) {
                switch ($ACC_LVL)
                {
                case "admin":
-                       $MOD_CHECK = "admin";
+                       $modCheck = "admin";
                        break;
 
                case "sponsor":
                case "guest":
                case "member":
-                       $MOD_CHECK = $GLOBALS['module'];
+                       $modCheck = $GLOBALS['module'];
                        break;
                }
                $AND = " AND (what='' OR what IS NULL)";
@@ -223,12 +223,12 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) {
                switch ($ACC_LVL)
                {
                case "admin":
-                       $MOD_CHECK = "admin";
+                       $modCheck = "admin";
                        break;
 
                case "guest":
                case "member":
-                       $MOD_CHECK = $GLOBALS['module'];
+                       $modCheck = $GLOBALS['module'];
                        if (!IS_ADMIN()) {
                                $AND = " AND visible='Y' AND locked='N'";
                        }
@@ -240,13 +240,13 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) {
                // Sponsor / engine menu
                $type = "what";
                $search = $file;
-               $MOD_CHECK = $GLOBALS['module'];
+               $modCheck = $GLOBALS['module'];
                $AND = "";
        } else {
                // Other
                $type = "menu";
                $search = $file;
-               $MOD_CHECK = $GLOBALS['module'];
+               $modCheck = $GLOBALS['module'];
                $AND = "";
        }
        if ((!isset($DEPTH)) && (!$return)) {
@@ -278,9 +278,9 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) {
                if ($return) {
                        // Return title
                        return $ret;
-               } elseif (((GET_EXT_VERSION("sql_patches") >= "0.2.3") && ($_CONFIG['youre_here'] == "Y")) || ((IS_ADMIN()) && ($MOD_CHECK == "admin"))) {
+               } elseif (((GET_EXT_VERSION("sql_patches") >= "0.2.3") && ($_CONFIG['youre_here'] == "Y")) || ((IS_ADMIN()) && ($modCheck == "admin"))) {
                        // Output HTML code
-                       $OUT = $prefix."<STRONG><A class=\"you_are_here\" href=\"".URL."/modules.php?module=".$MOD_CHECK."&amp;".$type."=".$search.$LINK_ADD."\">".$ret."</A></STRONG>\n";
+                       $OUT = $prefix."<STRONG><A class=\"you_are_here\" href=\"".URL."/modules.php?module=".$modCheck."&amp;".$type."=".$search.$LINK_ADD."\">".$ret."</A></STRONG>\n";
 
                        // Can we close the you-are-here navigation?
                        //* DEBUG: */ echo __LINE__."*".$type."/".$GLOBALS['what']."*<br />\n";
@@ -839,6 +839,7 @@ function SEND_MODE_MAILS($mod, $modes)
                                                        break;
 
                                                default:
+                                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
                                                        $content = MEMBER_UNKNOWN_MODE.": ".$mode."\n\n";
                                                        break;
                                                }
@@ -855,11 +856,11 @@ function SEND_MODE_MAILS($mod, $modes)
                                        if ($_CONFIG['admin_notify'] == "Y") {
                                                // The admin needs to be notified about a profile change
                                                $msg_admin = "admin_mydata_notify";
-                                               $sub_adm = ADMIN_CHANGED_DATA;
+                                               $sub_adm   = ADMIN_CHANGED_DATA;
                                        } else {
                                                // No mail to admin
                                                $msg_admin = "";
-                                               $sub_adm = "";
+                                               $sub_adm   = "";
                                        }
 
                                        // Set subject lines
@@ -870,6 +871,7 @@ function SEND_MODE_MAILS($mod, $modes)
                                        break;
 
                                default:
+                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
                                        $content = "<STRONG><SPAN class=\"member_failed\">".UNKNOWN_MODULE."</SPAN></STRONG>";
                                        break;
                                }
@@ -1759,12 +1761,12 @@ function LOAD_CONFIG($no="0") {
        return $CFG_DUMMY;
 }
 // Gets the matching what name from module
-function GET_WHAT($MOD_CHECK) {
+function GET_WHAT($modCheck) {
        global $_CONFIG;
 
        $wht = "";
-       //* DEBUG: */ echo __LINE__."!".$MOD_CHECK."!<br />\n";
-       switch ($MOD_CHECK)
+       //* DEBUG: */ echo __LINE__."!".$modCheck."!<br />\n";
+       switch ($modCheck)
        {
        case "admin":
                $wht = "overview";
@@ -1773,7 +1775,7 @@ function GET_WHAT($MOD_CHECK) {
        case "login":
        case "index":
                $wht = "welcome";
-               if (($MOD_CHECK == "index") && (!empty($_CONFIG['index_home']))) $wht = $_CONFIG['index_home'];
+               if (($modCheck == "index") && (!empty($_CONFIG['index_home']))) $wht = $_CONFIG['index_home'];
                break;
 
        default:
index fcb310d01b8b4b8c744f3a8be48a575fab4d3f6c..a913ef06ff0a1b5e2472c21667ee0a04ee2ad802 100644 (file)
@@ -213,6 +213,7 @@ if (isBooleanConstantAndTrue('mxchange_installed'))
                                break;
 
                        default:
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", $_CONFIG['mailid_error_redirect']));
                                LOAD_URL("modules.php?module=index&amp;msg=".CODE_UNKNOWN_STATUS."&amp;ext=mailid");
                                break;
                }
index 3787101d996b47b7f8642cc51900be9dfb0efe20..78bf8c7c3902a1cd5f24cae5cbea874d11ca9c7a 100644 (file)
@@ -129,21 +129,21 @@ if ((!empty($_CONFIG['maintenance'])) && ($_CONFIG['maintenance'] == "Y") && (!I
                break;
 
        case "locked":
-               if (!FILE_READABLE(PATH."inc/modules/".$GLOBALS['module'].".php"))
-               {
+               if (!FILE_READABLE(PATH."inc/modules/".$GLOBALS['module'].".php")) {
                        // Module does addionally not exists
                        ADD_FATAL(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2);
-               }
+               } // END - if
+
+               // Add fatal message
                ADD_FATAL(LANG_MOD_LOCKED_1.$GLOBALS['module'].LANG_MOD_LOCKED_2);
                break;
 
        default:
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
                ADD_FATAL(LANG_MOD_UNKNOWN_1.$check.LANG_MOD_UNKNOWN_2);
                break;
        }
-}
- elseif (sizeof($FATAL) == 0)
-{
+} elseif (sizeof($FATAL) == 0) {
        // MySQL problems!
        ADD_FATAL(MYSQL_ERRORS);
 }
@@ -155,7 +155,7 @@ if ($MOD_VALID) {
        //
        // Everything is okay so we can load the module
        include (__MODULE);
-}
+} // END - if
 
 // Next-to-end add the footer
 include (PATH."inc/footer.php");