In order to make sent_subfolders work I had to change a lot of code.
[squirrelmail.git] / src / read_body.php
index 380c5fcb8532c78bb707a5afd4769652e3204d33..5ae9b032c3ac71df3ff8fdf2e439d8c2bf214727 100644 (file)
@@ -416,17 +416,28 @@ if (isset ($message->header->bcc[0]) && trim($message->header->bcc[0])){
 }
 
 if ($default_use_priority) {
-    switch(substr($message->header->priority,0,1)) {
-        /* First, check for a higher then normal priority. */
-        case "1":
-        case "2": $priority_string = _("High"); break;
-
-        /* Second, check for a normal priority. */
-        case "3": $priority_string = _("Normal"); break;
-
-        /* Last, check for a lower then normal priority. */
-        case "4":
-        case "5": $priority_string = _("Low"); break;
+    $priority_level = substr($message->header->priority,0,1);
+
+    switch($priority_level) {
+        /* check for a higher then normal priority. */
+        case '1':
+        case '2': 
+            $priority_string = _("High"); 
+            break;
+
+        /* check for a lower then normal priority. */
+        case '4':
+        case '5': 
+            $priority_string = _("Low"); 
+            break;
+            
+        /* check for a normal priority. */
+        case '3': 
+        default:
+            $priority_level = '3';
+            $priority_string = _("Normal"); 
+            break;
+            
     }
 }
 
@@ -498,13 +509,19 @@ if ( !($where && $what) ) {
 echo '               </SMALL>' . "\n" .
     '            </TD><TD WIDTH="33%" ALIGN="RIGHT">' .
     '               <SMALL>' .
-    '               <A HREF="' . $base_uri . "src/compose.php?forward_id=$passed_id&forward_subj=$url_subj&mailbox=$urlMailbox&ent_num=$ent_num\">" .
+    '               <A HREF="' . $base_uri . "src/compose.php?forward_id=$passed_id&forward_subj=$url_subj&".
+                    (isset($default_use_priority)?"mailprio=$priority_level&":"")
+                    ."mailbox=$urlMailbox&ent_num=$ent_num\">" .
     _("Forward") .
     '</A>&nbsp;|&nbsp;' .
-    '               <A HREF="' . $base_uri . "src/compose.php?send_to=$url_replyto&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">" .
+    '               <A HREF="' . $base_uri . "src/compose.php?send_to=$url_replyto&reply_subj=$url_subj&".
+                    (isset($default_use_priority)?"mailprio=$priority_level&":"").
+                    "reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">" .
     _("Reply") .
     '</A>&nbsp;|&nbsp;' .
-    '               <A HREF="' . $base_uri . "src/compose.php?send_to=$url_replytoall&send_to_cc=$url_replytoallcc&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">" .
+    '               <A HREF="' . $base_uri . "src/compose.php?send_to=$url_replytoall&send_to_cc=$url_replytoallcc&reply_subj=$url_subj&".
+                    (isset($default_use_priority)?"mailprio=$priority_level&":"").
+                    "reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">" .
     _("Reply All") .
     '</A>&nbsp;&nbsp;' .
     '               </SMALL>' .
@@ -661,4 +678,4 @@ do_hook('html_bottom');
 sqimap_logout($imapConnection);
 ?>
 </body>
-</html>
\ No newline at end of file
+</html>