More globals rewritten, see ticket #100
[mailer.git] / inc / modules / guest / what-login.php
index deca65efedc093c3e2ed0d29f96aaa426d7adca6..bcea77ddb74a573b2211d33112a8967fad3c92f7 100644 (file)
  * Kurzbeschreibung  : Loginbereich (leitet an das richtige Lgin-Modul  *
  *                     weiter)                                          *
  * -------------------------------------------------------------------- *
- * $Revision:: 856                                                    $ *
- * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009)             $ *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author:: stelzi                                                   $ *
+ * $Author::                                                          $ *
  * Needs to be in all Files and every File needs "svn propset           *
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
@@ -49,15 +49,15 @@ if (!defined('__SECURITY')) {
 // Add description as navigation point
 ADD_DESCR("guest", __FILE__);
 
-global $DATA, $ERROR;
+global $DATA;
 
 // Initialize variables
-$ERROR = 0;
+$errorCode = 0;
 $probe_nickname = false;
 $uid = false;
 $hash = "";
 $URL = "";
-$ADD = "";
+$add = "";
 
 // Already logged in?
 if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) {
@@ -90,68 +90,68 @@ if (IS_MEMBER()) {
        $URL = "modules.php?module=login";
 } elseif ((IS_FORM_SENT()) && ("".$uid."" != "".REQUEST_POST('id')."")) {
        // Invalid input (no nickname extension installed but nickname entered)
-       $ERROR = getCode('EXTENSION_PROBLEM');
+       $errorCode = getCode('EXTENSION_PROBLEM');
 } elseif (IS_FORM_SENT()) {
        // Try the login (see inc/libs/user_functions.php)
        $URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password'));
 } elseif ((REQUEST_ISSET_POST(('new_pass'))) && (isset($uid))) {
        // Try the userid/email lookup (see inc/libs/user_functions.php)
-       $ERROR = USER_DO_NEW_PASSWORD(REQUEST_POST('email'), $uid);
+       $errorCode = USER_DO_NEW_PASSWORD(REQUEST_POST('email'), $uid);
 }
 
 // Login problems?
 if (REQUEST_ISSET_GET(('login'))) {
        // Use code from URL
-       $ERROR = REQUEST_GET(('login'));
+       $errorCode = REQUEST_GET(('login'));
 } // END  - if
 
 // Login problems?
-if (!empty($ERROR)) {
+if (!empty($errorCode)) {
        // Ok, which one now?
-       $MSG = "<tr>
+       $message = "<tr>
   <td width=\"10\" class=\"seperator\">&nbsp;</td>
   <td colspan=\"7\" align=\"center\">
     <span class=\"guest_failed\">";
 
-       switch ($ERROR) {
+       switch ($errorCode) {
                case getCode('WRONG_PASS'):
-                       $MSG .= getMessage('LOGIN_WRONG_PASS');
+                       $message .= getMessage('LOGIN_WRONG_PASS');
                        break;
 
                case getCode('WRONG_ID'):
-                       $MSG .= getMessage('LOGIN_WRONG_ID');
+                       $message .= getMessage('LOGIN_WRONG_ID');
                        break;
 
                case getCode('ID_LOCKED'):
-                       $MSG .= getMessage('LOGIN_ID_LOCKED');
+                       $message .= getMessage('LOGIN_ID_LOCKED');
                        break;
 
                case getCode('ID_UNCONFIRMED'):
-                       $MSG .= getMessage('LOGIN_ID_UNCONFIRMED');
+                       $message .= getMessage('LOGIN_ID_UNCONFIRMED');
                        break;
 
                case getCode('NO_COOKIES'):
-                       $MSG .= getMessage('LOGIN_NO_COOKIES');
+                       $message .= getMessage('LOGIN_NO_COOKIES');
                        break;
 
                case getCode('EXTENSION_PROBLEM'):
                        if (IS_ADMIN()) {
-                               $MSG .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "nickname");
+                               $message .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "nickname");
                        } else {
-                               $MSG .= getMessage('LOGIN_WRONG_ID');
+                               $message .= getMessage('LOGIN_WRONG_ID');
                        }
                        break;
 
                default:
-                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $ERROR));
-                       $MSG .= getMessage('LOGIN_WRONG_ID');
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $errorCode));
+                       $message .= getMessage('LOGIN_WRONG_ID');
                        break;
                }
-               $MSG .= "</span>
+               $message .= "</span>
   </td>
   <td width=\"10\" class=\"seperator\">&nbsp;</td>
 </tr>\n";
-               define('LOGIN_FAILURE_MSG', $MSG);
+               define('LOGIN_FAILURE_MSG', $message);
 } else {
        // No problems, no output
        define('LOGIN_FAILURE_MSG', "");