phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] email/inc class.boaction.inc.php, 1.17.2.3, 1.17.2.4


From: Chris Weiss <address@hidden>
Subject: [Phpgroupware-cvs] email/inc class.boaction.inc.php, 1.17.2.3, 1.17.2.4 class.bocompose.inc.php, 1.8.2.2, 1.8.2.3 class.bomessage.inc.php, 1.14.2.2, 1.14.2.3 class.bosend.inc.php, 1.11.2.2, 1.11.2.3 class.mail_msg_base.inc.php, 1.78.2.5, 1.78.2.6 class.mail_msg_display.inc.php, 1.40.2.3, 1.40.2.4 class.spell.inc.php, 1.2.2.2, 1.2.2.3 class.uimessage.inc.php, 1.9.2.4, 1.9.2.5
Date: Thu, 13 Nov 2003 18:43:05 +0000

Update of /cvsroot/phpgroupware/email/inc
In directory subversions:/tmp/cvs-serv23338/email/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.boaction.inc.php class.bocompose.inc.php 
        class.bomessage.inc.php class.bosend.inc.php 
        class.mail_msg_base.inc.php class.mail_msg_display.inc.php 
        class.spell.inc.php class.uimessage.inc.php 
Log Message:
Merged Angles bug fixes in the am-dev4 release and added missing idsociety files


Index: class.bomessage.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.bomessage.inc.php,v
retrieving revision 1.14.2.2
retrieving revision 1.14.2.3
diff -C2 -d -r1.14.2.2 -r1.14.2.3
*** class.bomessage.inc.php     13 Sep 2003 01:46:14 -0000      1.14.2.2
--- class.bomessage.inc.php     13 Nov 2003 18:42:59 -0000      1.14.2.3
***************
*** 34,37 ****
--- 34,41 ----
                var $no_fmt='';
                
+               // maximum number of TO and CC addresses to show, too many will 
error message display
+               var $max_to_loops = 15;
+               var $max_cc_loops = 15;
+               
                // do we show both plain and enhanced (html, apple "enriched") 
parts of an alternative set
                // or do we hide the simpler plain part of the pair
***************
*** 453,457 ****
                        
                        // ----  What Folder To Return To  -----
!                       $lnk_goback_folder = 
$GLOBALS['phpgw']->msg->href_maketag(
                                $GLOBALS['phpgw']->link(
                                         '/index.php',
--- 457,462 ----
                        
                        // ----  What Folder To Return To  -----
!                       //$lnk_goback_folder = 
$GLOBALS['phpgw']->msg->href_maketag(
!                       $lnk_goback_folder = 
$GLOBALS['phpgw']->msg->href_maketag_class(
                                $GLOBALS['phpgw']->link(
                                         '/index.php',
***************
*** 463,467 ****
                                        
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')),
                                
//$GLOBALS['phpgw']->msg->get_folder_short($msgball['folder']));
!                               $nice_folder_name);
                        
                        // NOTE: msgnum int 0 is NOT to be confused with 
"empty" nor "boolean False"
--- 468,474 ----
                                        
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')),
                                
//$GLOBALS['phpgw']->msg->get_folder_short($msgball['folder']));
!                               $nice_folder_name,
!                               // his class name is reference to a css on the 
page itself, for the A item
!                               'c_backto');
                        
                        // NOTE: msgnum int 0 is NOT to be confused with 
"empty" nor "boolean False"
***************
*** 485,493 ****
                                        .$this->no_fmt);
                                $prev_msg_img = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/arrow-left-24','_on'),$this->xi['lang_previous_message'],'','','0');
! 
                                $ilnk_prev_msg = 
$GLOBALS['phpgw']->msg->href_maketag($prev_msg_link,$prev_msg_img);
                        }
                        else
                        {
                                $ilnk_prev_msg = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/arrow-left-no-24','_on'),$this->xi['lang_no_previous_message'],'','','0');
  
--- 492,502 ----
                                        .$this->no_fmt);
                                $prev_msg_img = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/arrow-left-24','_on'),$this->xi['lang_previous_message'],'','','0');
!                               $href_prev_msg = 
$GLOBALS['phpgw']->msg->href_maketag_class($prev_msg_link,'[&lt; 
'.$this->xi['lang_previous_message'].']', 'c_replybar');
                                $ilnk_prev_msg = 
$GLOBALS['phpgw']->msg->href_maketag($prev_msg_link,$prev_msg_img);
                        }
                        else
                        {
+                               // not a clickable link, just text saying "no 
prev message"
+                               $href_prev_msg = 
'['.$this->xi['lang_no_previous_message'].']';
                                $ilnk_prev_msg = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/arrow-left-no-24','_on'),$this->xi['lang_no_previous_message'],'','','0');
  
***************
*** 509,516 ****
--- 518,528 ----
                                        .$this->no_fmt);
                                $next_msg_img = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/arrow-right-24','_on'),$this->xi['lang_next_message'],'','','0');
+                               $href_next_msg = 
$GLOBALS['phpgw']->msg->href_maketag_class($next_msg_link,'['.$this->xi['lang_next_message'].'
 &gt;]', 'c_replybar');
                                $ilnk_next_msg = 
$GLOBALS['phpgw']->msg->href_maketag($next_msg_link,$next_msg_img);
                        }
                        else
                        {
+                               // not a clickable link, just text saying "no 
next message"
+                               $href_next_msg = 
'['.$this->xi['lang__no_next_message'].']';
                                $ilnk_next_msg = 
$GLOBALS['phpgw']->msg->img_maketag($GLOBALS['phpgw']->msg->_image_on('email',$this->icon_theme.'/arrow-right-no-24','_on'),$this->xi['lang__no_next_message'],'','','0');
                        }
***************
*** 518,521 ****
--- 530,537 ----
                        //if ($this->debug > 0) { echo 'messages.php step4 
$nav_data[] $ilnk_next_msg: '.$ilnk_next_msg.'<br>'; }
                        
+                       // these are HREF clickable text for prev and next text 
navigation
+                       $this->xi['href_prev_msg'] = $href_prev_msg;
+                       $this->xi['href_next_msg'] = $href_next_msg;
+                       // these are the clickable images for prev and next 
message navigation
                        $this->xi['ilnk_prev_msg'] = $ilnk_prev_msg;
                        $this->xi['ilnk_next_msg'] = $ilnk_next_msg;
***************
*** 649,656 ****
                                $to_loops = count($msg_headers->to);
                                // begin test of Maz Num of To loop limitation
!                               $max_to_loops = 25;
!                               if ($to_loops > $max_to_loops)
                                {
!                                       $to_loops = $max_to_loops;
                                }
                                for ($i = 0; $i < $to_loops; $i++)
