moved address-parsing to the displayable headers
[squirrelmail.git] / src / left_main.php
index af7b5a4fd2c930ed477c61f8b611803bd1f45a9e..c72f89dcaa3d2021f7a8aa8e6056f1f83df1c720 100644 (file)
@@ -287,7 +287,7 @@ function listBoxes ($boxes, $j=0 ) {
        $mailbox = $boxes->mailboxname_full;
        $leader = '';
        for ($k = 0; $k < $j; $k++) {
-           $leader.= '&nbsp&nbsp&nbsp';
+           $leader.= '&nbsp;&nbsp;&nbsp;';
        }
        $mailboxURL = urlencode($mailbox);
 
@@ -310,14 +310,14 @@ function listBoxes ($boxes, $j=0 ) {
 
            $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
            if ($collapse) {
-               $link .= "unfold=$mailboxURL\">$leader +&nbsp";
+               $link .= "unfold=$mailboxURL\">$leader +&nbsp;";
            } else {
-               $link .= "fold=$mailboxURL\">$leader -&nbsp";
+               $link .= "fold=$mailboxURL\">$leader -&nbsp;";
            }
            $link .= '</a>';
            $pre .= $link;
        } else {
-           $pre.= $leader . '&nbsp&nbsp&nbsp';
+           $pre.= $leader . '&nbsp;&nbsp;&nbsp;';
        }
 
 
@@ -504,17 +504,16 @@ function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
 
 /* -------------------- MAIN ------------------------ */
 
-$key = $_COOKIE['key'];
-$onetimepad = $_SESSION['onetimepad'];
-$username = $_SESSION['username'];
-$delimiter = $_SESSION['delimiter'];
+/* get globals */
+sqgetGlobalVar('username', $username, SQ_SESSION);
+sqgetGlobalVar('key', $key, SQ_COOKIE);
+sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
+sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
 
-if (isset($_GET['fold'])) {
-    $fold = $_GET['fold'];
-}
-if (isset($_GET['unfold'])) {
-    $unfold = $_GET['unfold'];
-}
+sqgetGlobalVar('fold', $fold, SQ_GET);
+sqgetGlobalVar('unfold', $unfold, SQ_GET);
+
+/* end globals */
 
 // open a connection on the imap port (143)
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output