A lot variables renamed from all upper-case to hungarian notation
[mailer.git] / inc / modules / admin.php
index 42a9860dcbb5c8358a052c86755c04d28ec14427..2d9fc975f8dfa6aac2bed2b9ab384878aedf7db7 100644 (file)
@@ -119,23 +119,23 @@ if (!isAdminRegistered()) {
                // Yet-another "Notice" fix
                if ((IS_FORM_SENT()) && (REQUEST_POST('ok') == "***")) {
                        // No login entered?
-                       if (!REQUEST_ISSET_POST(('login'))) $MSG1 = getMessage('ADMIN_NO_LOGIN');
+                       if (!REQUEST_ISSET_POST(('login'))) $loginMessage = getMessage('ADMIN_NO_LOGIN');
 
                        // An error comes back from registration?
-                       if (!empty($ret)) $MSG1 = $ret;
+                       if (!empty($ret)) $loginMessage = $ret;
 
                        // No password entered?
-                       if (!REQUEST_ISSET_POST(('pass'))) $MSG2 = getMessage('ADMIN_NO_PASS');
+                       if (!REQUEST_ISSET_POST(('pass'))) $passwdMessage = getMessage('ADMIN_NO_PASS');
 
                        // Or password too short?
-                       if (strlen(REQUEST_POST('pass')) < 4) $MSG2 = getMessage('ADMIN_SHORT_PASS');
+                       if (strlen(REQUEST_POST('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS');
 
                        // Output error messages
-                       define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $MSG1));
-                       define('__MSG_PASS',  LOAD_TEMPLATE("admin_login_msg", true, $MSG2));
+                       define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $loginMessage));
+                       define('__MSG_PASS',  LOAD_TEMPLATE("admin_login_msg", true, $passwdMessage));
 
                        // Reset variables
-                       $MSG1 = ""; $MSG2 = "";
+                       $loginMessage = ""; $passwdMessage = "";
                } else {
                        // Reset values to nothing
                        define('__MSG_LOGIN', "");
@@ -251,6 +251,7 @@ if (!isAdminRegistered()) {
        } // END - if
 
        // Error detected?
+       // @TODO Rewrite all these constants
        if ($ret != "done") {
                if (REQUEST_ISSET_POST(('login'))) {
                        define('__LOGIN_VALUE', REQUEST_POST('login'));
@@ -260,30 +261,31 @@ if (!isAdminRegistered()) {
 
                if (IS_FORM_SENT()) {
                        // Set messages to zero
-                       $MSG1 = ""; $MSG2 = "";
+                       $loginMessage = ""; $passwdMessage = "";
 
                        // No login entered?
-                       if (!REQUEST_ISSET_POST(('login'))) $MSG1 = getMessage('ADMIN_NO_LOGIN');
+                       if (!REQUEST_ISSET_POST(('login'))) $loginMessage = getMessage('ADMIN_NO_LOGIN');
 
                        // An error comes back from login?
-                       if ((!empty($ret)) && (REQUEST_POST('ok') == "404")) $MSG1 = $ret;
+                       if ((!empty($ret)) && (REQUEST_POST('ok') == "404")) $loginMessage = $ret;
 
                        // No password entered?
-                       if (!REQUEST_ISSET_POST(('pass'))) $MSG2 = getMessage('ADMIN_NO_PASS');
+                       if (!REQUEST_ISSET_POST(('pass'))) $passwdMessage = getMessage('ADMIN_NO_PASS');
 
                        // Or password too short?
-                       if (strlen(REQUEST_POST('pass')) < 4) $MSG2 = getMessage('ADMIN_SHORT_PASS');
+                       if (strlen(REQUEST_POST('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS');
 
                        // An error comes back from login?
-                       if ((!empty($ret)) && (REQUEST_POST('ok') == "pass")) $MSG2 = $ret;
+                       if ((!empty($ret)) && (REQUEST_POST('ok') == "pass")) $passwdMessage = $ret;
 
                        // Load message template
-                       define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $MSG1));
-                       define('__MSG_PASS' , LOAD_TEMPLATE("admin_login_msg", true, $MSG2));
+                       define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $loginMessage));
+                       define('__MSG_PASS' , LOAD_TEMPLATE("admin_login_msg", true, $passwdMessage));
 
                        // Reset variables
-                       $MSG1 = ""; $MSG2 = "";
-               } else {
+                       unset($loginMessage);
+                       unset($passwdMessage);
+               } else {
                        // Set constants to empty for hiding them
                        define('__MSG_LOGIN', "");
                        define('__MSG_PASS' , "");