From 10455998ff36ac23c25799914656fd4f13c14b6f Mon Sep 17 00:00:00 2001 From: lkehresman Date: Sat, 13 Jan 2001 16:01:43 +0000 Subject: [PATCH] changed some error messages to be formatted, and actually meaningful (didn't break string freeze) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@934 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ src/addrbook_search.php | 18 +++++++++--------- src/left_main.php | 5 ++++- src/right_main.php | 17 +++++++++-------- src/search.php | 10 ++++++++-- src/webmail.php | 9 ++++++++- 6 files changed, 40 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8477e515..21ee6689 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ Version 1.0pre2 -- DEVELOPMENT ------------------------------ +- Replaced error messages with better, formatted, and meaningful messages. +- Fixed "reply all" so that it works intelligently now - Made deleted (but not expunged) messages easier to detect (only if $auto_expunge = false) - Fixed bug that didn't display size correctly in search results - Major memory management and speed improvements with downloading of attachments diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 3205e4a4..55dc5cae 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -129,17 +129,17 @@ function bcc_address($addr) { if (!isset($i18n_php)) include("../functions/i18n.php"); - if(!isset($logged_in)) { - set_up_language($squirrelmail_language, true); - echo _("You must login first."); + if(!isset($logged_in) || !isset($username) || !isset($key)) { + include ("../themes/default_theme.php"); + include ("../functions/display_messages.php"); + printf('', + $color[8], $color[4], $color[7], $color[7], $color[7]); + plain_error_message(_("You need a valid user and password to access this page!") + . "
" + . _("Click here to log back in.") . ".", $color); + echo ""; exit; } - if(!isset($username) || !isset($key)) { - set_up_language($squirrelmail_language, true); - echo _("You need a valid user and password to access this page!"); - exit; - } - if (!isset($config_php)) include("../config/config.php"); if (!isset($array_php)) diff --git a/src/left_main.php b/src/left_main.php index 8d823bae..6a0825eb 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -16,7 +16,10 @@ if(!isset($username)) { set_up_language($squirrelmail_language, true); - echo "You need a valid user and password to access this page!"; + include ("../themes/default_theme.php"); + printf('', + $color[8], $color[4], $color[7], $color[7], $color[7]); + echo ""; exit; } diff --git a/src/right_main.php b/src/right_main.php index 3f6bba8a..955faf64 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -15,14 +15,15 @@ session_start(); - if(!isset($logged_in)) { - set_up_language($squirrelmail_language, true); - echo _("You must login first."); - exit; - } - if(!isset($username) || !isset($key)) { - set_up_language($squirrelmail_language, true); - echo _("You need a valid user and password to access this page!"); + if(!isset($logged_in) || !isset($username) || !isset($key)) { + include ("../themes/default_theme.php"); + include ("../functions/display_messages.php"); + printf('', + $color[8], $color[4], $color[7], $color[7], $color[7]); + plain_error_message(_("You need a valid user and password to access this page!") + . "
" + . _("Click here to log back in.") . ".", $color); + echo ""; exit; } diff --git a/src/search.php b/src/search.php index 03945730..570c5c7c 100644 --- a/src/search.php +++ b/src/search.php @@ -7,8 +7,14 @@ exit; } if(!isset($username) || !isset($key)) { - set_up_language($squirrelmail_language, true); - echo _("You need a valid user and password to access this page!"); + include ("../themes/default_theme.php"); + include ("../functions/display_messages.php"); + printf('', + $color[8], $color[4], $color[7], $color[7], $color[7]); + plain_error_message(_("You need a valid user and password to access this page!") + . "
" + . _("Click here to log back in.") . ".", $color); + echo ""; exit; } diff --git a/src/webmail.php b/src/webmail.php index 89b2536a..704d6549 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -19,7 +19,14 @@ if(!isset($username)) { set_up_language($squirrelmail_language); - echo _("You need a valid user and password to access this page!"); + include ("../themes/default_theme.php"); + include ("../functions/display_messages.php"); + printf('', + $color[8], $color[4], $color[7], $color[7], $color[7]); + plain_error_message(_("You need a valid user and password to access this page!") + . "
" + . _("Click here to log back in.") . ".", $color); + echo ""; exit; } -- 2.25.1