--- 665,671 ----
                                $to_loops = count($msg_headers->to);
                                // begin test of Maz Num of To loop limitation
!                               if ($to_loops > $this->max_to_loops)
                                {
!                                       $to_loops = $this->max_to_loops;
                                }
                                for ($i = 0; $i < $to_loops; $i++)
***************
*** 722,729 ****
                                $cc_loops = count($msg_headers->cc);
                                // begin test of Maz Num of CC loop limitation
!                               $max_cc_loops = 25;
!                               if ($cc_loops > $max_cc_loops)
                                {
!                                       $cc_loops = $max_cc_loops;
                                }
                                for ($i = 0; $i < $cc_loops; $i++)
--- 737,743 ----
                                $cc_loops = count($msg_headers->cc);
                                // begin test of Maz Num of CC loop limitation
!                               if ($cc_loops > $this->max_cc_loops)
                                {
!                                       $cc_loops = $this->max_cc_loops;
                                }
                                for ($i = 0; $i < $cc_loops; $i++)
***************
*** 890,893 ****
--- 904,908 ----
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
                                        
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
+                       $href_reply = 
$GLOBALS['phpgw']->msg->href_maketag_class($reply_url, $this->xi['lang_reply'], 
'c_replybar');
                        $ilnk_reply = 
$GLOBALS['phpgw']->msg->href_maketag($reply_url, $reply_img);
                        
***************
*** 903,906 ****
--- 918,922 ----
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
                                        
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
+                       $href_replyall = 
$GLOBALS['phpgw']->msg->href_maketag_class($replyall_url, 
$this->xi['lang_reply_all'], 'c_replybar');
                        $ilnk_replyall = 
$GLOBALS['phpgw']->msg->href_maketag($replyall_url, $replyall_img);
                        
***************
*** 917,920 ****
--- 933,937 ----
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
                                        
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
+                       $href_forward = 
$GLOBALS['phpgw']->msg->href_maketag_class($forward_url, 
$this->xi['lang_forward'], 'c_replybar');
                        $ilnk_forward = 
$GLOBALS['phpgw']->msg->href_maketag($forward_url, $forward_img);
                        
***************
*** 930,933 ****
--- 947,951 ----
                                        
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
                                        .$this->no_fmt);
+                       $href_delete= 
$GLOBALS['phpgw']->msg->href_maketag_class($delete_url, 
$this->xi['lang_delete'], 'c_replybar');
                        $ilnk_delete = 
$GLOBALS['phpgw']->msg->href_maketag($delete_url, $delete_img);
                        
***************
*** 937,940 ****
--- 955,962 ----
                        $this->xi['lnk_goback_folder'] = $lnk_goback_folder;
                        $this->xi['go_back_to'] = $this->xi['lang_go_back_to'];
+                       $this->xi['href_reply'] = $href_reply;
+                       $this->xi['href_replyall'] = $href_replyall;
+                       $this->xi['href_forward'] = $href_forward;
+                       $this->xi['href_delete'] = $href_delete;
                        $this->xi['ilnk_reply'] = $ilnk_reply;
                        $this->xi['ilnk_replyall'] = $ilnk_replyall;

Index: class.uimessage.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.uimessage.inc.php,v
retrieving revision 1.9.2.4
retrieving revision 1.9.2.5
diff -C2 -d -r1.9.2.4 -r1.9.2.5
*** class.uimessage.inc.php     13 Sep 2003 01:46:18 -0000      1.9.2.4
--- class.uimessage.inc.php     13 Nov 2003 18:43:02 -0000      1.9.2.5
***************
*** 132,137 ****
                                'move_postmove_goto_value'      => 
$this->bo->xi['move_postmove_goto_value'],
                                
!                               'ilnk_prev_msg'                 => 
$this->bo->xi['ilnk_prev_msg'],
!                               'ilnk_next_msg'                 => 
$this->bo->xi['ilnk_next_msg'],
                                
                                // ----  Labels and Colors for From, To, CC, 
Files, and Subject  -----
--- 132,138 ----
                                'move_postmove_goto_value'      => 
$this->bo->xi['move_postmove_goto_value'],
                                
!                               // moved to case block for text, image, or text 
and image pref
!                               //'ilnk_prev_msg'                       => 
$this->bo->xi['ilnk_prev_msg'],
!                               //'ilnk_next_msg'                       => 
$this->bo->xi['ilnk_next_msg'],
                                
                                // ----  Labels and Colors for From, To, CC, 
Files, and Subject  -----
***************
*** 197,204 ****
                                'go_back_to'            => 
$this->bo->xi['lang_go_back_to'],
                                'lnk_goback_folder'     => 
$this->bo->xi['lnk_goback_folder'],
!                               'ilnk_reply'            => 
$this->bo->xi['ilnk_reply'],
!                               'ilnk_replyall'         => 
$this->bo->xi['ilnk_replyall'],
!                               'ilnk_forward'          => 
$this->bo->xi['ilnk_forward'],
!                               'ilnk_delete'           => 
$this->bo->xi['ilnk_delete']
                        );
                        $this->tpl->set_var($tpl_vars);
--- 198,206 ----
                                'go_back_to'            => 
$this->bo->xi['lang_go_back_to'],
                                'lnk_goback_folder'     => 
$this->bo->xi['lnk_goback_folder'],
!                               // moved to case block for text, image, or text 
and image pref
!                               //'ilnk_reply'          => 
$this->bo->xi['ilnk_reply'],
!                               //'ilnk_replyall'               => 
$this->bo->xi['ilnk_replyall'],
!                               //'ilnk_forward'                => 
$this->bo->xi['ilnk_forward'],
!                               //'ilnk_delete'         => 
$this->bo->xi['ilnk_delete']
                        );
                        $this->tpl->set_var($tpl_vars);
***************
*** 234,237 ****
--- 236,253 ----
                                        
$this->tpl->set_var('view_printable_href',$this->bo->xi['view_printable_href']);
                                        
$this->tpl->set_var('view_printable_ilnk','');
+                                       // reply and navigation toolbar thing
+                                       
$this->tpl->set_var('href_reply',$this->bo->xi['href_reply']);
+                                       
$this->tpl->set_var('href_replyall',$this->bo->xi['href_replyall']);
+                                       
$this->tpl->set_var('href_forward',$this->bo->xi['href_forward']);
+                                       
$this->tpl->set_var('href_delete',$this->bo->xi['href_delete']);
+                                       $this->tpl->set_var('ilnk_reply','');
+                                       $this->tpl->set_var('ilnk_replyall','');
+                                       $this->tpl->set_var('ilnk_forward','');
+                                       $this->tpl->set_var('ilnk_delete','');
+                                       
$this->tpl->set_var('href_prev_msg',$this->bo->xi['href_prev_msg']);
+                                       
$this->tpl->set_var('href_next_msg',$this->bo->xi['href_next_msg']);
+                                       
//$this->tpl->set_var('text_nbsp','&nbsp;');
+                                       $this->tpl->set_var('ilnk_prev_msg','');
+                                       $this->tpl->set_var('ilnk_next_msg','');
                                        break;
                                case 'image':
