X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=439827a0978e7b24ae29d76998b1204053d81c07;hp=a285c70519303109e23f3e9d2f4c6f17d00a3b32;hb=86d7b339631307afe1ba16ceff8ce760c1523be1;hpb=fbcdb4e1f8ae0591ad9165b2db18b3c354c29a5b diff --git a/inc/functions.php b/inc/functions.php index a285c70519..439827a097 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -331,6 +331,9 @@ function loadTemplate ($template, $return=false, $content=array()) { // Prepare eval() command $eval = '$ret = "' . compileCode(smartAddSlashes($ret)) . '";'; + } elseif (substr($template, 0, 3) == 'js_') { + // JavaScripts don't like entities + $eval = '$ret = decodeEntities("' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '");'; } else { // Prepare eval() command $eval = '$ret = "' . compileCode(smartAddSlashes($GLOBALS['tpl_content'])) . '";'; @@ -2398,12 +2401,12 @@ function generateErrorCodeFromUserStatus ($status='') { $errorCode = getCode('UNKNOWN_STATUS'); // Generate constant name - $constantName = sprintf("ID_%s", $status); + $codeName = sprintf("ID_%s", $status); // Is the constant there? - if (isCodeSet($constantName)) { + if (isCodeSet($codeName)) { // Then get it! - $errorCode = getCode($constantName); + $errorCode = getCode($codeName); } else { // Unknown status logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown error status %s detected.", $status)); @@ -2673,6 +2676,7 @@ function getMessageFromErrorCode ($code) { case getCode('WRONG_ID') : $message = getMessage('LOGIN_WRONG_ID'); break; case getCode('ID_LOCKED') : $message = getMessage('LOGIN_ID_LOCKED'); break; case getCode('ID_UNCONFIRMED') : $message = getMessage('LOGIN_ID_UNCONFIRMED'); break; + case getCode('ID_GUEST') : $message = getMessage('LOGIN_ID_GUEST'); break; case getCode('NO_COOKIES') : $message = getMessage('LOGIN_NO_COOKIES'); break; case getCode('COOKIES_DISABLED') : $message = getMessage('LOGIN_NO_COOKIES'); break; case getCode('BEG_SAME_AS_OWN') : $message = getMessage('BEG_SAME_UID_AS_OWN'); break;