Changeset 5037 for trunk/mobile/inc/class.ui_mobilemail.inc.php
- Timestamp:
- 09/05/11 17:12:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mobile/inc/class.ui_mobilemail.inc.php
r4354 r5037 689 689 function new_msg($params) 690 690 { 691 $flagImportant = intval($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']); 691 692 $this->template->set_file(array('new_msg_t' => 'new_msg.tpl')); 692 693 $this->template->set_block('new_msg_t', 'page'); … … 702 703 $this->template->set_var('lang_cc', lang("cc")); 703 704 $this->template->set_var('lang_subject', lang("Subject")); 705 $this->template->set_var('visible_important', ( ($flagImportant == 1 ) ? "block" : "none" ) ); 704 706 $this->template->set_var('lang_mark_as_important', lang("mark as important")); 705 707 $this->template->set_var('lang_read_confirmation', lang("read confirmation")); … … 708 710 $this->template->set_var("show_check_add_history","none"); 709 711 710 if(isset($params["error_message"])) { 712 if(isset($params["error_message"])) 713 { 711 714 $this->template->set_var('input_to', $_POST['input_to']); 712 715 $this->template->set_var('input_cc', $_POST['input_cc']); … … 723 726 724 727 $GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]); 725 } else { 726 if (isset($params['msg_number'])) $msg = $this->imap_functions->get_info_msg(array('msg_number' => $params['msg_number'], 'msg_folder' => $params['msg_folder'] ) ); 727 728 } 729 else 730 { 731 if (isset($params['msg_number']) ) 732 { 733 $msg = $this->imap_functions->get_info_msg(array('msg_number' => $params['msg_number'], 'msg_folder' => $params['msg_folder'] ) ); 734 } 728 735 729 736 if($params['type']=="clk") … … 790 797 $this->template->set_var("show_forward_attachment","block"); 791 798 $this->template->set_block("new_msg_t","forward_attach_block"); 792 foreach($msg['attachments'] as $forward_attach) { 799 foreach($msg['attachments'] as $forward_attach) 800 { 793 801 $value = rawurlencode(serialize(array(0=>$msg['msg_folder'], 794 802 1=>$msg['msg_number'], … … 802 810 } 803 811 } 804 else if($params['type']=="use_draft"){ 812 else if($params['type']=="use_draft") 813 { 805 814 $this->template->set_var('input_to', $msg['toaddress2']); 806 815 $this->template->set_var('input_cc', $msg['cc']); … … 918 927 if($isImportant) $mail->isImportant(); 919 928 //add history 920 if($addHistory && $msgNumber) { 929 if($addHistory && $msgNumber) 930 { 921 931 $msg = $this->imap_functions->get_info_msg(array('msg_number' => $msgNumber ) ); 922 $mail->Body .= "<br />".$msg['body']."<br />"; 932 933 $_name = ( isset($msg['from']['name']) ) ? $msg['from']['name'] : ""; 934 $_email = ( isset($msg['from']['email']) ) ? " ".$msg['from']['email']." " : ""; 935 936 $history_msg = "<br/><br/><br/>"; 937 $history_msg .= lang('At %1, %2 hours, %3 wrote:', $msg['msg_day'], $msg['msg_hour'],"\"".$_name."\"".$_email ); 938 $history_msg .= "<br/>"; 939 940 $mail->Body .= "<br/>". $history_msg . $msg['body']."<br/>"; 923 941 } 924 942 //read confirmation … … 974 992 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&error_message=".lang("please select one e-mail")); 975 993 } else { 976 $params_messages = array( 977 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 978 'folder' => $this->folders[$this->current_folder]['folder_name'], 979 'new_folder_name' => 'Trash', 980 'new_folder' => 'INBOX/Trash' 981 ); 994 $msg = ""; 995 996 if($params["msg_folder"] == "INBOX/Trash") { 997 $params_messages = array( 998 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 999 'folder' => 'INBOX/Trash' 1000 ); 982 1001 983 $this->imap_functions->move_messages($params_messages); 984 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message=".lang("The messages were moved to trash").'&ignore_trace_url=true'); 1002 $this->imap_functions->delete_msgs($params_messages); 1003 1004 $msg = lang("The messages were deleted"); 1005 } else { 1006 $params_messages = array( 1007 'msgs_number' => isset($params['msgs'])?implode(",",$params['msgs']):$params['msg_number'], 1008 'folder' => $this->folders[$this->current_folder]['folder_name'], 1009 'new_folder_name' => 'Trash', 1010 'new_folder' => 'INBOX/Trash' 1011 ); 1012 1013 $this->imap_functions->move_messages($params_messages); 1014 1015 $msg = lang("The messages were moved to trash"); 1016 } 1017 1018 header("Location: index.php?menuaction=mobile.ui_mobilemail.index&success_message=".$msg.'&ignore_trace_url=true'); 985 1019 } 986 1020 }
Note: See TracChangeset
for help on using the changeset viewer.