Clear out tabs for proper spaces
authorsimond <simond@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 2 Mar 2002 20:31:04 +0000 (20:31 +0000)
committersimond <simond@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 2 Mar 2002 20:31:04 +0000 (20:31 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2536 7612ce4b-ef26-0410-bec9-ea0150e637f0

15 files changed:
functions/imap_general.php
functions/imap_mailbox.php
functions/imap_search.php
functions/mailbox_display.php
functions/mime.php
functions/options.php
functions/page_header.php
functions/smtp.php
functions/strings.php
functions/url_parser.php
src/addrbook_search.php
src/folders.php
src/options.php
src/options_personal.php
src/read_body.php

index 4008855708bcc10807f54b359d4fb229a0ed795c..7c17736baa36a7b49232d291b895f1ece8b0f13b 100755 (executable)
@@ -19,7 +19,7 @@ require_once('../functions/display_messages.php');
  *
  * Sets an unique session id in order to avoid simultanous sessions crash.
  *
- * @return     string  a 4 chars unique string
+ * @return  string  a 4 chars unique string
  */
 
 global $sqimap_session_id;
index 440fc7f5c89865ae90d368b1f4a1bd9b7549b03b..d616862900a2d6ec0eeda38f84b7649db1fe4d8e 100755 (executable)
@@ -385,145 +385,145 @@ function user_strcasecmp($a, $b) {
  ******************************************************************************/
 function sqimap_mailbox_list($imap_stream) {
 
-       GLOBAL $boxesnew;
-
-       if ( !isset( $boxesnew ) ) {
-
-           GLOBAL $data_dir, $username, $list_special_folders_first,
-                  $folder_prefix, $trash_folder, $sent_folder, $draft_folder,
-                  $move_to_trash, $move_to_sent, $save_as_draft,
-                  $delimiter;
-       
-           $inbox_in_list = $inbox_subscribed = FALSE;
-       
-           require_once('../src/load_prefs.php');
-           require_once('../functions/array.php');
-       
-           /** LSUB array **/
-           $lsub_ary = sqimap_run_command ($imap_stream, "LSUB \"$folder_prefix\" \"*\"",
-                                         TRUE, $response, $message);
-       
-           /* Section about removing the last element was removed */
-           /* We don't return "* OK" anymore from sqimap_read_data */
-       
-           $sorted_lsub_ary = array();
-           for ($i=0;$i < count($lsub_ary); $i++) {
-               /* Workaround for EIMS */
-               /* Doesn't work if the mailbox name is multiple lines */
-               if (isset($lsub_ary[$i + 1]) &&
-                   ereg("^(\\* [A-Z]+.*)\\{[0-9]+\\}([ \n\r\t]*)$",
-                        $lsub_ary[$i], $regs)) {
-                   $i ++;
-                   $lsub_ary[$i] = $regs[1] . '"' . addslashes(trim($lsub_ary[$i])) .
-                       '"' . $regs[2];
-               }
-               $temp_mailbox_name = find_mailbox_name($lsub_ary[$i]);
-               $sorted_lsub_ary[] = $temp_mailbox_name;
-               if (strtoupper($temp_mailbox_name) == 'INBOX') {
-                   $inbox_subscribed = TRUE;
-               }
-           }
-           $new_ary = array();
-           for ($i=0; $i < count($sorted_lsub_ary); $i++) {
-               if (!in_array($sorted_lsub_ary[$i], $new_ary)) {
-                   $new_ary[] = $sorted_lsub_ary[$i];
-               }
-           }
-           $sorted_lsub_ary = $new_ary;
-           if (isset($sorted_lsub_ary)) {
-               usort($sorted_lsub_ary, 'user_strcasecmp');
-           }
-       
-           /** LIST array **/
-           $sorted_list_ary = array();
-           for ($i=0; $i < count($sorted_lsub_ary); $i++) {
-               if (substr($sorted_lsub_ary[$i], -1) == $delimiter) {
-                   $mbx = substr($sorted_lsub_ary[$i], 0, strlen($sorted_lsub_ary[$i])-1);
-               }
-               else {
-                   $mbx = $sorted_lsub_ary[$i];
-               }
-       
-               $read = sqimap_run_command ($imap_stream, "LIST \"\" \"$mbx\"",
-                                         TRUE, $response, $message);
-               /* Another workaround for EIMS */
-               if (isset($read[1]) &&
-                   ereg("^(\\* [A-Z]+.*)\\{[0-9]+\\}([ \n\r\t]*)$",
-                        $read[0], $regs)) {
-                   $read[0] = $regs[1] . '"' . addslashes(trim($read[1])) .
-                              '"' . $regs[2];
-               }
-       
-               if (isset($sorted_list_ary[$i])) {
-                   $sorted_list_ary[$i] = '';
-               }
-       
-               if (isset($read[0])) {
-                   $sorted_list_ary[$i] = $read[0];
-               }
-               else {
-                   $sorted_list_ary[$i] = '';
-               }
-       
-               if (isset($sorted_list_ary[$i]) &&
-                   strtoupper(find_mailbox_name($sorted_list_ary[$i])) == 'INBOX') {
-                   $inbox_in_list = TRUE;
-               }
-           }
-       
-           /**
-            * Just in case they're not subscribed to their inbox,
-            * we'll get it for them anyway
-            */
-           if ($inbox_subscribed == false || $inbox_in_list == false) {
-               $inbox_ary = sqimap_run_command ($imap_stream, "LIST \"\" \"INBOX\"",
-                                              TRUE, $response, $message);
-               /* Another workaround for EIMS */
-               if (isset($inbox_ary[1]) &&
-                   ereg("^(\\* [A-Z]+.*)\\{[0-9]+\\}([ \n\r\t]*)$",
-                        $inbox_ary[0], $regs)) {
-                   $inbox_ary[0] = $regs[1] . '"' . addslashes(trim($inbox_ary[1])) .
-                       '"' . $regs[2];
-               }
-       
-               $sorted_list_ary[] = $inbox_ary[0];
-               $sorted_lsub_ary[] = find_mailbox_name($inbox_ary[0]);
-           }
-       
-           $boxesall = sqimap_mailbox_parse ($sorted_list_ary, $sorted_lsub_ary);
-       
-           /** Now, lets sort for special folders **/
-           $boxesnew = $used = array();
-       
-           /* Find INBOX */
-           foreach ( $boxesall as $k => $box ) {
-               if ( strtolower($box['unformatted']) == 'inbox') {
-                   $boxesnew[] = $box;
-                   $used[$k] = TRUE;
-               } else {
-                   $used[$k] = FALSE;
-               }
-           }
-       
-           /* List special folders and their subfolders, if requested. */
-           if ($list_special_folders_first == TRUE) {
-       
-               foreach ( $boxesall as $k => $box ) {
-                   if ( !$used[$k] &&
-                        isSpecialMailbox( $box['unformatted'] ) ) {
-                       $boxesnew[] = $box;
-                       $used[$k] = TRUE;
-                   }
-               }
-       
-           }
-       
-           /* Rest of the folders */
-           foreach ( $boxesall as $k => $box ) {
-               if ( !$used[$k] ) {
-                   $boxesnew[] = $box;
-               }
-           }
+    GLOBAL $boxesnew;
+
+    if ( !isset( $boxesnew ) ) {
+
+        GLOBAL $data_dir, $username, $list_special_folders_first,
+               $folder_prefix, $trash_folder, $sent_folder, $draft_folder,
+               $move_to_trash, $move_to_sent, $save_as_draft,
+               $delimiter;
+
+        $inbox_in_list = $inbox_subscribed = FALSE;
+
+        require_once('../src/load_prefs.php');
+        require_once('../functions/array.php');
+
+        /** LSUB array **/
+        $lsub_ary = sqimap_run_command ($imap_stream, "LSUB \"$folder_prefix\" \"*\"",
+                                      TRUE, $response, $message);
+
+        /* Section about removing the last element was removed */
+        /* We don't return "* OK" anymore from sqimap_read_data */
+
+        $sorted_lsub_ary = array();
+        for ($i=0;$i < count($lsub_ary); $i++) {
+            /* Workaround for EIMS */
+            /* Doesn't work if the mailbox name is multiple lines */
+            if (isset($lsub_ary[$i + 1]) &&
+                ereg("^(\\* [A-Z]+.*)\\{[0-9]+\\}([ \n\r\t]*)$",
+                     $lsub_ary[$i], $regs)) {
+                $i ++;
+                $lsub_ary[$i] = $regs[1] . '"' . addslashes(trim($lsub_ary[$i])) .
+                    '"' . $regs[2];
+            }
+            $temp_mailbox_name = find_mailbox_name($lsub_ary[$i]);
+            $sorted_lsub_ary[] = $temp_mailbox_name;
+            if (strtoupper($temp_mailbox_name) == 'INBOX') {
+                $inbox_subscribed = TRUE;
+            }
+        }
+        $new_ary = array();
+        for ($i=0; $i < count($sorted_lsub_ary); $i++) {
+            if (!in_array($sorted_lsub_ary[$i], $new_ary)) {
+                $new_ary[] = $sorted_lsub_ary[$i];
+            }
+        }
+        $sorted_lsub_ary = $new_ary;
+        if (isset($sorted_lsub_ary)) {
+            usort($sorted_lsub_ary, 'user_strcasecmp');
+        }
+
+        /** LIST array **/
+        $sorted_list_ary = array();
+        for ($i=0; $i < count($sorted_lsub_ary); $i++) {
+            if (substr($sorted_lsub_ary[$i], -1) == $delimiter) {
+                $mbx = substr($sorted_lsub_ary[$i], 0, strlen($sorted_lsub_ary[$i])-1);
+            }
+            else {
+                $mbx = $sorted_lsub_ary[$i];
+            }
+
+            $read = sqimap_run_command ($imap_stream, "LIST \"\" \"$mbx\"",
+                                      TRUE, $response, $message);
+            /* Another workaround for EIMS */
+            if (isset($read[1]) &&
+                ereg("^(\\* [A-Z]+.*)\\{[0-9]+\\}([ \n\r\t]*)$",
+                     $read[0], $regs)) {
+                $read[0] = $regs[1] . '"' . addslashes(trim($read[1])) .
+                           '"' . $regs[2];
+            }
+
+            if (isset($sorted_list_ary[$i])) {
+                $sorted_list_ary[$i] = '';
+            }
+
+            if (isset($read[0])) {
+                $sorted_list_ary[$i] = $read[0];
+            }
+            else {
+                $sorted_list_ary[$i] = '';
+            }
+
+            if (isset($sorted_list_ary[$i]) &&
+                strtoupper(find_mailbox_name($sorted_list_ary[$i])) == 'INBOX') {
+                $inbox_in_list = TRUE;
+            }
+        }
+
+        /**
+         * Just in case they're not subscribed to their inbox,
+         * we'll get it for them anyway
+         */
+        if ($inbox_subscribed == false || $inbox_in_list == false) {
+            $inbox_ary = sqimap_run_command ($imap_stream, "LIST \"\" \"INBOX\"",
+                                           TRUE, $response, $message);
+            /* Another workaround for EIMS */
+            if (isset($inbox_ary[1]) &&
+                ereg("^(\\* [A-Z]+.*)\\{[0-9]+\\}([ \n\r\t]*)$",
+                     $inbox_ary[0], $regs)) {
+                $inbox_ary[0] = $regs[1] . '"' . addslashes(trim($inbox_ary[1])) .
+                    '"' . $regs[2];
+            }
+
+            $sorted_list_ary[] = $inbox_ary[0];
+            $sorted_lsub_ary[] = find_mailbox_name($inbox_ary[0]);
+        }
+
+        $boxesall = sqimap_mailbox_parse ($sorted_list_ary, $sorted_lsub_ary);
+
+        /** Now, lets sort for special folders **/
+        $boxesnew = $used = array();
+
+        /* Find INBOX */
+        foreach ( $boxesall as $k => $box ) {
+            if ( strtolower($box['unformatted']) == 'inbox') {
+                $boxesnew[] = $box;
+                $used[$k] = TRUE;
+            } else {
+                $used[$k] = FALSE;
+            }
+        }
+
+        /* List special folders and their subfolders, if requested. */
+        if ($list_special_folders_first == TRUE) {
+
+            foreach ( $boxesall as $k => $box ) {
+                if ( !$used[$k] &&
+                     isSpecialMailbox( $box['unformatted'] ) ) {
+                    $boxesnew[] = $box;
+                    $used[$k] = TRUE;
+                }
+            }
+
+        }
+
+        /* Rest of the folders */
+        foreach ( $boxesall as $k => $box ) {
+            if ( !$used[$k] ) {
+                $boxesnew[] = $box;
+            }
+        }
     }
 
     return( $boxesnew );
index 4a1151c9a419b91b6fb59a3020063d46303dd3c7..d88df8565acccafcadcece84d60b3fd934849d5c 100644 (file)
@@ -42,7 +42,7 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo
             $search_string = '';
     $count = count($multi_search);
             for ($x=0;$x<$count;$x++) {
-                       trim($multi_search[$x]);
+                trim($multi_search[$x]);
                 $search_string = $search_string . ' ' . $search_where . ' "' . $multi_search[$x] . '"';
             }
     }
index 3478025d640362c2c65b1746132603c777705296..fbd7df99e5bc920d5bd89b3840fa12da42f91453 100644 (file)
@@ -642,7 +642,7 @@ function get_selectall_link($start_msg, $sort) {
             $result .= "<a href=\"$PHP_SELF&amp;mailbox=" . urlencode($mailbox)
                     . "&amp;startMessage=$start_msg&amp;sort=$sort&amp;checkall=";
         }
-               else {
+        else {
             $result .= "<a href=\"$PHP_SELF?mailbox=" . urlencode($mailbox)
                     . "&amp;startMessage=$start_msg&amp;sort=$sort&amp;checkall=";
         }
index a2fd647dfe73a7ed8142e8e82d6d8ef002f0fb89..0a7326c491a9cbd2ca5db47d95df84aa3764cb26 100644 (file)
@@ -420,7 +420,7 @@ function mime_fetch_body($imap_stream, $id, $ent_id ) {
 *            if ( $base <> '' ) {
 *                $ret = "<base href=\"$base\">" . $ret;
 *            }
-*          */
+*           */
         }
     } else if (ereg('"([^"]*)"', $topline, $regs)) {
         $ret = $regs[1];
@@ -609,22 +609,22 @@ function formatBody($imap_stream, $message, $color, $wrap_at) {
            $show_html_default, $has_unsafe_images, $view_unsafe_images, $sort;
 
     $has_unsafe_images = 0;
-    
+
     $id = $message->header->id;
     $urlmailbox = urlencode($message->header->mailbox);
-    
+
     // Get the right entity and redefine message to be this entity
     // Pass the 0 to mean that we want the 'best' viewable one
     $ent_num = findDisplayEntity ($message, 0);
     $body_message = getEntity($message, $ent_num);
     if (($body_message->header->type0 == 'text') ||
         ($body_message->header->type0 == 'rfc822')) {
-    
+
         $body = mime_fetch_body ($imap_stream, $id, $ent_num);
         $body = decodeBody($body, $body_message->header->encoding);
         $hookResults = do_hook("message_body", $body);
         $body = $hookResults[1];
-        
+
         // If there are other types that shouldn't be formatted, add
         // them here
         if ($body_message->header->type1 == 'html') {
@@ -639,13 +639,13 @@ function formatBody($imap_stream, $message, $color, $wrap_at) {
         }
 
         $body .= "<CENTER><SMALL><A HREF=\"../src/download.php?absolute_dl=true&amp;passed_id=$id&amp;passed_ent_id=$ent_num&amp;mailbox=$urlmailbox&amp;showHeaders=1\">". _("Download this as a file") ."</A></SMALL></CENTER><BR>";
-       if ($has_unsafe_images) {
-           if ($view_unsafe_images) {
+        if ($has_unsafe_images) {
+            if ($view_unsafe_images) {
                 $body .= "<CENTER><SMALL><A HREF=\"read_body.php?passed_id=$id&amp;mailbox=$urlmailbox&amp;sort=$sort&amp;startMessage=$startMessage&amp;show_more=0\">". _("Hide Unsafe Images") ."</A></SMALL></CENTER><BR>\n";
             } else {
                 $body .= "<CENTER><SMALL><A HREF=\"read_body.php?passed_id=$id&amp;mailbox=$urlmailbox&amp;sort=$sort&amp;startMessage=$startMessage&amp;show_more=0&amp;view_unsafe_images=1\">". _("View Unsafe Images") ."</A></SMALL></CENTER><BR>\n";
             }
-       }
+        }
 
         /** Display the ATTACHMENTS: message if there's more than one part **/
         if (isset($message->entities[0])) {
@@ -1090,11 +1090,11 @@ function MagicHTML( $body, $id ) {
 
 return( "\n\n<!-- HTML Output ahead -->\n" .
         $ret .
-       /* Base is illegal within HTML
+        /* Base is illegal within HTML
         "\n<!-- END of HTML Output --><base href=\"".
         get_location() . '/'.
         "\">\n\n" );
-       */
+        */
         "\n<!-- END of HTML Output -->\n\n" );
 }
 
@@ -1199,14 +1199,14 @@ function stripEvent( &$i, $j, &$body, $id, $base ) {
                     $src = substr( $src, 4 );
                     $src = "../src/download.php?absolute_dl=true&amp;passed_id=$id&amp;mailbox=" .
                            urlencode( $message->header->mailbox ) .
-                           "&amp;passed_ent_id=" . find_ent_id( $src, $message );                       
-                } else if ( strtolower( substr( $src, 0, 4 ) ) <> 'http' || 
+                           "&amp;passed_ent_id=" . find_ent_id( $src, $message );
+                } else if ( strtolower( substr( $src, 0, 4 ) ) <> 'http' ||
                             stristr( $src, $base_uri ) ) {
                     /* Javascript and local urls goes out */
-                   if (!$view_unsafe_images) {
+                    if (!$view_unsafe_images) {
                         $src = '../images/' . _("sec_remove_eng.png");
-                   }
-                   $has_unsafe_images = 1;
+                    }
+                    $has_unsafe_images = 1;
                 }
                 $ret .= 'src="' . $src . '" ';
                 $i = $k - 2;
index 834ef3a1272ca39a72df2f58de3de0ca52c866a0..0137114c74023db4f98de46ff78893bb7a46e2aa 100644 (file)
@@ -389,10 +389,10 @@ function print_option_groups($option_groups) {
         if ($next_optgrp['name'] != '') {
             echo '<TR><TD ALIGN=CENTER VALIGN=MIDDLE COLSPAN=2 NOWRAP><B>'
                .   $next_optgrp['name']
-              . "</B></TD></TR>\n";
-       }
-       
-       /* Print each option in this option group. */
+               . "</B></TD></TR>\n";
+        }
+
+        /* Print each option in this option group. */
         foreach ($next_optgrp['options'] as $option) {
             if ($option->type != SMOPT_TYPE_HIDDEN) {
                 echo "<TR>\n";
@@ -404,8 +404,8 @@ function print_option_groups($option_groups) {
                 echo $option->createHTMLWidget();
             }
         }
-       
-       /* Print an empty row after this option group. */
+
+        /* Print an empty row after this option group. */
         echo "<TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
     }
 }
index b1bcd781069d9044bbe572388b1dedd50a2f3f6b..8c39837c22dbfe05d58b89155855fd0892d714c0 100644 (file)
@@ -104,7 +104,7 @@ function displayPageHeader($color, $mailbox) {
                      "}\n";
             }
         $js .= "// -->\n".
-                "</script>\n";
+               "</script>\n";
         $onload = "onLoad=\"checkForm();\"";
         displayHtmlHeader ('Squirrelmail', $js);
         break;   
@@ -207,7 +207,7 @@ function compose_Header($color, $mailbox) {
                 "}\n".
             "}\n";
         $js .= "// -->\n".
-                "</script>\n";
+               "</script>\n";
         $onload = "onLoad=\"checkForm();\"";
         displayHtmlHeader (_("Compose"), $js);
         break;   
index 6bf4527636a267d8f76110129a8d035210b3ab92..e8cd59351282b04e2d3a0e8ef66897cef6a57b53 100644 (file)
@@ -293,72 +293,72 @@ function write822Header ($fp, $t, $c, $b, $subject, $more_headers) {
                 $HTTP_X_FORWARDED_FOR = 'unknown';
             }
             $received_from .= " (proxying for $HTTP_X_FORWARDED_FOR)";
-        }            
-        
+        }
+
         $header  = "Received: from $received_from\r\n";
         $header .= "        (SquirrelMail authenticated user $username)\r\n";
         $header .= "        by $SERVER_NAME with HTTP;\r\n";
         $header .= "        $date\r\n";
-        
+
         /* Insert the rest of the header fields */
         $header .= "Message-ID: $message_id\r\n";
         $header .= "Date: $date\r\n";
         $header .= "Subject: $subject\r\n";
         $header .= "From: $from\r\n";
         $header .= "To: $to_list\r\n";    // Who it's TO
-        
+
         if (isset($more_headers["Content-Type"])) {
-         $contentType = $more_headers["Content-Type"];
-         unset($more_headers["Content-Type"]);
-       }
+            $contentType = $more_headers["Content-Type"];
+            unset($more_headers["Content-Type"]);
+        }
         else {
-         if (isMultipart()) {
-           $contentType = "multipart/mixed;";
-         }
-         else {
-           if ($default_charset != '') {
-                $contentType = 'text/plain; charset='.$default_charset;
+            if (isMultipart()) {
+                $contentType = "multipart/mixed;";
             }
             else {
-                $contentType = 'text/plain;';
-            } 
-         }
+                if ($default_charset != '') {
+                    $contentType = 'text/plain; charset='.$default_charset;
+                }
+                else {
+                    $contentType = 'text/plain;';
+                }
+            }
         }
-            
-       /* Insert headers from the $more_headers array */
-       if(is_array($more_headers)) {
+
+        /* Insert headers from the $more_headers array */
+        if(is_array($more_headers)) {
             reset($more_headers);
             while(list($h_name, $h_val) = each($more_headers)) {
                 $header .= sprintf("%s: %s\r\n", $h_name, $h_val);
             }
         }
-        
+
         if ($cc_list) {
             $header .= "Cc: $cc_list\r\n"; // Who the CCs are
         }
-        
+
         if ($reply_to != '') {
             $header .= "Reply-To: $reply_to\r\n";
         }
-        
+
         if ($useSendmail) {
             if ($bcc_list) {
                 // BCCs is removed from header by sendmail
-                $header .= "Bcc: $bcc_list\r\n"; 
+                $header .= "Bcc: $bcc_list\r\n";
             }
         }
-        
+
         $header .= "X-Mailer: SquirrelMail (version $version)\r\n"; /* Identify SquirrelMail */
 
         /* Do the MIME-stuff */
         $header .= "MIME-Version: 1.0\r\n";
-        
+
         if (isMultipart()) {
             $header .= 'Content-Type: '.$contentType.' boundary="';
             $header .= mimeBoundary();
             $header .= "\"\r\n";
         } else {
-           $header .= 'Content-Type: '.$contentType."\r\n";
+            $header .= 'Content-Type: '.$contentType."\r\n";
             $header .= "Content-Transfer-Encoding: 8bit\r\n";
         }
         $header .= "\r\n"; // One blank line to separate header and body
@@ -406,7 +406,7 @@ function writeBody ($fp, $passedBody) {
         $postbody = "\r\n";
         fputs ($fp, $postbody);
     }
-    
+
     return (strlen($body) + strlen($postbody) + $attachmentlength);
 }
 
@@ -658,13 +658,13 @@ function errorCheck($line, $smtpConnection, $verbose = false) {
         $error_num = '001';
         break;
     }
-    
+
     if ($status == 0) {
         include_once('../functions/page_header.php');
         if ($compose_new_win == '1') {
             compose_Header($color, 'None');
         }
-               else {
+        else {
             displayPageHeader($color, 'None');
         }
         include_once('../functions/display_messages.php');
index 219d806be8f6a225b4682b3a5bca0430bc9dff00..7d17332d9f98ff0150d9498bbbfc19a177b45a3b 100644 (file)
@@ -192,9 +192,9 @@ function getLineOfAddrs($array) {
 function translateText(&$body, $wrap_at, $charset) {
     global $where, $what; /* from searching */
     global $color; /* color theme */
-    
+
     require_once('../functions/url_parser.php');
-    
+
     $body_ary = explode("\n", $body);
     $PriorQuotes = 0;
     for ($i=0; $i < count($body_ary); $i++) {
@@ -209,7 +209,7 @@ function translateText(&$body, $wrap_at, $charset) {
 
         $Quotes = 0;
         $pos = 0;
-       $j = strlen( $line );
+        $j = strlen( $line );
 
         while ( $pos < $j ) {
             if ($line[$pos] == ' ') {
index f084a4304a91bfd6a3d2f70124c087c3bfa0a4e0..c1dbcf71d379cd4a4e98102883b4973e69eb28eb 100644 (file)
@@ -21,7 +21,7 @@ function replaceBlock (&$in, $replace, $start, $end) {
 /* Having this defined in just one spot could help when changes need
  * to be made to the pattern
  * Make sure that the expression is evaluated case insensitively
- * 
+ *
  * Here's pretty sophisticated IP matching:
  * $IPMatch = '(2[0-5][0-9]|1?[0-9]{1,2})';
  * $IPMatch = '\[?' . $IPMatch . '(\.' . $IPMatch . '){3}\]?';
@@ -29,40 +29,40 @@ function replaceBlock (&$in, $replace, $start, $end) {
 /* Here's enough: */
 global $IP_RegExp_Match, $Host_RegExp_Match, $Email_RegExp_Match;
 $IP_RegExp_Match = '\\[?[0-9]{1,3}(\\.[0-9]{1,3}){3}\\]?';
-$Host_RegExp_Match = '(' . $IP_RegExp_Match . 
+$Host_RegExp_Match = '(' . $IP_RegExp_Match .
     '|[0-9a-z]([-.]?[0-9a-z])*\\.[a-z][a-z]+)';
-$Email_RegExp_Match = '[0-9a-z]([-_.+]?[0-9a-z])*(%' . $Host_RegExp_Match . 
+$Email_RegExp_Match = '[0-9a-z]([-_.+]?[0-9a-z])*(%' . $Host_RegExp_Match .
     ')?@' . $Host_RegExp_Match;
-      
+
 function parseEmail (&$body) {
     global $color, $Email_RegExp_Match, $compose_new_win;
     $Size = strlen($body);
-      
+
     /*
      * This is here in case we ever decide to use highlighting of searched
      * text.  this does it for email addresses
-     *   
+     *
      * if ($what && ($where == "BODY" || $where == "TEXT")) {
      *    eregi ($Email_RegExp_Match, $body, $regs);
      *    $oldaddr = $regs[0];
      *    if ($oldaddr) {
      *       $newaddr = eregi_replace ($what, "<b><font color=\"$color[2]\">$what</font></font></b>", $oldaddr);
-     *       $body = str_replace ($oldaddr, "<a href=\"../src/compose.php?send_to=$oldaddr\">$newaddr</a>", $body); 
+     *       $body = str_replace ($oldaddr, "<a href=\"../src/compose.php?send_to=$oldaddr\">$newaddr</a>", $body);
      *    }
-     * } else { 
+     * } else {
      *    $body = eregi_replace ($Email_RegExp_Match, "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body);
      * }
      */
-     
+
     if( eregi($Email_RegExp_Match, $body, $regs) ) {
-               if ($compose_new_win == '1') {
-               $body = str_replace($regs[0],  '<a href="../src/compose.php?send_to='.urlencode($regs[0]).'" target="compose_window" onClick="comp_in_new()">'.$regs[0].'</a>', $body);
-               }
-               else {
-               $body = str_replace($regs[0],  '<a href="../src/compose.php?send_to='.
+        if ($compose_new_win == '1') {
+            $body = str_replace($regs[0],  '<a href="../src/compose.php?send_to='.urlencode($regs[0]).'" target="compose_window" onClick="comp_in_new()">'.$regs[0].'</a>', $body);
+        }
+        else {
+            $body = str_replace($regs[0],  '<a href="../src/compose.php?send_to='.
             urlencode($regs[0]).'">'.$regs[0].'</a>', $body);
-               }
-    } 
+        }
+    }
 
     /* If there are any changes, it'll just get bigger. */
     if ($Size != strlen($body)) {
index 7ac55f605d8fb3aa24ee633dc677507431557afc..8051122a078662e024720d27c9cc4c510559218e 100644 (file)
@@ -189,7 +189,7 @@ if ($show == 'form' && empty($listall)) {
     }
         
     echo '</TD></TR><TR><TD></TD><TD align=left>'.
-                                       '<INPUT TYPE=submit VALUE="' . _("Search") . '" NAME=show>' .
+         '<INPUT TYPE=submit VALUE="' . _("Search") . '" NAME=show>' .
          '&nbsp;|&nbsp;<INPUT TYPE=submit VALUE="' . _("List all") .
          '" NAME=listall>' . "\n" .
          '&nbsp;|&nbsp;<INPUT TYPE=button VALUE="' . _("Close") .
index 015a862cc21788beb64411a7279ea0f0fd62b6e1..f2589fb0e4203fdbbf2d3c24f726253c07c6a24d 100644 (file)
@@ -242,7 +242,7 @@ for ($i = 0, $q = 0; $i < count($boxes_all); $i++) {
             $use_folder = false;
         }
     }
-    if ($use_folder == true) { 
+    if ($use_folder == true) {
         $box[$q] = $boxes_all[$i]["unformatted-dm"];
         $box2[$q] = $boxes_all[$i]["unformatted-disp"];
         $q++;
index 76fab0e6f53619faef5f5107eab9d16a8f0cf876..3fd806955fb5aa5957cbced7c5b1e6c7c736fbd0 100644 (file)
@@ -212,7 +212,7 @@ echo '<BR>' .
 /*******************************************************************/
 
 /* If in submit mode, select a save hook name and run it. */
-if ($optmode == SMOPT_MODE_SUBMIT)      {
+if ($optmode == SMOPT_MODE_SUBMIT) {
     /* Select a save hook name. */
     switch ($optpage) {
         case SMOPT_PAGE_PERSONAL:
index bb7bedcc15ef3768d4fba0b0fc55e5e3ec41e8ea..a726e1cc375a0213ded729fbe67c6d751568eb29 100644 (file)
@@ -122,23 +122,23 @@ function load_optpage_data_personal() {
     while (!feof ($fd)) {
         $zone = fgets($fd, 1024);
         if( $zone ) {
-           $zone = trim($zone);
+            $zone = trim($zone);
             $TZ_ARRAY["$zone"] = "$zone";
         }
     }
     fclose ($fd);
-    
+
     $optgrps[SMOPT_GRP_TZ] = _("Timezone Options");
     $optvals[SMOPT_GRP_TZ] = array();
 
     $optvals[SMOPT_GRP_TZ][] = array(
         'name'    => 'timezone',
-       'caption' => _("Your current timezone"),
-       'type'    => SMOPT_TYPE_STRLIST,
-       'refresh' => SMOPT_REFRESH_NONE,
-       'posvals' => $TZ_ARRAY
+        'caption' => _("Your current timezone"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $TZ_ARRAY
     );
-                                                                                            
+
     /*** Load the Reply Citation Options into the array ***/
     $optgrps[SMOPT_GRP_REPLY] = _("Reply Citation Options");
     $optvals[SMOPT_GRP_REPLY] = array();
index 56563bab8f350ee6f5fd1dcf25c5f168a007b733..8691ec287933f6de449df0be8c23dbbd59655731 100644 (file)
@@ -315,7 +315,7 @@ if (isset($view_hdr)) {
         }
         parseEmail($s);
         if (isset($f)) {
-               echo "<nobr><tt><b>$f</b>$s</tt></nobr>";
+            echo "<nobr><tt><b>$f</b>$s</tt></nobr>";
         }
     }
     echo "</td></tr></table>\n" .
@@ -910,7 +910,7 @@ if ($default_use_mdn) {
             $sendreceipt = 'removeMDN';
             $url = "\"read_body.php?mailbox=$mailbox&amp;passed_id=$passed_id&amp;startMessage=$startMessage&amp;show_more=$show_more&amp;sendreceipt=$sendreceipt\"";
             $sendreceipt='';
-                       /*
+            /*
             if ($MDNDebug && $supportMDN) {
             echo "      <TR>\n" .
                     "         <TD BGCOLOR=\"$color[9]\"  ALIGN=RIGHT VALIGN=TOP>\n" .