Browse Source

changed some error messages to be formatted, and actually meaningful
(didn't break string freeze)

Luke Ehresman 24 years ago
parent
commit
a053929ded
6 changed files with 40 additions and 21 deletions
  1. 2 0
      ChangeLog
  2. 9 9
      src/addrbook_search.php
  3. 4 1
      src/left_main.php
  4. 9 8
      src/right_main.php
  5. 8 2
      src/search.php
  6. 8 1
      src/webmail.php

+ 2 - 0
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

+ 9 - 9
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('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
+              $color[8], $color[4], $color[7], $color[7], $color[7]);
+      plain_error_message(_("You need a valid user and password to access this page!")
+                          . "<br><a href=\"../src/login.php\">"
+                          . _("Click here to log back in.") . "</a>.", $color);
+      echo "</body></html>";
       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))

+ 4 - 1
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('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
+			  $color[8], $color[4], $color[7], $color[7], $color[7]);
+	  echo "</body></html>";
       exit;
    }
 

+ 9 - 8
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('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
+              $color[8], $color[4], $color[7], $color[7], $color[7]);
+      plain_error_message(_("You need a valid user and password to access this page!")
+                          . "<br><a href=\"../src/login.php\">"
+                          . _("Click here to log back in.") . "</a>.", $color);
+      echo "</body></html>";
       exit;
    }
 

+ 8 - 2
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('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
+              $color[8], $color[4], $color[7], $color[7], $color[7]);
+      plain_error_message(_("You need a valid user and password to access this page!")
+                          . "<br><a href=\"../src/login.php\">"
+                          . _("Click here to log back in.") . "</a>.", $color);
+      echo "</body></html>";
       exit;
    }
 

+ 8 - 1
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('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
+			  $color[8], $color[4], $color[7], $color[7], $color[7]);
+	  plain_error_message(_("You need a valid user and password to access this page!") 
+	                      . "<br><a href=\"../src/login.php\">" 
+						  . _("Click here to log back in.") . "</a>.", $color);
+	  echo "</body></html>";
       exit;
    }