X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fdisplay_messages.php;h=e4b8dd2ecda140c38a7cb2bc7bcb5153ae1c6df3;hb=c4faef335b2362c81b8ebf026d4066c12d70536c;hp=6cdfac59fb7e15719c23e22f49febe86bfcffdea;hpb=87d2ad512ec9a0dbfd15efdb10e3d9d700f32073;p=squirrelmail.git diff --git a/functions/display_messages.php b/functions/display_messages.php index 6cdfac59..e4b8dd2e 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -6,7 +6,7 @@ * This contains all messages, including information, error, and just * about any other message you can think of. * - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2020 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -28,7 +28,7 @@ function error_message($message, $mailbox, $sort, $startMessage) { $link = array ( 'URL' => sqm_baseuri()."src/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox", 'TEXT' => sprintf (_("Click here to return to %s"), - strtoupper($mailbox) == 'INBOX' ? _("INBOX") : htmlspecialchars(imap_utf7_decode_local($mailbox))) + strtoupper($mailbox) == 'INBOX' ? _("INBOX") : sm_encode_html_special_chars(imap_utf7_decode_local($mailbox))) ); error_box($message, $link); } @@ -37,6 +37,7 @@ function error_message($message, $mailbox, $sort, $startMessage) { * Displays error message * * Second argument ($color array) is changed to boolean $return_output as of 1.5.2. + * * @param string $message error message * @param boolean $return_output When TRUE, output is returned to caller * instead of being sent to browser (OPTIONAL; @@ -57,9 +58,7 @@ function plain_error_message($message, $return_output=FALSE) { */ function logout_error( $errString, $errTitle = '' ) { global $frame_top, $org_logo, $org_logo_width, $org_logo_height, $org_name, - $hide_sm_attributions, $squirrelmail_language, $oTemplate; - - $base_uri = sqm_baseuri(); + $hide_sm_attributions, $squirrelmail_language, $oTemplate, $base_uri; $login_link = array ( 'URI' => $base_uri . 'src/login.php', @@ -68,7 +67,8 @@ function logout_error( $errString, $errTitle = '' ) { /* As of 1.5.2, plugin parameters are combined into one array; plugins on this hook must be updated */ - do_hook('logout_error', $temp=array(&$errString, &$errTitle, &$login_link)); + $temp = array(&$errString, &$errTitle, &$login_link); + do_hook('logout_error', $temp); if ( $errTitle == '' ) { $errTitle = $errString; @@ -101,7 +101,7 @@ function logout_error( $errString, $errTitle = '' ) { $sm_attribute_str = ''; if (isset($hide_sm_attributions) && !$hide_sm_attributions) { - $sm_attribute_str = _("SquirrelMail Webmail Application") . "\n" + $sm_attribute_str = _("SquirrelMail Webmail") . "\n" . _("By the SquirrelMail Project Team"); } @@ -141,10 +141,11 @@ function logout_error( $errString, $errTitle = '' ) { * @since 1.3.2 */ function error_box($string, $link=NULL, $return_output=FALSE) { - global $pageheader_sent, $oTemplate; + global $pageheader_sent, $oTemplate, $org_title; $err = _("ERROR"); do_hook('error_box', $string); + if ( !isset($org_title) ) $org_title = 'SquirrelMail'; // check if the page header has been sent; if not, send it! // @@ -153,7 +154,7 @@ function error_box($string, $link=NULL, $return_output=FALSE) { // to worry about page headers in that case) // if (!$return_output && empty($pageheader_sent)) { - displayHtmlHeader('SquirrelMail: '.$err); + displayHtmlHeader($org_title . ': '.$err); $pageheader_sent = TRUE; echo create_body(); // this is template-safe (see create_body() function) }