Changeset 3726 in subversion
- Timestamp:
- Jun 8, 2010 8:46:05 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 9 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (2 diffs)
-
program/include/rcube_imap_generic.php (modified) (3 diffs)
-
program/include/rcube_message.php (modified) (2 diffs)
-
program/js/app.js (modified) (2 diffs)
-
program/steps/mail/func.inc (modified) (2 diffs)
-
program/steps/mail/headers.inc (modified) (1 diff)
-
program/steps/mail/show.inc (modified) (3 diffs)
-
skins/default/templates/messageerror.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r3717 r3726 2 2 =========================== 3 3 4 - Fix some IMAP errors handling when opening the message (#1485443) 4 5 - Fix related parts aren't displayed when got mimetype other than image/* (#1486432) 5 6 - Multiple identity and database support for squirrelmail_usercopy plugin (#1486517) -
trunk/roundcubemail/program/include/rcube_imap.php
r3718 r3726 2062 2062 2063 2063 // convert charset (if text or message part) 2064 if ($ o_part->ctype_primary == 'text' || $o_part->ctype_primary == 'message') {2064 if ($body && ($o_part->ctype_primary == 'text' || $o_part->ctype_primary == 'message')) { 2065 2065 // assume default if no charset specified 2066 2066 if (empty($o_part->charset) || strtolower($o_part->charset) == 'us-ascii') … … 2629 2629 $a_mboxes = $this->conn->listMailboxes($this->mod_mailbox($root), $filter); 2630 2630 } 2631 2631 2632 2632 $a_folders = array(); 2633 2633 if (!is_array($a_mboxes)) -
trunk/roundcubemail/program/include/rcube_imap_generic.php
r3725 r3726 1778 1778 } 1779 1779 1780 // format request 1780 1781 $reply_key = '* ' . $id; 1781 $result = false; 1782 1783 // format request 1784 $key = 'ftch0'; 1785 $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id (BODY.PEEK[$part])"; 1782 $key = 'ftch0'; 1783 $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id (BODY.PEEK[$part])"; 1784 1786 1785 // send request 1787 1786 if (!$this->putLine($request)) { … … 1795 1794 } while (!($end = $this->startsWith($line, $key, true)) && $a[2] != 'FETCH'); 1796 1795 1797 $len = strlen($line); 1796 $len = strlen($line); 1797 $result = false; 1798 1798 1799 1799 // handle empty "* X FETCH ()" response … … 1891 1891 } while (!$this->startsWith($line, $key, true)); 1892 1892 1893 if ($result ) {1893 if ($result !== false) { 1894 1894 if ($file) { 1895 1895 fwrite($file, $result); -
trunk/roundcubemail/program/include/rcube_message.php
r3716 r3726 6 6 | | 7 7 | This file is part of the RoundCube Webmail client | 8 | Copyright (C) 2008-20 09, RoundCube Dev. - Switzerland |8 | Copyright (C) 2008-2010, RoundCube Dev. - Switzerland | 9 9 | Licensed under the GNU GPL | 10 10 | | … … 64 64 $this->app = rcmail::get_instance(); 65 65 $this->imap = $this->app->imap; 66 66 67 67 $this->uid = $uid; 68 68 $this->headers = $this->imap->get_headers($uid, NULL, true, true); 69 70 if (!$this->headers) 71 return; 69 72 70 73 $this->subject = rcube_imap::decode_mime_string( 71 74 $this->headers->subject, $this->headers->charset); 72 75 list(, $this->sender) = each($this->imap->decode_address_list($this->headers->from)); 73 76 74 77 $this->set_safe((intval($_GET['_safe']) || $_SESSION['safe_messages'][$uid])); 75 78 $this->opt = array( -
trunk/roundcubemail/program/js/app.js
r3704 r3726 204 204 205 205 if (this.env.action=='show' || this.env.action=='preview') { 206 this.enable_command(this.env.message_commands, t rue);206 this.enable_command(this.env.message_commands, this.env.uid); 207 207 208 208 if (this.env.next_uid) { … … 244 244 } 245 245 // show printing dialog 246 else if (this.env.action == 'print' )246 else if (this.env.action == 'print' && this.env.uid) 247 247 window.print(); 248 248 -
trunk/roundcubemail/program/steps/mail/func.inc
r3710 r3726 964 964 if (!isset($part->body)) 965 965 $part->body = $MESSAGE->get_part_content($part->mime_id); 966 967 // message is cached but not exists (#1485443), or other error 968 if ($part->body === false) { 969 rcmail_message_error($MESSAGE->uid); 970 } 966 971 967 972 // re-format format=flowed content … … 1551 1556 } 1552 1557 1558 function rcmail_message_error($uid=null) 1559 { 1560 global $RCMAIL; 1561 1562 // Set env variables for messageerror.html template 1563 if ($RCMAIL->action == 'show') { 1564 $mbox_name = $RCMAIL->imap->get_mailbox_name(); 1565 $RCMAIL->output->set_env('mailbox', $mbox_name); 1566 $RCMAIL->output->set_env('uid', null); 1567 } 1568 // display error message 1569 $RCMAIL->output->show_message('messageopenerror', 'error'); 1570 // ... display message error page 1571 $RCMAIL->output->send('messageerror'); 1572 } 1553 1573 1554 1574 // register UI objects -
trunk/roundcubemail/program/steps/mail/headers.inc
r3223 r3726 21 21 if ($uid = get_input_value('_uid', RCUBE_INPUT_POST)) 22 22 { 23 $source = $IMAP->get_raw_headers($uid);23 $source = $IMAP->get_raw_headers($uid); 24 24 25 if ($source) 26 { 27 $source = htmlspecialchars(trim($source)); 28 $source = preg_replace( 29 array( 30 '/\n[\t\s]+/', 31 '/^([a-z0-9_:-]+)/im', 32 '/\r?\n/' 33 ), 34 array( 35 "\n ", 36 '<font class="bold">\1</font>', 37 '<br />' 38 ), $source); 39 40 $OUTPUT->command('set_headers', $source); 25 if ($source !== false) { 26 $source = htmlspecialchars(trim($source)); 27 $source = preg_replace( 28 array( 29 '/\n[\t\s]+/', 30 '/^([a-z0-9_:-]+)/im', 31 '/\r?\n/' 32 ), 33 array( 34 "\n ", 35 '<font class="bold">\1</font>', 36 '<br />' 37 ), $source); 38 39 $OUTPUT->command('set_headers', $source); 40 } 41 else { 42 $RCMAIL->output->show_message('messageopenerror', 'error'); 43 } 44 41 45 $OUTPUT->send(); 42 }43 46 } 44 47 45 48 exit; 46 49 -
trunk/roundcubemail/program/steps/mail/show.inc
r3589 r3726 23 23 24 24 // similar code as in program/steps/mail/get.inc 25 if ($ _GET['_uid']) {26 $MESSAGE = new rcube_message( get_input_value('_uid', RCUBE_INPUT_GET));25 if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) { 26 $MESSAGE = new rcube_message($uid); 27 27 28 28 // if message not found (wrong UID)... 29 29 if (empty($MESSAGE->headers)) { 30 $OUTPUT->show_message('messageopenerror', 'error'); 31 // ... display error or preview page 32 if ($RCMAIL->action=='preview' && $OUTPUT->template_exists('messageerror')) 33 $OUTPUT->send('messageerror'); 34 else if ($RCMAIL->action=='preview' && $OUTPUT->template_exists('messagepreview')) 35 $OUTPUT->send('messagepreview'); 36 // ... go back to the list 37 else { 38 rcmail_overwrite_action(''); 39 return; 40 } 30 rcmail_message_error($uid); 41 31 } 42 32 … … 44 34 45 35 $mbox_name = $IMAP->get_mailbox_name(); 46 36 47 37 // show images? 48 38 rcmail_check_safe($MESSAGE); … … 53 43 54 44 $OUTPUT->set_pagetitle($MESSAGE->subject); 55 45 56 46 // give message uid to the client 57 47 $OUTPUT->set_env('uid', $MESSAGE->uid); -
trunk/roundcubemail/skins/default/templates/messageerror.html
r2723 r3726 2 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 3 <head> 4 <title>< /title>4 <title><roundcube:object name='productname' /> :: <roundcube:label name='servererror' /></title> 5 5 <roundcube:include file="/includes/links.html" /> 6 7 <roundcube:if condition="env:action!='show'" /> 8 6 9 </head> 7 10 <body class="iframe" style="background-color:#F2F2F2;"> … … 12 15 13 16 </body> 17 18 <roundcube:else /> 19 20 <script type="text/javascript" src="/splitter.js"></script> 21 <script type="text/javascript" src="/functions.js"></script> 22 <style type="text/css"> 23 #mailboxlist-container { width: <roundcube:exp expression="!empty(cookie:mailviewsplitterv) ? cookie:mailviewsplitterv-5 : 170" />px; } 24 #messageframe { left: <roundcube:exp expression="!empty(cookie:mailviewsplitterv) ? cookie:mailviewsplitterv+5 : 180" />px; 25 <roundcube:exp expression="browser:ie ? ('width: expression((parseInt(this.parentNode.offsetWidth)-'.(!empty(cookie:mailviewsplitterv) ? cookie:mailviewsplitterv+5 : 180).')+\\'px\\');') : ''" /> 26 } 27 </style> 28 </head> 29 30 <body onload="rcube_init_mail_ui()"> 31 32 <roundcube:include file="/includes/taskbar.html" /> 33 <roundcube:include file="/includes/header.html" /> 34 35 <div id="messagetoolbar"> 36 <roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " /> 37 <roundcube:button command="compose" type="link" class="button compose" classAct="button compose" classSel="button composeSel" title="writenewmessage" content=" " /> 38 </div> 39 40 <div id="mainscreen"> 41 <div id="mailleftcontainer"> 42 <div id="mailboxlist-container"> 43 <div class="boxtitle"><roundcube:label name="mailboxlist" /></div> 44 <roundcube:object name="mailboxlist" id="mailboxlist" maxlength="25" /> 45 </div> 46 </div> 47 48 <div id="messageframe" style="background-color:#F2F2F2;"> 49 <div style="margin:20px auto; text-align:center"> 50 <img src="/images/watermark.gif" width="260" height="228" alt="" /> 51 </div> 52 </div> 53 54 </div> 55 56 <script type="text/javascript"> 57 var mailviewsplitv = new rcube_splitter({id:'mailviewsplitterv', p1: 'mailboxlist-container', p2: 'messageframe', orientation: 'v', relative: true, start: 165}); 58 rcmail.add_onload('mailviewsplitv.init()'); 59 </script> 60 61 </body> 62 <roundcube:endif /> 63 14 64 </html>
Note: See TracChangeset
for help on using the changeset viewer.