***************
*** 244,247 ****
--- 260,277 ----
                                        
$this->tpl->set_var('view_printable_href','');
                                        
$this->tpl->set_var('view_printable_ilnk',$this->bo->xi['view_printable_ilnk']);
+                                       // reply and navigation toolbar thing
+                                       $this->tpl->set_var('href_reply','');
+                                       $this->tpl->set_var('href_replyall','');
+                                       $this->tpl->set_var('href_forward','');
+                                       $this->tpl->set_var('href_delete','');
+                                       
$this->tpl->set_var('ilnk_reply',$this->bo->xi['ilnk_reply']);
+                                       
$this->tpl->set_var('ilnk_replyall',$this->bo->xi['ilnk_replyall']);
+                                       
$this->tpl->set_var('ilnk_forward',$this->bo->xi['ilnk_forward']);
+                                       
$this->tpl->set_var('ilnk_delete',$this->bo->xi['ilnk_delete']);
+                                       $this->tpl->set_var('href_prev_msg','');
+                                       $this->tpl->set_var('href_next_msg','');
+                                       //$this->tpl->set_var('text_nbsp','');
+                                       
$this->tpl->set_var('ilnk_prev_msg',$this->bo->xi['ilnk_prev_msg']);
+                                       
$this->tpl->set_var('ilnk_next_msg',$this->bo->xi['ilnk_next_msg']);
                                        break;
                                //case 'both':
***************
*** 255,258 ****
--- 285,304 ----
                                        
$this->tpl->set_var('view_printable_href',$this->bo->xi['view_printable_href']);
                                        
$this->tpl->set_var('view_printable_ilnk',$this->bo->xi['view_printable_ilnk']);
+                                       // reply and navigation toolbar thing
+                                       
$this->tpl->set_var('href_reply',$this->bo->xi['href_reply']);
+                                       
$this->tpl->set_var('href_replyall',$this->bo->xi['href_replyall']);
+                                       
$this->tpl->set_var('href_forward',$this->bo->xi['href_forward']);
+                                       
$this->tpl->set_var('href_delete',$this->bo->xi['href_delete']);
+                                       
$this->tpl->set_var('ilnk_reply',$this->bo->xi['ilnk_reply']);
+                                       
$this->tpl->set_var('ilnk_replyall',$this->bo->xi['ilnk_replyall']);
+                                       
$this->tpl->set_var('ilnk_forward',$this->bo->xi['ilnk_forward']);
+                                       
$this->tpl->set_var('ilnk_delete',$this->bo->xi['ilnk_delete']);
+                                       $this->tpl->set_var('href_prev_msg','');
+                                       $this->tpl->set_var('href_next_msg','');
+                                       
//$this->tpl->set_var('href_prev_msg',$this->bo->xi['href_prev_msg']);
+                                       
//$this->tpl->set_var('href_next_msg',$this->bo->xi['href_next_msg']);
+                                       
//$this->tpl->set_var('text_nbsp','&nbsp;');
+                                       
$this->tpl->set_var('ilnk_prev_msg',$this->bo->xi['ilnk_prev_msg']);
+                                       
$this->tpl->set_var('ilnk_next_msg',$this->bo->xi['ilnk_next_msg']);
                                        break;
                        }

Index: class.mail_msg_base.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.mail_msg_base.inc.php,v
retrieving revision 1.78.2.5
retrieving revision 1.78.2.6
diff -C2 -d -r1.78.2.5 -r1.78.2.6
*** class.mail_msg_base.inc.php 13 Sep 2003 01:46:16 -0000      1.78.2.5
--- class.mail_msg_base.inc.php 13 Nov 2003 18:43:00 -0000      1.78.2.6
***************
*** 283,286 ****
--- 283,291 ----
                //var $crypto;
                
+               // reply messages get this "quoting" prefix to each line, see 
bocompose and bosend
+               //var $reply_prefix = '>';
+               var $reply_prefix = '> ';
+               //var $reply_prefix = '| ';
+               
                // ---- Data Caching  ----
                var $use_cached_prefs = True;
***************
*** 625,628 ****
--- 630,643 ----
                                //      the SMTP mail
                                'action',
+                               // ----  orig_action: string  ----
+                               // USAGE:
+                               // preserves the original "action" of the 
compose page because new and forward body lines 
+                               // need to be shorter then reply to we need to 
remember the desired "action" and store it here 
+                               // also used to preserve this thru the spell 
check process too
+                               // initially we only put this only in the GET 
part of GPC
+                               // why is this different, "orig_action" can 
have the value "new" meaning new mail
+                               // whereas plain old "action" can not tell us 
of a new mail situation, not right now anyway,
+                               // so the "new" value can be preserved to the 
send code and also thru the spell page and back too
+                               'orig_action',
                                
                                // === MESSAGE NUMBER AND MIME PART REFERENCES 
===
***************
*** 1154,1158 ****
                                        
$this->extra_and_default_acounts[0]['status'] = 'enabled';
                                        // now add whetever extra accounts we 
processed above
!                                       $loops = 
count($GLOBALS['phpgw']->msg->extra_accounts);
                                        for ($i=0; $i < $loops; $i++)
                                        {
--- 1169,1173 ----
                                        
$this->extra_and_default_acounts[0]['status'] = 'enabled';
                                        // now add whetever extra accounts we 
processed above
!                                       $loops = count($this->extra_accounts);
                                        for ($i=0; $i < $loops; $i++)
                                        {
***************
*** 2440,2444 ****
                        }
                        //echo 'prep_folder_out: param $feed_folder 
['.$feed_folder.'], :: ';
!                       $preped_folder = 
$GLOBALS['phpgw']->msg->ensure_one_urlencoding($feed_folder);
                        $preped_folder = str_replace('&', '%26', 
$preped_folder);
                        //echo ' $preped_folder ['.$preped_folder.']<br>';
--- 2455,2459 ----
                        }
                        //echo 'prep_folder_out: param $feed_folder 
['.$feed_folder.'], :: ';
!                       $preped_folder = 
$this->ensure_one_urlencoding($feed_folder);
                        $preped_folder = str_replace('&', '%26', 
$preped_folder);
                        //echo ' $preped_folder ['.$preped_folder.']<br>';
