phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] email/inc/class.bomessage.inc.php, 1.14.2.6


From: nomail
Subject: [Phpgroupware-cvs] email/inc/class.bomessage.inc.php, 1.14.2.6
Date: Sat, 6 Nov 2004 17:13:46 +0100

Update of /email/inc
Modified Files:
        Branch: Version-0_9_16-branch
          class.bomessage.inc.php

date: 2004/11/06 16:13:46;  author: powerstat;  state: Exp;  lines: +46 -46

Log Message:
replaced <br> with <br /> and <hr> with <hr /> for better w3c compatibility
=====================================================================
Index: email/inc/class.bomessage.inc.php
diff -u email/inc/class.bomessage.inc.php:1.14.2.5 
email/inc/class.bomessage.inc.php:1.14.2.6
--- email/inc/class.bomessage.inc.php:1.14.2.5  Fri Feb  6 19:38:09 2004
+++ email/inc/class.bomessage.inc.php   Sat Nov  6 16:13:46 2004
@@ -73,7 +73,7 @@
                */
                function bomessage()
                {
-                       if ($this->debug > 0) { echo 'ENTERING: 
email.bomessage.*constructor*'.'<br>'; }
+                       if ($this->debug > 0) { echo 'ENTERING: 
email.bomessage.*constructor*'.'<br />'; }
                        
                        // should "msg_bootstrap" code go here?
                        
@@ -169,7 +169,7 @@
                        
                        if ($this->debug > 2) { echo 
'class.bomessage.*constructor* ('.__LINE__.'): langs put in $this->xi 
DUMP:<pre>'; print_r($this->xi); echo '</pre>'; } 
                        
-                       if ($this->debug > 0) { echo 'LEAVING: 
email.bomessage.*constructor*'.'<br>'; }
+                       if ($this->debug > 0) { echo 'LEAVING: 
email.bomessage.*constructor*'.'<br />'; }
                        
                        // also, this "return" *may* (need to check) effect 
constructor of a a inherit-ee roll thru the constructoes
                        // uncomment the return when we understand implications 
of it geing here.
@@ -194,7 +194,7 @@
                                $this->msg =& $GLOBALS['phpgw']->msg;
                        }
                        // now we can use msg object debug calls
-                       if ($this->debug > 0) { 
$this->msg->dbug->out('ENTERING: 
email.bomessage.message_data('.__LINE__.')'.'<br>'); }
+                       if ($this->debug > 0) { 
$this->msg->dbug->out('ENTERING: 
email.bomessage.message_data('.__LINE__.')'.'<br />'); }
                        
                        
                        // ---- BEGIN BOMESSAGE ----
@@ -333,7 +333,7 @@
                                // expire the cached "phpgw_header" for this 
specific message, 
                                // cached data says the message is unseen, yet 
we are about to see it right now!
                                $specific_key = 
(string)$msgball['msgnum'].'_'.$msgball['folder'];
-                               if ($this->debug > 1) { echo 
'email.bomessage.message_data: cached SEEN-UNSEEN "phpgw_header" needs expired 
this specific message we are about to VIEW, $specific_key 
['.$specific_key.']<br>'; }
+                               if ($this->debug > 1) { echo 
'email.bomessage.message_data: cached SEEN-UNSEEN "phpgw_header" needs expired 
this specific message we are about to VIEW, $specific_key 
['.$specific_key.']<br />'; }
                                
$GLOBALS['phpgw']->msg->expire_session_cache_item('phpgw_header', 
$msgball['acctnum'], $specific_key);
                        }
                        */
@@ -356,7 +356,7 @@
                        {
                                $msg_date2 = substr($msg_date2,$comma + 2);
                        }
-                       //echo 'Msg Date : '.$msg_date."<br>\n";
+                       //echo 'Msg Date : '.$msg_date."<br />\n";
                        $dta = array();
                        $ta = array();
                   
@@ -389,11 +389,11 @@
 $new_time2=gmdate("D, d M Y H:m:s",$new_time)." GMT";
 $msg_headers->date = $new_time2;
 $msg_headers->udate = $new_time;
-#echo("<br>Hora cojonuda: $new_time2");
-#echo"udate $msg_headers->udate<br>";
-#echo"date $msg_headers->date<br>";
-#echo"$new_time<br>";
-#echo("estamos en bomessage 589<br>");
+#echo("<br />Hora cojonuda: $new_time2");
+#echo"udate $msg_headers->udate<br />";
+#echo"date $msg_headers->date<br />";
+#echo"$new_time<br />";
+#echo("estamos en bomessage 589<br />");
 # end GMT handling by "acros"
                        */
 
@@ -502,7 +502,7 @@
 
                        }
                        
-                       //if ($this->debug > 0) { echo 'messages.php step3 
$nav_data[] $ilnk_prev_msg: '.$ilnk_prev_msg.'<br>'; }
+                       //if ($this->debug > 0) { echo 'messages.php step3 
$nav_data[] $ilnk_prev_msg: '.$ilnk_prev_msg.'<br />'; }
                        
                        // ----  "Go To Next Message" Handling  -----
                        // should be moved to emil / class.svc_nextmatches
@@ -527,7 +527,7 @@
                                $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');
                        }
                        
-                       //if ($this->debug > 0) { echo 'messages.php step4 
$nav_data[] $ilnk_next_msg: '.$ilnk_next_msg.'<br>'; }
+                       //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;
@@ -1219,7 +1219,7 @@
                        $count_part_nice = count($this->part_nice);
                        for ($i = 0; $i < $count_part_nice; $i++)
                        {
-                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): disp loop: 
'.($i+1).' of '.$count_part_nice.'<br>'); }
+                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): disp loop: 
'.($i+1).' of '.$count_part_nice.'<br />'); }
                                if ($this->debug > 3) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: 
$this->part_nice[$i] DUMP:', $this->part_nice[$i]); }
                                // Do We Break out of this Loop Block
                                if ($done_processing)
@@ -1241,7 +1241,7 @@
                                &&  (($this->part_nice[$i]['m_description'] == 
'container') 
                                || ($this->part_nice[$i]['m_description'] == 
'packagelist')) )
                                {
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: 
"Mime-Ignorant Email Server", Num Parts is 1 AND part is a container OR 
packagelist <br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: 
"Mime-Ignorant Email Server", Num Parts is 1 AND part is a container OR 
packagelist <br />'); }
                                        
                                        // ====  MIME IGNORANT SERVER  ====
                                        $title_text = '&nbsp;Mime-Ignorant 
Email Server: ';
@@ -1269,20 +1269,20 @@
                                        }
                                        $boundary = trim($boundary);
                                        /*
-                                       $dsp = '<br><br> === API STRUCT ==== 
<br><br>'
+                                       $dsp = '<br /><br /> === API STRUCT 
==== <br /><br />'
                                                
.'<pre>'.serialize($msg_struct).'</pre>'
-                                               //.'<br><br> === HEADERS ==== 
<br><br>'
+                                               //.'<br /><br /> === HEADERS 
==== <br /><br />'
                                                
//.'<pre>'.$msg_raw_headers.'</pre>'
-                                               .'<br><br> === 
struct->parameters ==== <br><br>'
+                                               .'<br /><br /> === 
struct->parameters ==== <br /><br />'
                                                
.'<pre>'.serialize($msg_struct->parameters).'</pre>'
-                                               .'<br><br> === BOUNDRY ==== 
<br><br>'
+                                               .'<br /><br /> === BOUNDRY ==== 
<br /><br />'
                                                
.'<pre>'.serialize($boundary).'</pre>'
-                                               .'<br><br> === BODY ==== 
<br><br>';
+                                               .'<br /><br /> === BODY ==== 
<br /><br />';
                                                
.'<pre>'.serialize($msg_body).'</pre>';
                                        */
-                                       $dsp = '<br> === BOUNDRY ==== <br>'
-                                               .'<pre>'.$boundary.'</pre> <br>'
-                                               .'<br> === BODY ==== <br><br>';
+                                       $dsp = '<br /> === BOUNDRY ==== <br />'
+                                               .'<pre>'.$boundary.'</pre> <br 
/>'
+                                               .'<br /> === BODY ==== <br 
/><br />';
                                        $this_msgball = $msgball;
                                        $this_msgball['part_no'] = 
$this->part_nice[$i]['m_part_num_mime'];
                                        $dsp .= 
$GLOBALS['phpgw']->msg->phpgw_fetchbody($this_msgball);
@@ -1303,7 +1303,7 @@
                                && (($this->part_nice[$i]['m_part_num_mime'] == 
1) || ((string)$this->part_nice[$i]['m_part_num_mime'] == '1.1'))
                                && ((int)$this->part_nice[$i]['bytes'] > 
$force_echo_size))
                                {
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: ECHO 
OUT: part meets five criteria <br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: ECHO 
OUT: part meets five criteria <br />'); }
                                        
                                        $title_text = 
'&nbsp;'.$this->xi['lang_message'].': ';
                                        $display_str = 
$this->xi['lang_keywords'].': '.$this->part_nice[$i]['m_keywords'].' - 
'.$GLOBALS['phpgw']->msg->format_byte_size($this->part_nice[$i]['bytes'])
@@ -1355,7 +1355,7 @@
                                // enriched = part of APPLE MAIL multipart / 
alternative subpart where the html part usually is
                                // HOWEVER enriched is not complete html so it 
will not render anything special in a browser so we can NOT treat enriched like 
html
                                {
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is HTML, presentable <br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is HTML, presentable <br />'); }
                                        
                                        // get the body
                                        $this_msgball = $msgball;
@@ -1408,7 +1408,7 @@
                                        //|| 
(stristr($this->part_nice[$parent_idx]['subtype'], 'RELATED')))
                                        )
                                        {
-                                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: * 
part is RELATED, HTML, presentable <br>'); }
+                                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: * 
part is RELATED, HTML, presentable <br />'); }
                                                // typically it's the NEXT mime 
part that should be inserted into this one
                                                for ($rel = $i+1; $rel < 
count($this->part_nice)+1; $rel++)
                                                {
@@ -1423,8 +1423,8 @@
                                                                $part_href = 
$this->part_nice[$rel]['ex_part_href'];
                                                                //$part_href = 
'"'.$this->part_nice[$rel]['ex_part_href'].'"';
                                                                
-                                                               //echo '<br> 
**replace_id (pre-processing): ' .$replace_id .'<br>';
-                                                               //echo 
'part_href (processed): ' .$part_href .'<br>';
+                                                               //echo '<br /> 
**replace_id (pre-processing): ' .$replace_id .'<br />';
+                                                               //echo 
'part_href (processed): ' .$part_href .'<br />';
                                                                
                                                                // strip <  and 
 >  from this ID
                                                                $replace_id = 
ereg_replace( '^<','',$replace_id);
@@ -1432,7 +1432,7 @@
                                                                // id 
references are typically preceeded with "cid:"
                                                                $replace_id = 
'cid:' .$replace_id;
                                                                
-                                                               //echo 
'**replace_id (post-processing): ' .$replace_id .'<br>';
+                                                               //echo 
'**replace_id (post-processing): ' .$replace_id .'<br />';
                                                                
                                                                // Attempt the 
Search and Replace
                                                                $dsp = 
str_replace($replace_id, $part_href, $dsp);
@@ -1451,7 +1451,7 @@
                                                
                                                if 
(preg_match("/<iframe.*>.*<\/iframe>/ismx", $dsp))
                                                {
-                                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
** HAS IFRAME <br>'); }
+                                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
** HAS IFRAME <br />'); }
                                                        
//$this->part_nice[$i]['d_threat_level'] .= 'warn_HAS_IFRAME_maybe_KLEZ ';
                                                        
$this->part_nice[$i]['d_threat_level'] .= 
$this->xi['lang_warn_has_iframe_maybe_klez'].' ';
                                                }
@@ -1567,7 +1567,7 @@
                                        // DETECT IFRAME TRICK
                                        //if (stristr($dsp, '<iframe'))
                                        //{
-                                       //      if ($this->debug > 2) { echo 
'email.bomessage.message_data: d_loop: part ** HAS IFRAME <br>'; }
+                                       //      if ($this->debug > 2) { echo 
'email.bomessage.message_data: d_loop: part ** HAS IFRAME <br />'; }
                                        //      
$this->part_nice[$i]['d_threat_level'] .= 'warn_HAS_IFRAME_maybe_KLEZ ';
                                        //}
                                        
@@ -1582,7 +1582,7 @@
                                && ($this->hide_alt_hide == True))
                                {
                                        // is this a multipart alternative set, 
and this is the plain part, and do not want to show it
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable BUT it is alt_hide so we do NOT want to show it <br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable BUT it is alt_hide so we do NOT want to show it <br />'); }
                                        
                                        // ----  DISPLAY INSTRUCTIONS  ----
                                        $this->part_nice[$i]['d_instructions'] 
= 'skip';
@@ -1593,7 +1593,7 @@
                                }
                                elseif ($this->part_nice[$i]['m_description'] 
== 'presentable')
                                {
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable (non-html) <br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable (non-html) <br />'); }
                                        
                                        // ----- get the part from the server
                                        $this_msgball = $msgball;
@@ -1618,7 +1618,7 @@
                                        $colon = chr(58);
                                        $dsp = str_replace($colon, " colon ", 
$dsp);
                                        
-                                       echo 
'<br>'.$this->part_nice[$i]['m_part_num_mime'].'<br>';
+                                       echo '<br 
/>'.$this->part_nice[$i]['m_part_num_mime'].'<br />';
                                        var_dump($dsp);
                                        */
                                        
@@ -1694,10 +1694,10 @@
                                                                //$dsp = 
$GLOBALS['phpgw']->msg->space_to_nbsp($dsp);
                                                        //}
                                                        $dsp = 
$GLOBALS['phpgw']->msg->make_clickable($dsp, 
$GLOBALS['phpgw']->msg->get_arg_value('["msgball"]["folder"]'));
-                                                       // (OPT 2) THIS 
CONVERTS UNFORMATTED TEXT TO *VERY* SIMPLE HTML - adds only <br>
-                                                       $dsp = 
ereg_replace("\r\n","<br>",$dsp);
+                                                       // (OPT 2) THIS 
CONVERTS UNFORMATTED TEXT TO *VERY* SIMPLE HTML - adds only <br />
+                                                       $dsp = 
ereg_replace("\r\n","<br />",$dsp);
                                                        // add a line after the 
last line of the message
-                                                       $dsp = $dsp .'<br><br>';
+                                                       $dsp = $dsp .'<br /><br 
/>';
                                                        // alternate (toggle) 
to view unformatted, for this we add "&no_fmt=1" to the URL
                                                        $view_option = 
$GLOBALS['phpgw']->msg->href_maketag($view_option_url.'&no_fmt=1', 
$this->xi['lang_view_unformatted']);
                                                        $view_option_ilnk = 
$GLOBALS['phpgw']->msg->href_maketag($view_option_url.'&no_fmt=1', 
$view_unformatted_img);
@@ -1744,7 +1744,7 @@
                                && ($this->hide_alt_hide == True))
                                {
                                        // is this a multipart alternative set, 
and this is the plain part, and do not want to show it
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable IMAGE BUT it is alt_hide because it is html related to a parent 
so we do NOT want to show it again<br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable IMAGE BUT it is alt_hide because it is html related to a parent 
so we do NOT want to show it again<br />'); }
                                        
                                        // ----  DISPLAY INSTRUCTIONS  ----
                                        $this->part_nice[$i]['d_instructions'] 
= 'skip';
@@ -1755,7 +1755,7 @@
                                }
                                elseif ($this->part_nice[$i]['m_description'] 
== 'presentable/image')
                                {
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is presentable image <br>'); }
+                                       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'];
                                        $display_str = 
$GLOBALS['phpgw']->msg->decode_header_string($this->part_nice[$i]['ex_part_name'])
@@ -1777,12 +1777,12 @@
                                }
                                elseif ($this->part_nice[$i]['m_description'] 
== 'attachment')
                                {
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is attachment <br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is attachment <br />'); }
                                        
                                        // if this is a 1 part message with 
only this attachment, WARN
                                        if (count($this->part_nice) == 1)
                                        {
-                                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: * 
WARN message has only 1 part and it is an attachment <br>'); }
+                                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: * 
WARN message has only 1 part and it is an attachment <br />'); }
                                                
//$this->part_nice[$i]['d_threat_level'] .= 'warn_attachment_only_mail ';
                                                
$this->part_nice[$i]['d_threat_level'] .= 
$this->xi['lang_warn_attachment_only_mail'].' ';
                                        }
@@ -1790,7 +1790,7 @@
                                        // warn for typically BAD attachments 
bat, inf, pif, con, reg, vbs, scr
                                        if 
(preg_match('/^.*\.(bat|inf|pif|com|exe|reg|vbs|scr)$/', 
$this->part_nice[$i]['ex_part_name']))
                                        {
-                                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: * 
WARN attachment has NEFARIOUS filename extension, ex_part_name: 
'.$this->part_nice[$i]['ex_part_name'].'<br>'); }
+                                               if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: * 
WARN attachment has NEFARIOUS filename extension, ex_part_name: 
'.$this->part_nice[$i]['ex_part_name'].'<br />'); }
                                                
//$this->part_nice[$i]['d_threat_level'] .= 'warn_attachment_name_DANGEROUS ';
                                                
$this->part_nice[$i]['d_threat_level'] .= 
$this->xi['lang_warn_attachment_name_dangerous'].' ';
                                        }
@@ -1804,7 +1804,7 @@
                                                .'&nbsp;&nbsp; 
'.$this->part_nice[$i]['ex_part_clickable']
                                                .'&nbsp;&nbsp; 
'.$this->xi['lang_size'].': 
'.$GLOBALS['phpgw']->msg->format_byte_size((int)$this->part_nice[$i]['bytes'])
                                                .'&nbsp;&nbsp; 
'.'<b>'.$this->part_nice[$i]['d_threat_level'].'</b>'
-                                               .'<br><br>';
+                                               .'<br /><br />';
                                        
                                        $this->part_nice[$i]['message_body'] = 
$msg_text;
                                        
@@ -1820,7 +1820,7 @@
                                elseif (($this->part_nice[$i]['m_description'] 
!= 'container')
                                && ($this->part_nice[$i]['m_description'] != 
'packagelist'))
                                {
-                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is ERROR - unknown <br>'); }
+                                       if ($this->debug > 2) { 
$this->msg->dbug->out('email.bomessage.message_data('.__LINE__.'): d_loop: part 
is ERROR - unknown <br />'); }
                                        
                                        // if we get here then we've got some 
kind of error, all things we know about are handle above
                                        $title_text = 
$this->xi['lang_section'].': '.$this->part_nice[$i]['m_part_num_mime'];
@@ -1833,14 +1833,14 @@
                                        
                                        $msg_text = '';
                                        // UNKNOWN DATA
-                                       $msg_text = $msg_text 
.'<br><strong>'.$this->xi['lang_error_unknown_message_data'].'</strong><br>';
+                                       $msg_text = $msg_text .'<br 
/><strong>'.$this->xi['lang_error_unknown_message_data'].'</strong><br />';
                                        if ($this->part_nice[$i]['encoding'] == 
'base64')
                                        {
                                                        $this_msgball = 
$msgball;
                                                        
$this_msgball['part_no'] = $this->part_nice[$i]['m_part_num_mime'];
                                                        $dsp = 
$GLOBALS['phpgw']->msg->phpgw_fetchbody($this_msgball);
                                                        //$dsp = 
$GLOBALS['phpgw']->dcom->fetchbody($mailbox, 
$GLOBALS['phpgw']->msg->get_arg_value('msgnum'), 
$this->part_nice[$i]['m_part_num_mime']);
-                                                       //$processed_msg_body = 
$processed_msg_body . base64_decode($dsp) .'<br>' ."\r\n";
+                                                       //$processed_msg_body = 
$processed_msg_body . base64_decode($dsp) .'<br />' ."\r\n";
                                                $msg_text = $msg_text . 'actual 
part size: ' .strlen($dsp);
                                        }
                                        
//$GLOBALS['phpgw']->template->set_var('message_body',$msg_text);




reply via email to

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