phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] email compose.php index.php inc/class.boindex.i...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] email compose.php index.php inc/class.boindex.i...
Date: Fri, 15 Dec 2006 10:44:17 +0000

CVSROOT:        /sources/phpgroupware
Module name:    email
Changes by:     Sigurd Nes <sigurdne>   06/12/15 10:44:17

Modified files:
        .              : compose.php index.php 
        inc            : class.boindex.inc.php class.bomessage.inc.php 
                         class.mail_msg_base.inc.php 
                         class.mail_msg_display.inc.php 
                         class.mail_msg_wrappers.inc.php 
                         class.so_mail_msg.inc.php 

Log message:
        nitices and ascii to utf conversion

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/email/compose.php?cvsroot=phpgroupware&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/email/index.php?cvsroot=phpgroupware&r1=1.94&r2=1.95
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.boindex.inc.php?cvsroot=phpgroupware&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.bomessage.inc.php?cvsroot=phpgroupware&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.mail_msg_base.inc.php?cvsroot=phpgroupware&r1=1.87&r2=1.88
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.mail_msg_display.inc.php?cvsroot=phpgroupware&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.mail_msg_wrappers.inc.php?cvsroot=phpgroupware&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/email/inc/class.so_mail_msg.inc.php?cvsroot=phpgroupware&r1=1.7&r2=1.8

Patches:
Index: compose.php
===================================================================
RCS file: /sources/phpgroupware/email/compose.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- compose.php 11 May 2005 14:08:27 -0000      1.54
+++ compose.php 15 Dec 2006 10:44:17 -0000      1.55
@@ -9,7 +9,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package email
-       * @version $Id: compose.php,v 1.54 2005/05/11 14:08:27 powerstat Exp $
+       * @version $Id: compose.php,v 1.55 2006/12/15 10:44:17 sigurdne Exp $
        * @internal Based on Aeromail http://the.cushman.net/
        */
        
@@ -39,40 +39,41 @@
        
        // time limit should be controlled elsewhere
        //@set_time_limit(0);
-       $pass_the_ball_uri = '';
+       $pass_the_ball_uri = array();
        
        if ($GLOBALS['phpgw']->msg->get_isset_arg('fldball'))
        {
                $my_fldball = $GLOBALS['phpgw']->msg->get_arg_value('fldball');
-               $pass_the_ball_uri = '&fldball[folder]='.$my_fldball['folder']
-                                               
.'&fldball[acctnum]='.$my_fldball['acctnum'];
+               $pass_the_ball_uri = 
array('fldball[folder]'=>$my_fldball['folder'],
+                                               
'fldball[acctnum]'=>$my_fldball['acctnum']);
        }
        elseif ($GLOBALS['phpgw']->msg->get_isset_arg('msgball'))
        {
                $my_msgball = $GLOBALS['phpgw']->msg->get_arg_value('msgball');
-               $pass_the_ball_uri = '&msgball[folder]='.$my_msgball['folder']
-                                               
.'&msgball[acctnum]='.$my_msgball['acctnum']
-                                               
.'&msgball[msgnum]='.$my_msgball['msgnum'];
+               $pass_the_ball_uri = 
array('msgball[folder]'=>$my_msgball['folder'],
+                                               
'msgball[acctnum]'=>$my_msgball['acctnum'],
+                                               
'msgball[msgnum]'=>$my_msgball['msgnum']);
        }
        else
        {
-               $pass_the_ball_uri = '&fldball[folder]=INBOX'
-                                               .'&fldball[acctnum]=0';
+               $pass_the_ball_uri = array('fldball[folder]'=>'INBOX',
+                                               'fldball[acctnum]'=>'0');
        }
        