***************
*** 3587,3591 ****
                
                        // DECISION: no more than 4 DIRECTORIES DEEP of 
recursion
!                       $num_slashes = 
$GLOBALS['phpgw']->msg->substr_count_ex($folder_long, "/");
                        if (($home_type_namespace)
                        && ($num_slashes >= 4))
--- 3602,3606 ----
                
                        // DECISION: no more than 4 DIRECTORIES DEEP of 
recursion
!                       $num_slashes = $this->substr_count_ex($folder_long, 
"/");
                        if (($home_type_namespace)
                        && ($num_slashes >= 4))
***************
*** 4937,4943 ****
                }
                
-               // my implementation of a PHP4 only function
                /*!
                @function body_hard_wrap
                @abstract my implementation of a PHP4 only function which keeps 
lines of text under a certain length.
                @author Angles
--- 4952,4973 ----
                }
                
                /*!
                @function body_hard_wrap
+               @abstract Wrap test calls either the php4 wordwrap OR 
optionally sucky native code
+               @author Angles
+               @discussion when php3 compat was necessary I made a sucky hand 
made body wrap, 
+               but now php4 is expected so this function should call the php4 
function wordwrap instead.
+               */
+               function body_hard_wrap($in='', $size=78)
+               {
+                       // use sucky hand made function
+                       //return $this->body_hard_wrap_ex($in, $size);
+                       // use the php4 builting function
+                       return wordwrap($in, $size, "\r\n");
+                       
+               }
+               // my implementation of a PHP4 only function
+               /*!
+               @function body_hard_wrap_ex
                @abstract my implementation of a PHP4 only function which keeps 
lines of text under a certain length.
                @author Angles
***************
*** 4953,4957 ****
                was necessary to implement all non php3 functions with a 
compatibility function.
                */
