Little bit of tidying up
authorbrong <brong@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 28 Mar 2002 12:40:19 +0000 (12:40 +0000)
committerbrong <brong@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 28 Mar 2002 12:40:19 +0000 (12:40 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2641 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/display_messages.php
src/left_main.php
src/right_main.php

index ec88fb69ce592f15226f248c3ba6a4beaeb722fa..2fe6bd4a6a14dd4d0358fea35cc08acc7a498cda 100644 (file)
 
 function error_username_password_incorrect() {
     global $frame_top, $color;
+    /* XXX: Should really not start the HTML before this, or close off more
+       cleanly. */
 
     if (!isset($frame_top)) {
         $frame_top = '_top';
     }
 
     echo '<BR>'.
-                '<TABLE COLS=1 WIDTH="75%" NOBORDER BGCOLOR="' . $color[4] . '" ALIGN=CENTER>'.
+                '<TABLE COLS=1 WIDTH="75%" BORDER="0" BGCOLOR="' . $color[4] . '" ALIGN=CENTER>'.
                 '<TR BGCOLOR="' . $color[0] . '">'.
                     '<TH>' . _("ERROR") . '</TH>'.
                 '</TR>' .
@@ -37,15 +39,15 @@ function error_username_password_incorrect() {
 function general_info($motd, $org_logo, $version, $org_name, $color) {
 
     echo '<BR>'.
-         "<TABLE COLS=1 WIDTH=\"80%\" CELLSPACING=0 CELLPADDING=2 NOBORDER ALIGN=CENTER><TR><TD BGCOLOR=\"$color[9]\">".
-         '<TABLE COLS=1 WIDTH="100%" CELLSPACING=0 CELLPADDING=3 NOBORDER BGCOLOR="' .  $color[4] . '" ALIGN=CENTER>'.
+         "<TABLE COLS=1 WIDTH=\"80%\" CELLSPACING=0 CELLPADDING=2 BORDER=\"0\" ALIGN=CENTER><TR><TD BGCOLOR=\"$color[9]\">".
+         '<TABLE COLS=1 WIDTH="100%" CELLSPACING=0 CELLPADDING=3 BORDER="0" BGCOLOR="' .  $color[4] . '" ALIGN=CENTER>'.
             '<TR>' .
                "<TD BGCOLOR=\"$color[0]\">" .
                   '<B><CENTER>';
     printf (_("Welcome to %s's WebMail system"), $org_name);
     echo          '</CENTER></B>'.
             '<TR><TD BGCOLOR="' . $color[4] .  '">'.
-               '<TABLE COLS=2 WIDTH="90%" CELLSPACING=0 CELLPADDING=3 NOBORDER align="center">'.
+               '<TABLE COLS=2 WIDTH="90%" CELLSPACING=0 CELLPADDING=3 BORDER="0" align="center">'.
                   '<TR>'.
                      '<TD BGCOLOR="' . $color[4] .  '"><CENTER>';
     if ( strlen($org_logo) > 3 ) {
@@ -71,7 +73,7 @@ function error_message($message, $mailbox, $sort, $startMessage, $color) {
     $urlMailbox = urlencode($mailbox);
 
     echo '<BR>'.
-         "<TABLE COLS=1 WIDTH=\"70%\" NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
+         "<TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
             '<TR>'.
                "<TD BGCOLOR=\"$color[0]\">".
                   "<FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'.
@@ -87,7 +89,7 @@ function error_message($message, $mailbox, $sort, $startMessage, $color) {
 
 function plain_error_message($message, $color) {
     echo '<BR>'.
-         "<TABLE COLS=1 WIDTH=\"70%\" NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
+         "<TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
             '<TR>'.
                "<TD BGCOLOR=\"$color[0]\">".
                   "<FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'.
index 6090b935abd98a49f32ab8f9c2c32b85bcf8a16b..f1a58680ac2d4cbbb0d472b9b4242b819e1768d5 100644 (file)
@@ -341,8 +341,8 @@ for ($i = 0; $i < count($boxes); $i++) {
     }
 }
 
-sqimap_logout($imapConnection);
 do_hook('left_main_after');
+sqimap_logout($imapConnection);
 
 echo "</BODY></HTML>\n";
 
index 37be5905e9ab3105c9a636cfa4364ee263373256..0fd724bfd407a8a3c6501a1647b8d8efc3d636f8 100644 (file)
@@ -45,6 +45,8 @@ if( isset( $PG_SHOWNUM ) ) {
 
 if (isset($newsort) && $newsort != $sort) {
     setPref($data_dir, $username, 'sort', $newsort);
+    $sort = $newsort;
+    session_register('sort');
 }
 
 /* If the page has been loaded without a specific mailbox, */
@@ -63,11 +65,11 @@ if ($imap_server_type == 'uw' && (strstr($mailbox, '../') ||
                                   substr($mailbox, 0, 1) == '/')) {
    $mailbox = 'INBOX';
 }
-    global $color;
+global $color;
 
-    if( isset($do_hook) && $do_hook ) {
-        do_hook ("generic_header");
-    }
+if( isset($do_hook) && $do_hook ) {
+    do_hook ("generic_header");
+}
 
 sqimap_mailbox_select($imapConnection, $mailbox);
 
@@ -109,11 +111,6 @@ if ($just_logged_in == true) {
     }
 }
 
-if (isset($newsort)) {
-    $sort = $newsort;
-    session_register('sort');
-}
-
 /*********************************************************************
  * Check to see if we can use cache or not. Currently the only time  *
  * when you will not use it is when a link on the left hand frame is *