$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif ((!EXT_IS_ACTIVE("user")) && (!IS_ADMIN())) {
- addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "user");
+ addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
return;
}
$URL = "modules.php?module=login";
} elseif ((isset($_POST['ok'])) && ("".$uid."" != "".$_POST['id']."")) {
// Invalid input (no nickname extension installed but nickname entered)
- $ERROR = CODE_EXTENSION_PROBLEM;
+ $ERROR = constant('CODE_EXTENSION_PROBLEM');
} elseif (isset($_POST['ok'])) {
// Try the login (see inc/libs/user_functions.php)
$URL = USER_DO_LOGIN($_POST['id'], $_POST['password']);
<span class=\"guest_failed\">";
switch ($ERROR) {
- case CODE_WRONG_PASS:
- $MSG .= LOGIN_WRONG_PASS;
+ case constant('CODE_WRONG_PASS'):
+ $MSG .= getMessage('LOGIN_WRONG_PASS');
break;
- case CODE_WRONG_ID:
- $MSG .= LOGIN_WRONG_ID;
+ case constant('CODE_WRONG_ID'):
+ $MSG .= getMessage('LOGIN_WRONG_ID');
break;
- case CODE_ID_LOCKED:
- $MSG .= LOGIN_ID_LOCKED;
+ case constant('CODE_ID_LOCKED'):
+ $MSG .= getMessage('LOGIN_ID_LOCKED');
break;
- case CODE_ID_UNCONFIRMED:
- $MSG .= LOGIN_ID_UNCONFIRMED;
+ case constant('CODE_ID_UNCONFIRMED'):
+ $MSG .= getMessage('LOGIN_ID_UNCONFIRMED');
break;
- case CODE_NO_COOKIES:
- $MSG .= LOGIN_NO_COOKIES;
+ case constant('CODE_NO_COOKIES'):
+ $MSG .= getMessage('LOGIN_NO_COOKIES');
break;
- case CODE_EXTENSION_PROBLEM:
+ case constant('CODE_EXTENSION_PROBLEM'):
if (IS_ADMIN()) {
- $MSG .= sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "nickname");
+ $MSG .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "nickname");
} else {
- $MSG .= LOGIN_WRONG_ID;
+ $MSG .= getMessage('LOGIN_WRONG_ID');
}
break;
default:
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $ERROR));
- $MSG .= LOGIN_WRONG_ID;
+ $MSG .= getMessage('LOGIN_WRONG_ID');
break;
}
$MSG .= "</span>
// URL was constructed
if (getTotalFatalErrors()) {
// Fatal errors!
- require_once(PATH."inc/fatal_errors.php");
+ LOAD_INC_ONCE("inc/fatal_errors.php");
} else {
// Load URL
LOAD_URL($URL);