-       header('Location: '.$GLOBALS['phpgw']->link(
-                               '/index.php',
-                               'menuaction=email.uicompose.compose'.
-                                $pass_the_ball_uri.
-                               '&to='.$to.
-                               '&cc='.$cc.
-                               '&bcc='.$bcc.
-                               '&subject='.$subject.
-                               '&body='.$body.
-                               '&personal='.$personal.
-                               '&sort='.$sort.
-                               '&order='.$order.
-                               '&start='.$start));
+       $GLOBALS['phpgw']->redirect_link(
+                               '/index.php',array(
+                               'menuaction'=>'email.uicompose.compose',
+                               'to'=>$to,
+                               'cc'=>$cc,
+                               'bcc'=>$bcc,
+                               'subject'=>$subject,
+                               'body'=>$body,
+                               'personal'=>$personal,
+                               'sort'=>$sort,
+                               'order'=>$order,
+                               'start'=>$start)
+                               +$pass_the_ball_uri
+                               );
        
        if (is_object($GLOBALS['phpgw']->msg))
        {

Index: index.php
===================================================================
RCS file: /sources/phpgroupware/email/index.php,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -b -r1.94 -r1.95
--- index.php   23 Jul 2006 10:23:01 -0000      1.94
+++ index.php   15 Dec 2006 10:44:17 -0000      1.95
@@ -9,7 +9,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package email
-       * @version $Id: index.php,v 1.94 2006/07/23 10:23:01 skwashd Exp $
+       * @version $Id: index.php,v 1.95 2006/12/15 10:44:17 sigurdne Exp $
        * @internal Based on Aeromail http://the.cushman.net/
        */
 
@@ -46,7 +46,6 @@
        
        if ($simple_redirect == True)
        {
-               //header('Location: 
'.$GLOBALS['phpgw']->link('/index.php','menuaction=email.uiindex.index'));
                $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'email.uiindex.index'));
                if (is_object($GLOBALS['phpgw']->msg))
                {

Index: inc/class.boindex.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.boindex.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- inc/class.boindex.inc.php   14 Dec 2006 15:09:30 -0000      1.35
+++ inc/class.boindex.inc.php   15 Dec 2006 10:44:17 -0000      1.36
@@ -7,7 +7,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package email
-       * @version $Id: class.boindex.inc.php,v 1.35 2006/12/14 15:09:30 
sigurdne Exp $
+       * @version $Id: class.boindex.inc.php,v 1.36 2006/12/15 10:44:17 
sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        */
 
@@ -380,19 +380,19 @@
                        $this->xi['report_this'] = 
$GLOBALS['phpgw']->msg->report_moved_or_deleted();
                        
                        // some fonts and font sizes
-                       $this->xi['ctrl_bar_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
+       //              $this->xi['ctrl_bar_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
                        $this->xi['ctrl_bar_font_size'] = '2';
-                       $this->xi['stats_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
+       //              $this->xi['stats_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
                        $this->xi['stats_font_size'] = '2';
                        $this->xi['stats_foldername_size'] = '3';
-                       $this->xi['mlist_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
+       //              $this->xi['mlist_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
                        $this->xi['mlist_font_size'] = '2';
                        $this->xi['mlist_font_size_sm'] = '1';
                        //$this->xi['mlist_font_size_sm'] = '0.6em';
-                       $this->xi['hdr_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
+       //              $this->xi['hdr_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
                        $this->xi['hdr_font_size'] = '2';
                        $this->xi['hdr_font_size_sm'] = '1';
-                       $this->xi['ftr_font']   = 
$GLOBALS['phpgw_info']['theme']['font'];
+       //              $this->xi['ftr_font']   = 
$GLOBALS['phpgw_info']['theme']['font'];
 
                        //Empty Trash added by skwashd - move it if you want
                        $this->xi['empty_trash_link'] = 
$GLOBALS['phpgw']->link('/index.php', 
@@ -412,8 +412,8 @@
                        $this->xi['current_fldball_fake_uri'] =  
'&folder='.$GLOBALS['phpgw']->msg->prep_folder_out()
                                                                
.'&acctnum='.$GLOBALS['phpgw']->msg->get_acctnum();
                        $this->xi['show_num_new'] = False;
-                       $this->icon_theme = 
$GLOBALS['phpgw']->msg->get_pref_value('icon_theme',$acctnum);
-                       $this->icon_size = 
$GLOBALS['phpgw']->msg->get_pref_value('icon_size',$acctnum);
+                       $this->icon_theme = 
$GLOBALS['phpgw']->msg->get_pref_value('icon_theme',$GLOBALS['phpgw']->msg->get_acctnum());
+                       $this->icon_size = 
$GLOBALS['phpgw']->msg->get_pref_value('icon_size',$GLOBALS['phpgw']->msg->get_acctnum());
                        //echo "icon size is ".$this->icon_size."<br />\r\n";
                        
                        /* MOVED TO FUNCTION ABOVE
@@ -484,7 +484,7 @@
                        $this->xi['arrows_form_action'] = 
$GLOBALS['phpgw']->link(
                                                                
'/index.php',array('menuaction'=>'email.uiindex.index'));
                        $this->xi['arrows_form_name'] = 'arrownav';
-                       $this->xi['arrows_backcolor'] = 
$GLOBALS['phpgw_info']['theme']['row_off'];
+       //              $this->xi['arrows_backcolor'] = 
$GLOBALS['phpgw_info']['theme']['row_off'];
                        $this->xi['arrows_backcolor_class'] = 'row_off';
                        //$this->xi['arrows_td_backcolor'] = 
$GLOBALS['phpgw_info']['theme']['th_bg'];
                        $this->xi['arrows_td_backcolor'] = '';
@@ -535,7 +535,7 @@
                                                                
'sort'=>$GLOBALS['phpgw']->msg->get_arg_value('sort'),
                                                                
'order'=>$GLOBALS['phpgw']->msg->get_arg_value('order')));
                        
-                       $this->xi['ctrl_bar_back2'] = 
$GLOBALS['phpgw_info']['theme']['row_off'];
+               //      $this->xi['ctrl_bar_back2'] = 
$GLOBALS['phpgw_info']['theme']['row_off'];
                        $this->xi['compose_link'] = $GLOBALS['phpgw']->link(
                                                                
'/index.php',array(
                                                                 
'menuaction'=>'email.uicompose.compose',
@@ -548,7 +548,7 @@
                        
                        $this->xi['compose_img'] = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/compose-message-'.$this->icon_size,'_on'),$this->xi['compose_txt'],'','','0');
                        $this->xi['ilnk_compose'] = 
$GLOBALS['phpgw']->msg->href_maketag($this->xi['compose_link'],$this->xi['compose_img']);
-                       switch 
($GLOBALS['phpgw']->msg->get_pref_value('button_type',$acctnum)){
+                       switch 
($GLOBALS['phpgw']->msg->get_pref_value('button_type',$GLOBALS['phpgw']->msg->get_acctnum())){
                                case 'text':
                                        $this->xi['compose_clickme'] = '<a 
href="'.$this->xi['compose_link'].'">'.$this->xi['compose_txt'].'</a>';
                                        break;
@@ -649,7 +649,7 @@
                                                                .'&start=');
                        $this->xi['ctrl_bar_acct_1_link'] = '<a 
href="'.$this->xi['ctrl_bar_acct_1_link'].'">'.'goto extra 1'.'</a>';
                        */
-                       $this->xi['ctrl_bar_back1'] = 
$GLOBALS['phpgw_info']['theme']['row_on'];
+               //      $this->xi['ctrl_bar_back1'] = 
$GLOBALS['phpgw_info']['theme']['row_on'];
                        
                        $sort_selected = Array(
                                0 => '',
@@ -810,7 +810,7 @@
                                                
'fldball[acctnum]'=>$GLOBALS['phpgw']->msg->get_acctnum()));
                        }
                        
-                       $this->xi['hdr_backcolor'] = 
$GLOBALS['phpgw_info']['theme']['th_bg'];
+       //              $this->xi['hdr_backcolor'] = 
$GLOBALS['phpgw_info']['theme']['th_bg'];
                        $this->xi['hdr_backcolor_class'] = 'th';
                        $this->xi['mlist_newmsg_char'] = '<strong>*</strong>';
                        $this->xi['mlist_newmsg_color'] = '#ff0000';
@@ -929,7 +929,7 @@
                        //$this->xi['delmov_image'] = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->common->image_on('email',$icon_theme.'-trash-'.$icon_size,'_on'),$this->xi['lang_delete'],'','','0');
                        //$this->xi['delmov_image'] = 
$GLOBALS['phpgw']->msg->img_maketag($this->xi['image_dir'].'/'.$this->icon_theme.'-trash-'.$this->icon_size.'.png',$this->xi['lang_delete'],'','','0');
                        $delmov_onclick = "javascript:do_action('delall')";
-                       switch 
($GLOBALS['phpgw']->msg->get_pref_value('button_type',$acctnum)){
+                       switch 
($GLOBALS['phpgw']->msg->get_pref_value('button_type',$GLOBALS['phpgw']->msg->get_acctnum())){
                                case 'text':
                                        $this->xi['delmov_button'] = '<a 
href="'.$delmov_onclick.'">'.$this->xi['lang_delete'].'</a>';
                                        break;
@@ -941,7 +941,7 @@
                                        break;
                        }
                                        
-                       $this->xi['ftr_backcolor'] = 
$GLOBALS['phpgw_info']['theme']['th_bg'];
+               //      $this->xi['ftr_backcolor'] = 
$GLOBALS['phpgw_info']['theme']['th_bg'];
                        $this->xi['ftr_backcolor_class'] = 'th';
                }
                

Index: inc/class.bomessage.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.bomessage.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- inc/class.bomessage.inc.php 14 Dec 2006 10:58:54 -0000      1.19
+++ inc/class.bomessage.inc.php 15 Dec 2006 10:44:17 -0000      1.20
@@ -7,7 +7,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package email
-       * @version $Id: class.bomessage.inc.php,v 1.19 2006/12/14 10:58:54 
sigurdne Exp $
+       * @version $Id: class.bomessage.inc.php,v 1.20 2006/12/15 10:44:17 
sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        */
 
@@ -614,6 +614,9 @@
                                }
                                // escape certain undesirable chars before HTML 
display
                                $from_personal =  
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($from_personal);
+                               $from_personal = 
$GLOBALS['phpgw']->msg->ascii2utf($from_personal);
+                               $from_plain = 
$GLOBALS['phpgw']->msg->ascii2utf($from_plain);
+
                                // display "From" according to user preferences
                                if 
(($GLOBALS['phpgw']->msg->get_isset_pref('show_addresses'))
                                && 
($GLOBALS['phpgw']->msg->get_pref_value('show_addresses') != 'none')
@@ -696,6 +699,9 @@
                                        }
                                        // escape certain undesirable chars 
before HTML display
                                        $to_personal =  
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($to_personal);
+                                       $to_personal = 
$GLOBALS['phpgw']->msg->ascii2utf($to_personal);
+                                       $to_plain = 
$GLOBALS['phpgw']->msg->ascii2utf($to_plain);
+
                                        if 
(($GLOBALS['phpgw']->msg->get_pref_value('show_addresses') != 'none')
                                        && ($to_personal != $to_plain))
                                        {
@@ -768,6 +774,9 @@
                                        }
                                        // escape certain undesirable chars 
before HTML display
                                        $cc_personal =  
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($cc_personal);
+                                       $cc_personal = 
$GLOBALS['phpgw']->msg->ascii2utf($cc_personal);
+                                       $cc_plain = 
$GLOBALS['phpgw']->msg->ascii2utf($cc_plain);
+
                                        //if 
(($GLOBALS['phpgw_info']['user']['preferences']['email']['show_addresses'] != 
'none')
                                        if 
(($GLOBALS['phpgw']->msg->get_pref_value('show_addresses') != 'none')
                                        && ($cc_personal != $cc_plain))
@@ -1792,9 +1801,12 @@
                                        if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable image <br />'); }
                                        
                                        $title_text = 
$this->xi['lang_section'].': '.$this->part_nice[$i]['m_part_num_mime'];
+                                       $title_text = 
$GLOBALS['phpgw']->msg->ascii2utf($title_text);
                                        $display_str = 
$GLOBALS['phpgw']->msg->decode_header_string($this->part_nice[$i]['ex_part_name'])
                                                .' - ' 
.$GLOBALS['phpgw']->msg->format_byte_size((int)$this->part_nice[$i]['bytes']) 
                                                .' - 
'.$this->xi['lang_keywords'].': ' .$this->part_nice[$i]['m_keywords'];
+                                       $display_str = 
$GLOBALS['phpgw']->msg->ascii2utf($display_str);
+
                                        $this->part_nice[$i]['title_text'] = 
$title_text;
                                        $this->part_nice[$i]['display_str'] = 
$display_str;
                                        // we add an href that points to the 
exact msg_number/mime_part number that is the image

Index: inc/class.mail_msg_base.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.mail_msg_base.inc.php,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- inc/class.mail_msg_base.inc.php     13 Dec 2006 15:45:00 -0000      1.87
+++ inc/class.mail_msg_base.inc.php     15 Dec 2006 10:44:17 -0000      1.88
@@ -9,7 +9,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package email
-       * @version $Id: class.mail_msg_base.inc.php,v 1.87 2006/12/13 15:45:00 
sigurdne Exp $
+       * @version $Id: class.mail_msg_base.inc.php,v 1.88 2006/12/15 10:44:17 
sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        * @internal Originally Based on Aeromail http://the.cushman.net/
        */
@@ -338,6 +338,8 @@
                //var $skip_args_special_handlers = 'get_folder_list';
                var $skip_args_special_handlers = '';
                
+               var $newsmode = '';
+               
                /*!
                @function mail_msg_base
                @abstract CONSTRUCTOR place holder, does nothing  
@@ -3676,7 +3678,7 @@
                */
                function decrypt_email_passwd($data)
                {
-                       if(!is_object($this->crypto))
+                       if(!isset($this->crypto) || !is_object($this->crypto))
                        {
                                $cryptovars[0] = 
md5($GLOBALS['phpgw_info']['server']['encryptkey']);
                                $cryptovars[1] = 
$GLOBALS['phpgw_info']['server']['mcrypt_iv'];
@@ -4762,6 +4764,27 @@
                        preg_match('/&.*[-]/',$string);
                }
                
+               
+               /*!
+               @function ascii2utf
+               @abstract from version .18 of the all text are required to be 
utf8
+               @discussion Encodes an ISO-8859-1 string to UTF-8
+               @param $string
+               @return string utf8 encoded string
+               @author Sigurd
+               */
+               function ascii2utf($text = '')
+               {       
+                       if ($text == utf8_encode($text))
+                       {
+                               return $text;
+                       }
+                       else
+                       {
+                               return utf8_encode($text);
+                       }
+               }
+               
                // PHP "htmpspecialchars" is unreliable sometimes, and does not 
encode single quotes (unless told to)
                // this is a somewhat more reliable version of that PHP function
                // with a corresponding 'decode' function below it

Index: inc/class.mail_msg_display.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.mail_msg_display.inc.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- inc/class.mail_msg_display.inc.php  14 Dec 2006 18:26:31 -0000      1.48
+++ inc/class.mail_msg_display.inc.php  15 Dec 2006 10:44:17 -0000      1.49
@@ -7,7 +7,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package email
-       * @version $Id: class.mail_msg_display.inc.php,v 1.48 2006/12/14 
18:26:31 sigurdne Exp $
+       * @version $Id: class.mail_msg_display.inc.php,v 1.49 2006/12/15 
10:44:17 sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        */
 
@@ -1063,9 +1063,10 @@
                {
                        $subject = $this->decode_header_string($msg->Subject);
                }
-               // non-us-ascii chars in headers MUST be specially encoded, so 
decode them (if any) now
-               // $personal = $this->qprint_rfc_header($personal);
-               $personal = $this->decode_header_string($personal);
+
+               // Now all text has to be utf8
+               $subject = $this->ascii2utf($subject);
+               
                // do we add a prefix like Re: or Fw:
                if ($desired_prefix != '')
                {
@@ -1115,6 +1116,10 @@
                        $personal =  $this->htmlspecialchars_encode($personal);
                        $personal = $personal .' 
('.$from->mailbox.'@'.$from->host.')';
                }
+
+               // Now all text has to be utf8
+               $personal = $this->ascii2utf($personal);
+
                return $personal;
        }
 
@@ -2320,6 +2325,7 @@
                $href_part_name = $this->decode_header_string($part_name);
                // escape certain undesirable chars before HTML display
                $href_part_name = 
$this->htmlspecialchars_encode($href_part_name);
+               $href_part_name = $this->ascii2utf($href_part_name);
                // ex_part_clickable
                $ex_part_clickable = '<a 
href="'.$ex_part_href.'">'.$href_part_name.'</a>';
                // put these two vars in an array, and pass it back to the 
calling process
@@ -2767,7 +2773,7 @@
                        }
 
                        // ROW BACK COLOR
-                       $msg_list_display[$x]['back_color'] = (($i + 1)/2 == 
floor(($i + 1)/2)) ? $GLOBALS['phpgw_info']['theme']['row_off'] : 
$GLOBALS['phpgw_info']['theme']['row_on'];
+               //      $msg_list_display[$x]['back_color'] = (($i + 1)/2 == 
floor(($i + 1)/2)) ? $GLOBALS['phpgw_info']['theme']['row_off'] : 
$GLOBALS['phpgw_info']['theme']['row_on'];
                        $msg_list_display[$x]['back_color_class'] = (($i + 1)/2 
== floor(($i + 1)/2)) ? 'row_off' : 'row_on';
                        ////$msg_list_display[$x]['back_color'] = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($msg_list_display[$x-1]['back_color']);
 
@@ -2954,7 +2960,7 @@
                        "ReplyTo" header in the From String the user wants to 
see.
                        */
                        $from = $hdr_envelope->from[0];
-                       if (!$from->personal)
+                       if (!isset($from->personal) || !$from->personal)
                        {
                                // no "personal" info available, only can show 
plain address
                                $personal = $from->mailbox.'@'.$from->host;
@@ -2969,6 +2975,7 @@
                        }
                        // escape certain undesirable chars before HTML display
                        $personal = $this->htmlspecialchars_encode($personal);
+                       $personal = $this->ascii2utf($personal);
 
                        if (($this->get_pref_value('show_addresses') == 'from')
                        && ($personal != $from->mailbox.'@'.$from->host))
@@ -3096,6 +3103,7 @@
                                        }
                                        // escape certain undesirable chars 
before HTML display
                                        $to_person = 
$this->htmlspecialchars_encode($to_person);
+                                       $to_person = 
$this->ascii2utf($to_person);
                                        $to_data_array[$z] = $to_person;
                                }
                                // throw a spacer comma in between addresses, 