!               function body_hard_wrap($in, $size=80)
                {
                        // this function formats lines according to the defined
--- 4983,4987 ----
                was necessary to implement all non php3 functions with a 
compatibility function.
                */
!               function body_hard_wrap_ex($in, $size=80)
                {
                        // this function formats lines according to the defined
***************
*** 5005,5008 ****
--- 5035,5088 ----
                }
        
+               /*!
+               @function recall_desired_action
+               @abstract used to preserve if this originated as a reply, 
replyall, forward, or new mail
+               @author Angles
+               @discussion Used in both bocompose and bosend so we put it here 
for general access. 
+               Line lengths will differ for new mail and forwarded orig body, 
vs. reply mail that has longer 
+               lines. So this preserves this info for later use. Particularly 
we like to preserve this thru the spelling pass also.
+               We look for GPC args "action" or "orig_action", as keys, and 
their 
+               values are limited to "reply", "replyall", "forward", and 
"new", with "new" being deduced on the 
+               initial compose page call and put into "orig_action" for later 
use, while the others possible "action" 
+               values simply get stored in "orig_action" no deduction is 
required, it is specified.
+               If new future actions are added, adjust this function 
accordingly.
+               @access public
+               */
+               function recall_desired_action()
+               {
+                       // what action are we dealing with here, reply(all), 
forward, or newmail
+                       // we care because new and forward get different line 
length then reply mail that has ">"
+                       $orig_action = 'unknown';
+                       if (($this->get_isset_arg('action'))
+                       && (
+                               ($this->get_arg_value('action') == 'forward')
+                               || ($this->get_arg_value('action') == 'reply')
+                               || ($this->get_arg_value('action') == 
'replyall')
+                               )
+                       )
+                       {
+                               $orig_action = $this->get_arg_value('action');
+                       }
+                       elseif (($this->get_isset_arg('orig_action'))
+                       && (
+                               ($this->get_arg_value('orig_action') == 
'forward')
+                               || ($this->get_arg_value('orig_action') == 
'reply')
+                               || ($this->get_arg_value('orig_action') == 
'replyall')
+                               || ($this->get_arg_value('orig_action') == 
'new')
+                               )
+                       )
+                       {
+                               $orig_action = 
$this->get_arg_value('orig_action');
+                       }
+                       else
+                       {
+                               // if not reply, replyall, nor forward 
"action", then we have NEW message
+                               // if this is set now then the above 
"orig_action" should preserve it
+                               $orig_action = 'new';
+                       }
+                       return $orig_action;
+               }
+               
+               
                
/**************************************************************************\
                * 
***************
*** 5487,5491 ****
                                // this should already be cached, if not, it 
will be after this call
                                // this works OK for both php4 sessions AND 
sessions_db
!                               $msg_headers = 
$GLOBALS['phpgw']->msg->phpgw_header($msgball);
                                if ($this->debug_events > 2) { 
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): SEEN-UNSEEN 
"phpgw_header" examination for $msg_headers DUMP:', $msg_headers); } 
                                //if ($this->debug_events > 2) { 
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode) 
SEEN-UNSEEN "phpgw_header" examination for $msg_headers <br> * 
'.serialize($msg_headers).'<br>'); } 
--- 5567,5571 ----
                                // this should already be cached, if not, it 
will be after this call
                                // this works OK for both php4 sessions AND 
sessions_db
!                               $msg_headers = $this->phpgw_header($msgball);
                                if ($this->debug_events > 2) { 
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): SEEN-UNSEEN 
"phpgw_header" examination for $msg_headers DUMP:', $msg_headers); } 
                                //if ($this->debug_events > 2) { 
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode) 
SEEN-UNSEEN "phpgw_header" examination for $msg_headers <br> * 
'.serialize($msg_headers).'<br>'); } 
***************
*** 6051,6054 ****
--- 6131,6151 ----
                }
        
+               /*!
+               @function href_maketag_class
+               @abstract will generate a typical A HREF html item with 
optional CLASS value for css specs
+               */
+               function href_maketag_class($href_link='',$href_text='default 
text', $css_class_name='')
+               {
+                       if ($css_class_name != '')
+                       {
+                               $class_prop=' class="'.$css_class_name.'" ';
+                       }
+                       else
+                       {
+                               $class_prop='';
+                       }
+                       return '<a '.$class_prop.' href="' .$href_link .'">' 
.$href_text .'</a>' ."\n";
+               }
+               
                /*!
                @function img_maketag

Index: class.spell.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.spell.inc.php,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C2 -d -r1.2.2.2 -r1.2.2.3
*** class.spell.inc.php 13 Sep 2003 01:46:17 -0000      1.2.2.2
--- class.spell.inc.php 13 Nov 2003 18:43:02 -0000      1.2.2.3
***************
*** 131,144 ****
                        $this->preserve_tokens = array(
                                0 => 'action',
!                               1 => 'from',
!                               2 => 'sender',
!                               3 => 'to',
!                               4 => 'cc',
!                               5 => 'bcc',
!                               6 => 'msgtype',
!                               7 => 'attach_sig',
!                               8 => 'req_notify'
                        );
                        $this->preserve_vars['action'] = '';
                        $this->preserve_vars['from'] = '';
                        $this->preserve_vars['sender'] = '';
--- 131,149 ----
                        $this->preserve_tokens = array(
                                0 => 'action',
!                               // why is this different, "orig_action" can 
have the value "new" meaning new mail
!                               // whereas plain old "action" can not tell us 
of a new mail situation, not right now anyway
!                               // darn, I'm not sure this is needed here, is 
not this value kept in the URI or does that not matter here
!                               1 => 'orig_action',
!                               2 => 'from',
!                               3 => 'sender',
!                               4 => 'to',
!                               5 => 'cc',
!                               6 => 'bcc',
!                               7 => 'msgtype',
!                               8 => 'attach_sig',
!                               9 => 'req_notify'
                        );
                        $this->preserve_vars['action'] = '';
+                       $this->preserve_vars['orig_action'] = '';
                        $this->preserve_vars['from'] = '';
                        $this->preserve_vars['sender'] = '';

Index: class.bosend.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.bosend.inc.php,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.3
diff -C2 -d -r1.11.2.2 -r1.11.2.3
*** class.bosend.inc.php        13 Sep 2003 01:46:15 -0000      1.11.2.2
--- class.bosend.inc.php        13 Nov 2003 18:43:00 -0000      1.11.2.3
***************
*** 224,227 ****
--- 224,229 ----
                        // preserve these vars
                        $this->mail_spell->set_preserve_var('action', 
$GLOBALS['phpgw']->msg->get_arg_value('action'));
+                       // experimental, should this go here? is not this 
already in the URI or something?
+                       //$this->mail_spell->set_preserve_var('orig_action', 
$GLOBALS['phpgw']->msg->recall_desired_action());
                        $this->mail_spell->set_preserve_var('from', 
$GLOBALS['phpgw']->msg->get_arg_value('from'));
                        $this->mail_spell->set_preserve_var('sender', 
$GLOBALS['phpgw']->msg->get_arg_value('sender'));
***************
*** 525,529 ****
                                // html_quotes_decode may be obsoleted someday: 
 workaround for a preferences database issue (<=pgpgw ver 0.9.13)
                                $user_sig = 
$GLOBALS['phpgw']->msg->html_quotes_decode($user_sig);
!                               $body = $body ."\r\n"."\r\n".'-- '."\r\n" 
.$user_sig ."\r\n";
                        }
                        if ($this->company_disclaimer)
--- 527,534 ----
                                // html_quotes_decode may be obsoleted someday: 
 workaround for a preferences database issue (<=pgpgw ver 0.9.13)
                                $user_sig = 
$GLOBALS['phpgw']->msg->html_quotes_decode($user_sig);
!                               $body = $body."\r\n"
!                                               ."\r\n"
!                                               .'-- '."\r\n" 
!                                               .$user_sig ."\r\n";
                        }
                        if ($this->company_disclaimer)
***************
*** 531,534 ****
--- 536,645 ----
                                $body = $body .$this->company_disclaimer;
                        }
+                       
+                       // LINE LENGTH for "new" and our text of a forwarded 
text are 78 chars, 
+                       // which is SHORTER than for reply quoted bodies that 
have ">" chars 
+                       // this is only for text WE have written, not any other 
part of the body
+                       // html textbox no longer adds hard wrap on submit, so 
we handle it here now
+                       // NOTE reply bodies have already been handled as to 
length when we quoted the text
+                       //if 
(($GLOBALS['phpgw']->msg->get_isset_arg('orig_action'))
+                       //&& (
+                       //      
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'new')
+                       //      || 
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'forward')
+                       //      )
+                       //)
+                       if (($GLOBALS['phpgw']->msg->recall_desired_action()== 
'new')
+                       || ($GLOBALS['phpgw']->msg->recall_desired_action() == 
'forward'))
+                       {
+                               // WRAP BODY to lines of 78 chars then CRLF
+                               // IS THIS TOO SHORT? what about code snippets 
and stuff?or long URLs
+                               $body = 
$GLOBALS['phpgw']->msg->body_hard_wrap($body, 78);
+                       }
+                       elseif 
(($GLOBALS['phpgw']->msg->recall_desired_action()== 'reply')
+                       || ($GLOBALS['phpgw']->msg->recall_desired_action()== 
'replyall'))
+                       {
+                               //echo 'entering recall_desired_action == reply 
line length handling'."\r\n";
+                               // ok we have already quoted the text of the 
message we are replying to
+                               // BUT we have yet to standardize line length 
for the text WE just typed
+                               // in this message, our own text, 
+                               // BUT we really should skip doing linebreaking 
it _again_ for the quoted text, though
+                               $body_array = array();
+                               $body_array = explode("\r\n", $body);
+                               // we do not use this again till we put 
$new_body into it, so clear the memory
+                               $body = '';
+                               // process only our unquoted text
+                               $body_array_count = count($body_array);
+                               $in_unquoted_block = False;
+                               $unquoted_text = '';
+                               $new_body = '';
+                               for ($bodyidx = 0; $bodyidx < 
$body_array_count; ++$bodyidx)
+                               {
+                                       // skip text that starts with the ">" 
so called "quoting" char to the original body text
+                                       // because it has already been line 
length normalized in bocompose
+                                       $this_line = $body_array[$bodyidx];
+                                       if ((strlen($this_line) > 1)
+                                       && ($this_line[0] == 
$GLOBALS['phpgw']->msg->reply_prefix[0]))
+                                       {
+                                               // ... this line starts with 
the quoting char
+                                               if ($in_unquoted_block == True)
+                                               {
+                                                       //echo 'line ength 
handling: processing MY text block'."\r\n";
+                                                       // TOGGLE - we are 
exiting block of our text
+                                                       // process the 
preceeding block of unquoted text, if any
+                                                       $unquoted_text = 
$GLOBALS['phpgw']->msg->body_hard_wrap($unquoted_text, 78);
+                                                       // now pass it into the 
new body var
+                                                       $new_body .= 
$unquoted_text;
+                                                       // clear this var
+                                                       $unquoted_text = '';
+                                                       // toggle this flag
+                                                       $in_unquoted_block = 
False;
+                                                       // for THIS line, it is 
the first in a quoted block, so pass straight to new body var
+                                                       //   I _think_ the CRLF 
is needed before this line because hard_wrap may not 
+                                                       //   put one at the end 
of the last line of the unquoted text block ?
+                                                       //$new_body .=  "\r\n" 
. $this_line . "\r\n";   
+                                                       $new_body .= $this_line 
. "\r\n";
+                                               }
+                                               else
+                                               {
+                                                       // we are in a block of 
QUOTED text, simply pass it into the new body var
+                                                       $new_body .= $this_line 
. "\r\n";
+                                               }
+                                       }
+                                       elseif (($body_array_count - $bodyidx) 
== 1)
+                                       {
+                                               // this is the last line, and 
it is NOT quoted, so if we were in an unquoted block (of our text) process it 
now
+                                               // even if this is the only 
single line of unquoted text in the message, process it now
+                                               // otherwise we may leave off 
the end of the message, if it is our text
+                                               $unquoted_text .= $this_line;
+                                               $unquoted_text = 
$GLOBALS['phpgw']->msg->body_hard_wrap($unquoted_text, 78);
+                                               $new_body .= $unquoted_text;
+                                               $unquoted_text = '';
+                                               // this really is not needed, 
but so it anyway
+                                               $in_unquoted_block = False;
+                                       }
+                                       else
+                                       {
+                                               // ... this line does NOT start 
with the quoting char, i.e. it is text we typed in
+                                               // make sure flag is correct
+                                               if ($in_unquoted_block == False)
+                                               {
+                                                       // toggle this flag
+                                                       $in_unquoted_block = 
True;
+                                                       // there is just no 
real special action of a change into this block of our text, 
+                                                       // the real action is 
when switching out of a block or our (unqouted) text 
+                                               }
+                                               // compile this block of 
unquoted text, our text, in a var for later processing
+                                               $unquoted_text .= $this_line . 
"\r\n";
+                                       }
+                               }
+                               // cleanup
+                               $body_array = array();
+                               // ok we have gone through the whole message, 
put it in the bldy var
+                               $body = '';
+                               $body = $new_body;
+                               $new_body = '';
+                               $unquoted_text = '';
+                               // end reply body line length landling block
+                       }
+                       
                        // Step One Addition
                        // ---- Request Delivery Notification in Headers ----

Index: class.mail_msg_display.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.mail_msg_display.inc.php,v
retrieving revision 1.40.2.3
retrieving revision 1.40.2.4
diff -C2 -d -r1.40.2.3 -r1.40.2.4
*** class.mail_msg_display.inc.php      13 Sep 2003 01:46:16 -0000      1.40.2.3
--- class.mail_msg_display.inc.php      13 Nov 2003 18:43:02 -0000      1.40.2.4
***************
*** 1635,1639 ****
                                // and AngleMail flatening code has left the 
top level headers out of the
                                // flat array, as it does sometimes.
!                               // (2) The second is for anything deep enough 
so that the parent part IS in the
                                // flat array, which is more typical.
                                $presentable_parent_idx = 
$part_nice[$i]['ex_parent_flat_idx'];
--- 1635,1645 ----
                                // and AngleMail flatening code has left the 
top level headers out of the
                                // flat array, as it does sometimes.
!                               // (2) the first is where the mail has a 
RELATED subgroup that is at the 1st level debth
!                               // i.e. the first thing below the top level 
headers themselves, thus
!                               // and AngleMail flatening code has left the 
top level headers out of the 
!                               // flat array, as it does sometimes, so we need 
to look back 2 steps to those top level headers
!                               // that are only available thru the 
$struct->type thing because our flattening code
!                               // has left the top level headers out of the 
flat array, as it does sometimes
!                               // (3) The second is for anything deep enough 
so that the parent part IS in the 
                                // flat array, which is more typical.
                                $presentable_parent_idx = 
$part_nice[$i]['ex_parent_flat_idx'];
***************
*** 1641,1644 ****
--- 1647,1663 ----
                                   ($part_nice[$i]['type'] == 'text')
                                && ($part_nice[$i]['subtype'] == 'plain')
+                               && ($part_nice[$i]['ex_parent_flat_idx'] == 
$not_set)
+                               //&& (stristr($struct->type, 'multipart'))
+                               && ((string)$struct->type == '1')  // "1" = 
"multipart"
+                               && (stristr($struct->subtype, 'alternative'))
+                               )
+                               {
+                                       // SET THIS FLAG: then, in presentation 
loop, we can decide not to show it
+                                       $part_nice[$i]['m_keywords'] .= 
'alt_hide' .' ';
+                               }
+                               // scanario (2) as outlined above
+                               elseif (
+                                  ($part_nice[$i]['type'] == 'text')
+                               && ($part_nice[$i]['subtype'] == 'plain')
                                && 
($part_nice[$presentable_parent_idx]['ex_parent_flat_idx'] == $not_set)
                                && (stristr($struct->type, 'multipart'))
***************
*** 1652,1657 ****
                                        $part_nice[$i]['m_keywords'] .= 
'alt_hide' .' ';
                                }
!                               // same as above but we do not need to look all 
the way back to the top level headers
!                               // ie because the parent part is included in 
the flat parts array
                                elseif (
                                   ($part_nice[$i]['ex_level_debth'] > 1)
--- 1671,1677 ----
                                        $part_nice[$i]['m_keywords'] .= 
'alt_hide' .' ';
                                }
!                               // scenario (3) as outlined above
!                               // same as (1) above but we do not need to look 
all the way back to the top level headers
!                               // i.e. because the parent part is included in 
the flat parts array
                                elseif (
                                   ($part_nice[$i]['ex_level_debth'] > 1)

Index: class.bocompose.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.bocompose.inc.php,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -C2 -d -r1.8.2.2 -r1.8.2.3
*** class.bocompose.inc.php     13 Sep 2003 06:27:44 -0000      1.8.2.2
--- class.bocompose.inc.php     13 Nov 2003 18:42:59 -0000      1.8.2.3
***************
*** 28,31 ****
--- 28,37 ----
                var $msg_bootstrap;
                
+               // reply messages get this "quoting" prefix to each line
+               // NEW we use the global msg->reply_prefix instead of this one 
here
+               //var $reply_prefix = '>';
+               //var $reply_prefix = '> ';
+               //var $reply_prefix = '| ';
+               
                // CHOOSE YOUR ADDRESSBOOK
                var $addybook_choice;
***************
*** 51,56 ****
                
                /*!
                @function get_compose_form_action_url
!               @abstract ?
                @param $menuaction_target (string)
                @author Angles
--- 57,111 ----
                
                /*!
+               @function recall_desired_action
+               @abstract used to preserve if this originated as a reply, 
replyall, forward, or new mail
+               @author Angles
+               @discussion Line lengths will differ for new mail and forwarded 
orig body, vs. reply mail that has longer 
+               lines. So this preserves this info for later use. Particularly 
we like to preserve this thru the spelling pass also.
+               We look for GPC args "action" or "orig_action", as keys, and 
their 
+               values are limited to "reply", "replyall", "forward", and 
"new", with "new" being deduced on the 
+               initial compose page call and put into "orig_action" for later 
use, while the others possible "action" 
+               values simply get stored in "orig_action" no deduction is 
required, it is specified.
+               If new future actions are added, adjust this function 
accordingly.
+               @access public
+               // MOVED TO MAIL_MSG_BASE BECAUSE WE ALSO NEED THIS IN CLASS 
BOSEND
+               function recall_desired_action()
+               {
+                       // what action are we dealing with here, reply(all), 
forward, or newmail
+                       // we care because new and forward get different line 
length then reply mail that has ">"
+                       $orig_action = 'unknown';
+                       if (($GLOBALS['phpgw']->msg->get_isset_arg('action'))
+                       && (
+                               
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'forward')
+                               || 
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'reply')
+                               || 
($GLOBALS['phpgw']->msg->get_arg_value('action') == 'replyall')
+                               )
+                       )
+                       {
+                               $orig_action = 
$GLOBALS['phpgw']->msg->get_arg_value('action');
+                       }
+                       elseif 
(($GLOBALS['phpgw']->msg->get_isset_arg('orig_action'))
+                       && (
+                               
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'forward')
+                               || 
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'reply')
+                               || 
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'replyall')
+                               || 
($GLOBALS['phpgw']->msg->get_arg_value('orig_action') == 'new')
+                               )
+                       )
+                       {
+                               $orig_action = 
$GLOBALS['phpgw']->msg->get_arg_value('orig_action');
+                       }
+                       else
+                       {
+                               // if not reply, replyall, nor forward 
"action", then we have NEW message
+                               // if this is set now then the above 
"orig_action" should preserve it
+                               $orig_action = 'new';
+                       }
+                       return $orig_action;
+               }
+               */
+               
+               /*!
                @function get_compose_form_action_url
!               @abstract makes the html action target for the send button on 
the compose page
                @param $menuaction_target (string)
                @author Angles
***************
*** 87,90 ****
--- 142,147 ----
                                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
                                                
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
+                                               // this is somewhat redundant 
in this particular case
+                                               
.'&orig_action='.$GLOBALS['phpgw']->msg->recall_desired_action()
                                );
                                if 
(($GLOBALS['phpgw']->msg->get_isset_arg('action'))
***************
*** 119,122 ****
--- 176,181 ----
                                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
                                                
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
+                                               // when this hits bosend it is 
useful to know if it is a reply  or not for linebreak purposes
+                                               
.'&orig_action='.$GLOBALS['phpgw']->msg->recall_desired_action()
                                );
                        }
***************
*** 137,144 ****
--- 196,206 ----
                                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
                                                
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
+                                               // when this hits bosend it is 
useful to know if it is a reply  or not for linebreak purposes
+                                               
.'&orig_action='.$GLOBALS['phpgw']->msg->recall_desired_action()
                                );
                        }
                        return $send_btn_action;
                }
+               
                /*!
                @function quote_inline_message
***************
*** 168,171 ****
--- 230,234 ----
                                        }
                                        
+                                       $bodystring = '';
                                        $bodystring = 
$GLOBALS['phpgw']->msg->phpgw_fetchbody($msgball);
                                        // see if we have to un-do qprint (or 
other) encoding of the part we are about to quote
***************
*** 225,228 ****
--- 288,293 ----
                                        // explode into an array
                                        $body_array = explode("\r\n", 
$bodystring);
+                                       // cleanup, we do not need $bodystring 
var anymore                              
+                                       $bodystring = '';
                                        // add the ">" quoting char to the 
beginning of each line
                                        // note, this *will* loop at least once 
assuming the body has one line at least
***************
*** 232,238 ****
                                                // add the ">" so called 
"quoting" char to the original body text
                                                // NOTE: do NOT trim the LEFT 
part of the string, use RTRIM instead
!                                               $this_line = '>' . 
rtrim($body_array[$bodyidx]) ."\r\n";
                                                $body .= $this_line;
                                        }
                                        
                                        // email needs to be sent with NO 
ENCODED HTML ENTITIES
--- 297,307 ----
                                                // add the ">" so called 
"quoting" char to the original body text
                                                // NOTE: do NOT trim the LEFT 
part of the string, use RTRIM instead
!                                               //$this_line = '>' . 
rtrim($body_array[$bodyidx]) ."\r\n";
!                                               //$this_line = 
$this->reply_prefix . rtrim($body_array[$bodyidx]) ."\r\n";
!                                               $this_line = 
$GLOBALS['phpgw']->msg->reply_prefix . rtrim($body_array[$bodyidx]) ."\r\n";
                                                $body .= $this_line;
                                        }
+                                       // cleanup
+                                       $body_array = array();
                                        
                                        // email needs to be sent with NO 
ENCODED HTML ENTITIES
***************
*** 277,280 ****
--- 346,350 ----
                                // now we know all (all ?) html specialchars 
are decoded, so we will not get that erronious encoding of the ampersand that 
is actually itself part of an html specialchar
                                $body = 
$GLOBALS['phpgw']->msg->htmlspecialchars_encode($body);
+                               // NOTE this goes back into the textbox with 
out changing the line lengths yet, that happens later
                        
                        // ----  Handle Replying and Forwarding  -----
***************
*** 383,391 ****
                                        $who_wrote = 
$GLOBALS['phpgw']->msg->get_who_wrote($msg_headers);
                                        $lang_wrote = lang('wrote');
                                        $body =  "\r\n"
                                                ."\r\n"
!                                               ."\r\n".$who_wrote .' 
'.$lang_wrote.': '
!                                               ."\r\n".'>'
!                                               ."\r\n";
                                        
                                        // ----  Quoted Bodystring of Re: 
Message is the "First Presentable" part  -----
--- 453,464 ----
                                        $who_wrote = 
$GLOBALS['phpgw']->msg->get_who_wrote($msg_headers);
                                        $lang_wrote = lang('wrote');
+                                       // 2 blank lines (humm, why 3 crlf  
then)
                                        $body =  "\r\n"
                                                ."\r\n"
!                                               ."\r\n"
!                                               // the who wrote line
!                                               .$who_wrote .' '.$lang_wrote.': 
'."\r\n"
!                                               // then one blank quoted line 
b4 the quoted body
!                                               
.$GLOBALS['phpgw']->msg->reply_prefix."\r\n";
                                        
                                        // ----  Quoted Bodystring of Re: 
Message is the "First Presentable" part  -----
***************
*** 406,409 ****
--- 479,483 ----
                                        }
                                        
+                                       $bodystring = '';
                                        $bodystring = 
$GLOBALS['phpgw']->msg->phpgw_fetchbody($msgball);
                                        // see if we have to un-do qprint (or 
other) encoding of the part we are about to quote
***************
*** 445,456 ****
                                        // sig = "dash dash space CRLF 
(anything and CRLF) repeated 1 to 5 times"
                                        //$bodystring = 
preg_replace("/--\s{0,1}\r\n.(?!>)(.{1,}\r\n){1,5}/smx", "", $bodystring);
                                        $bodystring = 
preg_replace("/\r\n[-]{2}\s{0,1}\r\n\w.{0,}\r\n(.{1,}\r\n){0,4}/", "\r\n", 
$bodystring);
                                        // sig = "CRLF dash dash space(0or1) 
CRLF anyWordChar anything CRLF (anything and CRLF) repeated 0 to 4 times"
                                        
!                                       //now is a good time to trim the body
                                        trim($bodystring);
                                        
                                        // ----- Quote The Body You Are 
Replying To With ">"  ------
                                        $body_array = array();
                                        // we need *some* line breaks in the 
body so we know where to add the ">" quoting char(s)
                                        // some relatively short emails may not 
have any CRLF pairs, but may have a few real long lines
--- 519,539 ----
                                        // sig = "dash dash space CRLF 
(anything and CRLF) repeated 1 to 5 times"
                                        //$bodystring = 
preg_replace("/--\s{0,1}\r\n.(?!>)(.{1,}\r\n){1,5}/smx", "", $bodystring);
+                                       // THIS ONE DOES IT - USE THIS ONE
                                        $bodystring = 
preg_replace("/\r\n[-]{2}\s{0,1}\r\n\w.{0,}\r\n(.{1,}\r\n){0,4}/", "\r\n", 
$bodystring);
                                        // sig = "CRLF dash dash space(0or1) 
CRLF anyWordChar anything CRLF (anything and CRLF) repeated 0 to 4 times"
                                        
!                                       //now is a good time to trim the 
retireved bodystring
                                        trim($bodystring);
                                        
                                        // ----- Quote The Body You Are 
Replying To With ">"  ------
                                        $body_array = array();
+                                       // NOTE compose page html has a 
textarea with "cols" set to 84
+                                       // this means on submit the text 
automatically is hardwrapped to 84 chars
+                                       // NEW - NOT ANY MORE, no more 
wrap=hard in the html-textbox tags
+                                       // I did this so replies to messages 
already having "> " added will not wrap to early 
+                                       // because the message lines are 
lengthened by 1 or 2 chars already due to the 
+                                       // already existing "> " and there may 
be many of them already.
+                                       // HOWEVER a new message should go out 
with standard 78 char line length (see below)
+                                       
                                        // we need *some* line breaks in the 
body so we know where to add the ">" quoting char(s)
                                        // some relatively short emails may not 
have any CRLF pairs, but may have a few real long lines
***************
*** 459,476 ****
                                        {
                                                // aim for a 74-80 char line 
length
!                                               $bodystring = 
$GLOBALS['phpgw']->msg->body_hard_wrap($bodystring, 74);
                                        }
-                                       // explode into an array
                                        $body_array = explode("\r\n", 
$bodystring);
                                        // add the ">" quoting char to the 
beginning of each line
                                        // note, this *will* loop at least once 
assuming the body has one line at least
                                        // therefor the var "body" *will* get 
filled
!                                       for ($bodyidx = 0; $bodyidx < 
count($body_array); ++$bodyidx)
                                        {
                                                // add the ">" so called 
"quoting" char to the original body text
                                                // NOTE: do NOT trim the LEFT 
part of the string, use RTRIM instead
!                                               $this_line = '>' . 
rtrim($body_array[$bodyidx]) ."\r\n";
                                                $body .= $this_line;
                                        }
                                        
                                        // email needs to be sent with NO 
ENCODED HTML ENTITIES
--- 542,574 ----
                                        {
                                                // aim for a 74-80 char line 
length
!                                               //$bodystring = 
$GLOBALS['phpgw']->msg->body_hard_wrap($bodystring, 74);
!                                               $bodystring = 
$GLOBALS['phpgw']->msg->body_hard_wrap($bodystring, 78);
!                                       }
!                                       else
!                                       {
!                                               // NEW CHANGE: compose page no 
longer wraps hard
!                                               // this bodystring is the text 
we are about to add reply quotes to
!                                               // it may already have CRLF but 
the line lengths could be too darn long
!                                               // AND so we need to have 
somewhat sane line lengths fed to the textbox
!                                               // AND we need to have sane 
line lengths before we add the quote char
!                                               // since textbox will happily 
submit any length line to the send code and look stupid maybe
!                                               $bodystring = 
$GLOBALS['phpgw']->msg->body_hard_wrap($bodystring, 88);
                                        }
                                        $body_array = explode("\r\n", 
$bodystring);
+                                       // cleanup, we do not need $bodystring 
var anymore                              
+                                       $bodystring = '';
                                        // add the ">" quoting char to the 
beginning of each line
                                        // note, this *will* loop at least once 
assuming the body has one line at least
                                        // therefor the var "body" *will* get 
filled
!                                       $body_array_count = count($body_array);
!                                       for ($bodyidx = 0; $bodyidx < 
$body_array_count; ++$bodyidx)
                                        {
                                                // add the ">" so called 
"quoting" char to the original body text
                                                // NOTE: do NOT trim the LEFT 
part of the string, use RTRIM instead
!                                               $this_line = 
$GLOBALS['phpgw']->msg->reply_prefix . rtrim($body_array[$bodyidx]) ."\r\n";
                                                $body .= $this_line;
                                        }
+                                       // cleanup
+                                       $body_array = array();
                                        
                                        // email needs to be sent with NO 
ENCODED HTML ENTITIES

Index: class.boaction.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.boaction.inc.php,v
retrieving revision 1.17.2.3
retrieving revision 1.17.2.4
diff -C2 -d -r1.17.2.3 -r1.17.2.4
*** class.boaction.inc.php      13 Sep 2003 02:49:14 -0000      1.17.2.3
--- class.boaction.inc.php      13 Nov 2003 18:42:58 -0000      1.17.2.4
***************
*** 1156,1159 ****
--- 1156,1161 ----
                        $GLOBALS['phpgw']->common->phpgw_exit(False);
                }
+       
+       
        }
  ?>





reply via email to

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