X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fdisplay_messages.php;h=af92c0e943e27ba2bfac84a66a9fe18ad622e3ef;hp=0e5831ad38599afc7440ca464011ec82ef7f6a77;hb=5100f68f551ae57607257ab1fec8755581d6f3f4;hpb=d6c32258c05219670ab3b4ae2d460d844ea9a247 diff --git a/functions/display_messages.php b/functions/display_messages.php index 0e5831ad..af92c0e9 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -3,7 +3,7 @@ /** * display_messages.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * This contains all messages, including information, error, and just @@ -13,6 +13,11 @@ * @package squirrelmail */ +/** + * including plugin functions + */ +require_once(SM_PATH . 'functions/plugin.php'); + /** * Find out where squirrelmail lives and try to be smart about it. * The only problem would be when squirrelmail lives in directories @@ -37,13 +42,12 @@ function sqm_baseuri(){ function error_message($message, $mailbox, $sort, $startMessage, $color) { $urlMailbox = urlencode($mailbox); - $string = '' . $message . ''."\n". ''. '" . - sprintf (_("Click here to return to %s"), $mailbox) . + sprintf (_("Click here to return to %s"), strtoupper($mailbox) == 'INBOX' ? _("INBOX") : imap_utf7_decode_local($mailbox)) . ''; error_box($string, $color); } @@ -86,6 +90,8 @@ function logout_error( $errString, $errTitle = '' ) { $color[8] = '#000000'; /* black Normal text */ } + list($junk, $errString, $errTitle) = do_hook('logout_error', $errString, $errTitle); + if ( $errTitle == '' ) { $errTitle = $errString; } @@ -123,6 +129,11 @@ function error_box($string, $color) { $err = _("ERROR"); + $ret = concat_hook_function('error_box', $string); + if($ret != '') { + $string = $ret; + } + /* check if the page header has been sent; if not, send it! */ if(!isset($pageheader_sent) && !$pageheader_sent) { /* include this just to be sure */ @@ -143,8 +154,8 @@ function error_box($string, $color) { echo ' ' . html_tag( 'td', $string."\n", 'left') . ''; echo ' '; + echo ' '; echo ' '; echo ' '; - echo ' '; } ?>