if more than one
@@ -3127,7 +3135,7 @@
        {
                //$prefer_ext = '.gif';
                $prefer_ext = '.png';
-               return 
$GLOBALS['phpgw_info']['server']['webserver_url'].'/email/templates/default/images/'.$image.$prefer_ext;
+               return 
$GLOBALS['phpgw_info']['server']['webserver_url'].'/email/templates/base/images/'.$image.$prefer_ext;
        }
 
 } // end class mail_msg

Index: inc/class.mail_msg_wrappers.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.mail_msg_wrappers.inc.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- inc/class.mail_msg_wrappers.inc.php 14 Dec 2006 20:59:13 -0000      1.47
+++ inc/class.mail_msg_wrappers.inc.php 15 Dec 2006 10:44:17 -0000      1.48
@@ -7,7 +7,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package email
-       * @version $Id: class.mail_msg_wrappers.inc.php,v 1.47 2006/12/14 
20:59:13 sigurdne Exp $
+       * @version $Id: class.mail_msg_wrappers.inc.php,v 1.48 2006/12/15 
10:44:17 sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        */
 
@@ -1067,25 +1067,25 @@
                        if (($this->debug_session_caching > 2) || 
($this->debug_wrapper_dcom_calls > 2)) { $this->dbug->out('mail_msg(_wrappers): 
get_folder_status_info: ('.__LINE__.') ->dcom->status returns: $mailbox_status 
DUMP', $mailbox_status); } 
                        
                        // cache validity data - will be used to cache 
msg_list_array data, which is good until UID_NEXT changes
-                       $return_data['uidnext'] = $mailbox_status->uidnext;
-                       $return_data['uidvalidity'] = 
$mailbox_status->uidvalidity;
+                       $return_data['uidnext'] = 
(isset($mailbox_status->uidnext)?$mailbox_status->uidnext:'');
+                       $return_data['uidvalidity'] = 
(isset($mailbox_status->uidvalidity)?$mailbox_status->uidvalidity:'');
                        
                        $mail_server_type = 
$this->get_pref_value('mail_server_type', $fldball['acctnum']);
                        if (($mail_server_type == 'imap')
                        || ($mail_server_type == 'imaps'))
                        {
                                $return_data['is_imap'] = True;
-                               $return_data['number_new'] = 
$mailbox_status->unseen;
-                               $return_data['number_all'] = 
$mailbox_status->messages;
-                               if ($mailbox_status->unseen == 1) 
+                               $return_data['number_new'] = 
(isset($mailbox_status->unseen)?$mailbox_status->unseen:'');
+                               $return_data['number_all'] = 
(isset($mailbox_status->messages)?$mailbox_status->messages:'');
+                               if (isset($mailbox_status->unseen) && 
$mailbox_status->unseen == 1) 
                                {
                                        $return_data['alert_string'] .= 
lang('You have 1 new message!');
                                }
-                               if ($mailbox_status->unseen > 1) 
+                               if (isset($mailbox_status->unseen) && 
$mailbox_status->unseen > 1) 
                                {
                                        $return_data['alert_string'] .= 
lang('You have %1 new messages!',$mailbox_status->unseen);
                                }
-                               if ($mailbox_status->unseen == 0) 
+                               if (isset($mailbox_status->unseen) && 
$mailbox_status->unseen == 0) 
                                {
                                        $return_data['alert_string'] .= 
lang('You have no new messages');
                                }

Index: inc/class.so_mail_msg.inc.php
===================================================================
RCS file: /sources/phpgroupware/email/inc/class.so_mail_msg.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- inc/class.so_mail_msg.inc.php       13 Dec 2006 14:57:20 -0000      1.7
+++ inc/class.so_mail_msg.inc.php       15 Dec 2006 10:44:17 -0000      1.8
@@ -7,7 +7,7 @@
        * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package email
-       * @version $Id: class.so_mail_msg.inc.php,v 1.7 2006/12/13 14:57:20 
sigurdne Exp $
+       * @version $Id: class.so_mail_msg.inc.php,v 1.8 2006/12/15 10:44:17 
sigurdne Exp $
        * @internal Based on AngleMail http://www.anglemail.org/
        */
 
@@ -262,7 +262,7 @@
                                else
                                {
                                        // WIPE CLEAN THE CACHE
-                                       $account_id = 
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
+                                       $account_id = 
get_account_id((isset($accountid)?$accountid:''),$GLOBALS['phpgw']->session->account_id);
                                        $query = "DELETE FROM 
phpgw_app_sessions WHERE loginid = '".$account_id."'"
                                                ." AND app = 'email'";
                                        $GLOBALS['phpgw']->db->query($query);
@@ -655,7 +655,7 @@
                */
                function so_clear_all_data_this_user()
                {
-                       $account_id = 
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
+                       $account_id = 
get_account_id((isset($accountid)?$accountid:''),$GLOBALS['phpgw']->session->account_id);
                        $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_anglemail "
                                . " WHERE account_id='" . $account_id . 
"'",__LINE__,__FILE__);
                        $this->so_clear_data_group();
@@ -811,7 +811,7 @@
                                $data_key_mailsvr_namespace = '';
                        }
                        
-                       $account_id = 
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
+                       $account_id = 
get_account_id((isset($accountid)?$accountid:''),$GLOBALS['phpgw']->session->account_id);
                        //if (($data_key)
                        //&& ($data_key_msgball)
                        //&& ($data_key_folder_status_info))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]