phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: felamimail/inc class.bocompose.inc.php,1.1.1.1.2


From: Lars Kneschke <address@hidden>
Subject: [Phpgroupware-cvs] CVS: felamimail/inc class.bocompose.inc.php,1.1.1.1.2.11,1.1.1.1.2.11.2.1 class.bofelamimail.inc.php,1.2.2.12.2.1,1.2.2.12.2.2 class.bofilter.inc.php,1.1.2.3,1.1.2.3.2.1 class.bopreferences.inc.php,1.1.1.1.2.10.2.1,1.1.1.1.2.10.2.2 class.socaching.inc.php,1.1.1.1.2.7.2.1,1.1.1.1.2.7.2.2 class.sofilter.inc.php,1.1.2.2,1.1.2.2.2.1 class.uidisplay.inc.php,1.1.2.4.2.1,1.1.2.4.2.2 class.uifelamimail.inc.php,1.2.2.12.2.2,1.2.2.12.2.3 hook_preferences.inc.php,1.2.2.7,1.2.2.7.2.1 hook_settings.inc.php,1.1.2.3.2.3,1.1.2.3.2.4
Date: Sun, 25 May 2003 15:37:42 -0400

Update of /cvsroot/phpgroupware/felamimail/inc
In directory subversions:/tmp/cvs-serv21000/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.bocompose.inc.php class.bofelamimail.inc.php 
        class.bofilter.inc.php class.bopreferences.inc.php 
        class.socaching.inc.php class.sofilter.inc.php 
        class.uidisplay.inc.php class.uifelamimail.inc.php 
        hook_preferences.inc.php hook_settings.inc.php 
Log Message:
- improved mime type handling
- also forward attachments
- support üöä... in folder names
- support html emails(most evil tags get removed)
- code cleanup



Index: class.bocompose.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bocompose.inc.php,v
retrieving revision 1.1.1.1.2.11
retrieving revision 1.1.1.1.2.11.2.1
diff -C2 -r1.1.1.1.2.11 -r1.1.1.1.2.11.2.1
*** class.bocompose.inc.php     19 Mar 2003 22:28:50 -0000      1.1.1.1.2.11
--- class.bocompose.inc.php     25 May 2003 19:37:39 -0000      1.1.1.1.2.11.2.1
***************
*** 141,150 ****
                        $this->sessionData['subject'] = "[FWD: " . 
$bofelamimail->decode_header($headers->Subject)."]";
  
!                       $structure     = 
$bofelamimail->getMessageStructure($_uid, ST_UID);
!                       if(sizeof($structure->parts) > 1)
!                       {
!                               $sections = $bofelamimail->parse($structure);
!                               $attachments = 
$bofelamimail->get_attachments($sections);
!                       }
                        
                        $this->sessionData['body']       = "                  
-----------Originalnachricht-----------\n\n";
--- 141,150 ----
                        $this->sessionData['subject'] = "[FWD: " . 
$bofelamimail->decode_header($headers->Subject)."]";
  
!                       #$structure     = 
$bofelamimail->getMessageStructure($_uid, ST_UID);
!                       #if(sizeof($structure->parts) > 1)
!                       #{
!                       #       $sections = $bofelamimail->parse($structure);
!                       #       $attachments = 
$bofelamimail->get_attachments($sections);
!                       #}
                        
                        $this->sessionData['body']       = "                  
-----------Originalnachricht-----------\n\n";
***************
*** 155,183 ****
                        // iterate through message parts
                        // get the body
!                       $bodyParts = $bofelamimail->getMessageBody($_uid);
                        for($i=0; $i<count($bodyParts); $i++)
                        {
!                               $this->sessionData['body']      .= 
$bodyParts[$i];
                        }
! /*                    if(is_array($sections))
                        {
!                               for($x=0; $x<sizeof($sections); $x++)
                                {
!                                       // if text type, display
!                                       if($sections[$x]["type"] == 
"text/plain" && $sections[$x]["disposition"] 
!                                               != "attachment")
                                        {
!                                               $bodyPart = 
$bofelamimail->getMessageBody($_uid, $sections[$x]["pid"], ST_UID);
!                                               $this->sessionData['body'] .= 
quoted_printable_decode($bodyPart);
                                        }
                                }
                        }
!                       else
!                       {
!                               $this->sessionData['body']      .= 
$bofelamimail->getMessageBody($_uid, '', ST_UID);
!                       }
! */                                                                            
                                                
!                       $this->sessionData['body']       .= "\n\n               
   -----------Originalnachricht-----------\n\n";
!                                       
                        $bofelamimail->closeConnection();
                        
--- 155,215 ----
                        // iterate through message parts
                        // get the body
!                       $bodyParts = $bofelamimail->getMessageBody($_uid, 
'only_if_no_text');
                        for($i=0; $i<count($bodyParts); $i++)
                        {
!                               $this->sessionData['body']      .= 
$bodyParts[$i]['body'];
                        }
!                       
!                       $this->sessionData['body']       .= "\n\n               
   -----------Originalnachricht-----------\n\n";
!                                       
!                       $attachments = 
$bofelamimail->getMessageAttachments($_uid);
!                       if(is_array($attachments))
                        {
!                               // ensure existance of PHPGROUPWARE temp dir
!                               // note: this is different from apache temp 
dir, 
!                               // and different from any other temp file 
location set in php.ini
!                               if 
(!file_exists($GLOBALS['phpgw_info']['server']['temp_dir']))
                                {
!                                       
@mkdir($GLOBALS['phpgw_info']['server']['temp_dir'],0700);
!                               }
!                               
!                               // if we were NOT able to create this temp 
directory, then make an ERROR report
!                               if 
(!file_exists($GLOBALS['phpgw_info']['server']['temp_dir']))
!                               {
!                                       $alert_msg .= 'Error:'.'<br>'
!                                               .'Server is unable to access 
phpgw tmp directory'.'<br>'
!                                               
.$phpgw_info['server']['temp_dir'].'<br>'
!                                               .'Please check your 
configuration'.'<br>'
!                                               .'<br>';
!                               }
! 
!                               while(list($partID, $partData) = 
each($attachments))
!                               {
!                                       $attachmentData = 
$bofelamimail->getAttachment($_uid, $partID);
!                                       #_debug_array($attachmentData);
!                                       
!                                       $tmpFileName = 
$GLOBALS['phpgw_info']['server']['temp_dir'].
!                                               SEP.
!                                               
$GLOBALS['phpgw_info']['user']['account_id'].
!                                               $this->composeID.
!                                               
basename($attachmentData['filename']);
!                               
!                                       if ($handle = fopen($tmpFileName, 'w')) 
                                        {
!                                               fwrite($handle, 
$attachmentData['attachment']);
!                                               fclose($handle);
!                               
!                                               
$this->sessionData['attachments'][]=array
!                                               (
!                                                       'name'  => 
$attachmentData['filename'],
!                                                       'type'  => 
$attachmentData['type'],
!                                                       'file'  => $tmpFileName,
!                                                       'size'  => 
filesize($tmpFileName)
!                                               );
!                                               
                                        }
                                }
                        }
!                                                                               
                                                
                        $bofelamimail->closeConnection();
                        
***************
*** 281,295 ****
                        }
  
!                       $structure = $bofelamimail->getMessageStructure($_uid);
!                       if(sizeof($structure->parts) > 1)
!                       {
!                               $sections = $bofelamimail->parse($structure);
!                               $attachments = 
$bofelamimail->get_attachments($sections);
!                       }
                        
                        $this->sessionData['body']      = $headers->fromaddress 
. " ".lang("wrote").": \n>";
                        
                        // get the body
!                       $bodyParts = $bofelamimail->getMessageBody($_uid);
  
                        for($i=0; $i<count($bodyParts); $i++)
--- 313,327 ----
                        }
  
!                       #$structure = $bofelamimail->getMessageStructure($_uid);
!                       #if(sizeof($structure->parts) > 1)
!                       #{
!                       #       $sections = $bofelamimail->parse($structure);
!                       #       $attachments = 
$bofelamimail->get_attachments($sections);
!                       #}
                        
                        $this->sessionData['body']      = $headers->fromaddress 
. " ".lang("wrote").": \n>";
                        
                        // get the body
!                       $bodyParts = $bofelamimail->getMessageBody($_uid, 
'only_if_no_text');
  
                        for($i=0; $i<count($bodyParts); $i++)
***************
*** 297,301 ****
                                if(!empty($this->sessionData['body'])) 
$$this->sessionData['body'] .= "\n\n";
                                // add line breaks to $bodyParts
!                               $newBody        = explode("\n",$bodyParts[$i]);
                                
                                // create it new, with good line breaks
--- 329,333 ----
                                if(!empty($this->sessionData['body'])) 
$$this->sessionData['body'] .= "\n\n";
                                // add line breaks to $bodyParts
!                               $newBody        = 
explode("\n",$bodyParts[$i]['body']);
                                
                                // create it new, with good line breaks
***************
*** 514,520 ****
                        }
  
                        while(list($key,$value) = 
@each($this->sessionData['attachments']))
                        {
!                               #print "$key: $value<br>";
                                unlink($value['file']);
                        }
--- 546,553 ----
                        }
  
+                       reset($this->sessionData['attachments']);
                        while(list($key,$value) = 
@each($this->sessionData['attachments']))
                        {
!                               #print "$key: ".$value['file']."<br>";
                                unlink($value['file']);
                        }
***************
*** 522,526 ****
                        $this->sessionData = '';
                        $this->saveSessionData();
!                       
                        return true;
                }
--- 555,559 ----
                        $this->sessionData = '';
                        $this->saveSessionData();
! 
                        return true;
                }

Index: class.bofelamimail.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bofelamimail.inc.php,v
retrieving revision 1.2.2.12.2.1
retrieving revision 1.2.2.12.2.2
diff -C2 -r1.2.2.12.2.1 -r1.2.2.12.2.2
*** class.bofelamimail.inc.php  2 May 2003 06:57:07 -0000       1.2.2.12.2.1
--- class.bofelamimail.inc.php  25 May 2003 19:37:39 -0000      1.2.2.12.2.2
***************
*** 29,32 ****
--- 29,38 ----
                // message encodings
                var $encoding = array("7bit", "8bit", "binary", "base64", 
"quoted-printable", "other");
+               
+               // set to true, if php is compiled with multi byte string 
support
+               var $mbAvailable = FALSE;
+ 
+               // what type of mimeTypes do we want from the body(text/html, 
text/plain)
+               var $htmlOptions;
  
[...995 lines suppressed...]
!                       }
! 
!                       #if ($_partID == '') _debug_array($retData);
!                       
!                       return $retData;
                }
                
***************
*** 1294,1298 ****
                        #$this->mailPreferences['imapPort'],
                        
!                       $folderName = imap_utf7_encode($_folderName);
                        $folderName = 
"{".$this->mailPreferences['imapServerAddress'].":".$this->mailPreferences['imapPort']."}".$folderName;
                        
--- 1230,1234 ----
                        #$this->mailPreferences['imapPort'],
                        
!                       $folderName = $this->encodeFolderName($_folderName);
                        $folderName = 
"{".$this->mailPreferences['imapServerAddress'].":".$this->mailPreferences['imapPort']."}".$folderName;
                        

Index: class.bofilter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bofilter.inc.php,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.3.2.1
diff -C2 -r1.1.2.3 -r1.1.2.3.2.1
*** class.bofilter.inc.php      11 Mar 2003 00:20:32 -0000      1.1.2.3
--- class.bofilter.inc.php      25 May 2003 19:37:39 -0000      1.1.2.3.2.1
***************
*** 62,67 ****
                function restoreSessionData()
                {
                        $this->sessionData = 
$GLOBALS['phpgw']->session->appsession('filter_session_data');
!                       $this->sessionData['filter'] = 
$this->sofilter->restoreFilter();
                }
                
--- 62,99 ----
                function restoreSessionData()
                {
+                       $arrayFunctions = 
CreateObject('phpgwapi.arrayfunctions');
+ 
                        $this->sessionData = 
$GLOBALS['phpgw']->session->appsession('filter_session_data');
! 
!                       // sort the filter list
!                       $unsortedFilter = $this->sofilter->restoreFilter();
!                       
!                       // save the quicksearchfilter
!                       // must always have id=0
!                       if(is_array($unsortedFilter[0]))
!                       {
!                               $quickSearchFilter[0] = $unsortedFilter[0];
!                               unset($unsortedFilter[0]);
!                       }
!                       // or create the array
!                       else
!                       {
!                               $quickSearchFilter[0] = array('filterName' => 
lang('quicksearch'));
!                       }
!                       
!                       // _debug_array($this->sessionData['filter']);
!                       // the first one is always the quicksearch filter
!                       if(count($unsortedFilter) > 0)
!                       {
!                               $sortedFilter = 
$arrayFunctions->arfsort($unsortedFilter, array('filterName'));
!                               $sortedFilter = array_merge($quickSearchFilter, 
$sortedFilter);
!                       }
!                       else
!                       {
!                               $sortedFilter = $quickSearchFilter;
!                       }
!                       #_debug_array($sortedFilter);
! 
!                       $this->sessionData['filter'] = $sortedFilter;
                }
                
***************
*** 80,83 ****
--- 112,121 ----
                                $data['filterActive']= "true";
                        }
+                       
+                       if(!is_array($this->sessionData['filter']))
+                       {
+                               print "<font color=\"red\">reset 
array</font><br>";
+                               $this->sessionData['filter'] = array();
+                       }
  
                        if($_filterID == '')
***************
*** 89,92 ****
--- 127,131 ----
                                $this->sessionData['filter'][$_filterID] = 
$data;
                        }
+                       
                        $this->saveSessionData();
                        
***************
*** 105,121 ****
                }
                
- /*            function toggleFilter()
-               {
-                       if($this->sessionData['filter']['filterActive'] == 
'true')
-                       {
-                               $this->sessionData['filter']['filterActive'] = 
'false';
-                       }
-                       else
-                       {
-                               $this->sessionData['filter']['filterActive'] = 
'true';
-                       }
-                       $this->saveSessionData();
-               }*/
-               
                function updateFilter($_data)
                {
--- 144,147 ----
***************
*** 126,130 ****
                        if($activeFilter == $_data['filter'] && 
isset($_data['quickSearch']))
                        {
!                               #print "new Quickfilter $_quickSearch";exit;
                                if($_data['quickSearch'] == '')
                                {
--- 152,156 ----
                        if($activeFilter == $_data['filter'] && 
isset($_data['quickSearch']))
                        {
!                               #print "&nbsp;new Quickfilter 
$_quickSearch<br>";
                                if($_data['quickSearch'] == '')
                                {

Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bopreferences.inc.php,v
retrieving revision 1.1.1.1.2.10.2.1
retrieving revision 1.1.1.1.2.10.2.2
diff -C2 -r1.1.1.1.2.10.2.1 -r1.1.1.1.2.10.2.2
*** class.bopreferences.inc.php 1 May 2003 18:33:25 -0000       1.1.1.1.2.10.2.1
--- class.bopreferences.inc.php 25 May 2003 19:37:39 -0000      1.1.1.1.2.10.2.2
***************
*** 152,155 ****
--- 152,157 ----
                        }
                        
+                       $data['htmlOptions'] = 
$userPrefs['felamimail']['htmlOptions'];
+                       
                        // where is the trash folder
                        $data['trash_folder']           = 
$userPrefs['felamimail']['trashFolder'];

Index: class.socaching.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.socaching.inc.php,v
retrieving revision 1.1.1.1.2.7.2.1
retrieving revision 1.1.1.1.2.7.2.2
diff -C2 -r1.1.1.1.2.7.2.1 -r1.1.1.1.2.7.2.2
*** class.socaching.inc.php     2 May 2003 06:57:07 -0000       1.1.1.1.2.7.2.1
--- class.socaching.inc.php     25 May 2003 19:37:39 -0000      1.1.1.1.2.7.2.2
***************
*** 70,74 ****
                                        }
                                }
!                               $filter = " and ($filter) ";
                                return $filter;
                        }
--- 70,74 ----
                                        }
                                }
!                               if($filter != '') $filter = " and ($filter) ";
                                return $filter;
                        }
***************
*** 87,91 ****
                                         addslashes($this->foldername), 
addslashes($this->accountname),
                                         $filter);
-                       #print "$query<br>";
                        
                        if($_firstMessage == '' && $_numberOfMessages == '')
--- 87,90 ----
***************
*** 171,175 ****
                                        }
                                }
!                               $filter = " and ($filter) ";
                        }
                        
--- 170,174 ----
                                        }
                                }
!                               if($filter !='') $filter = " and ($filter) ";
                        }
                        
***************
*** 179,183 ****
                                         addslashes($this->foldername), 
addslashes($this->accountname),
                                         $filter);
!                       #print "$query<br>";
                        
                        $this->db->query("$query",__LINE__,__FILE__);
--- 178,182 ----
                                         addslashes($this->foldername), 
addslashes($this->accountname),
                                         $filter);
!                       #print "<br>$query<br>";
                        
                        $this->db->query("$query",__LINE__,__FILE__);

Index: class.sofilter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/Attic/class.sofilter.inc.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.2.1
diff -C2 -r1.1.2.2 -r1.1.2.2.2.1
*** class.sofilter.inc.php      11 Mar 2003 00:20:32 -0000      1.1.2.2
--- class.sofilter.inc.php      25 May 2003 19:37:39 -0000      1.1.2.2.2.1
***************
*** 32,37 ****
                function saveFilter($_filterArray)
                {
!                       #print_r($_filterArray);exit;
!                       $data = 
$GLOBALS['phpgw']->crypto->encrypt($_filterArray);
                        $query = sprintf("delete from 
phpgw_felamimail_displayfilter where accountid='%s'",
                                $this->accountid);
--- 32,37 ----
                function saveFilter($_filterArray)
                {
!                       #$data = 
$GLOBALS['phpgw']->crypto->encrypt($_filterArray);
!                       $data = addslashes(serialize($_filterArray));
                        $query = sprintf("delete from 
phpgw_felamimail_displayfilter where accountid='%s'",
                                $this->accountid);
***************
*** 41,45 ****
                                $this->accountid,$data);
                        $GLOBALS['phpgw']->db->query($query);
!                       
                        unset($this->sessionData['filter'][$_filterID]);
                }
--- 41,45 ----
                                $this->accountid,$data);
                        $GLOBALS['phpgw']->db->query($query);
! 
                        unset($this->sessionData['filter'][$_filterID]);
                }
***************
*** 54,58 ****
                        {
                                $GLOBALS['phpgw']->db->next_record();
!                               $filter = 
$GLOBALS['phpgw']->crypto->decrypt($GLOBALS['phpgw']->db->f('filter'));
                                return $filter;
                        }
--- 54,59 ----
                        {
                                $GLOBALS['phpgw']->db->next_record();
!                               #$filter = 
$GLOBALS['phpgw']->crypto->decrypt($GLOBALS['phpgw']->db->f('filter'));
!                               $filter = 
unserialize($GLOBALS['phpgw']->db->f('filter'));
                                return $filter;
                        }

Index: class.uidisplay.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.uidisplay.inc.php,v
retrieving revision 1.1.2.4.2.1
retrieving revision 1.1.2.4.2.2
diff -C2 -r1.1.2.4.2.1 -r1.1.2.4.2.2
*** class.uidisplay.inc.php     2 May 2003 06:57:07 -0000       1.1.2.4.2.1
--- class.uidisplay.inc.php     25 May 2003 19:37:39 -0000      1.1.2.4.2.2
***************
*** 63,66 ****
--- 63,67 ----
                {
                        $transformdate  = 
CreateObject('felamimail.transformdate');
+                       $htmlFilter     = CreateObject('felamimail.htmlfilter');
  
                        $headers        = 
$this->bofelamimail->getMessageHeader($this->uid);
***************
*** 343,346 ****
--- 344,449 ----
                                $this->t->set_var("view_header",lang('show 
header'));
                        }
+ 
+ #$tag_list = Array(
+ #                  false,
+ #                  'blink',
+ #                  'object',
+ #                  'meta',
+ #                  'font',
+ #                  'html',
+ #                  'link',
+ #                  'frame',
+ #                  'iframe',
+ #                  'layer',
+ #                  'ilayer'
+ #                 );
+ 
+ $tag_list = Array(true, "b", "a", "i", "img", "strong", "em", "p");
+ $tag_list = Array(true, "b", "a", "i", "strong", 'pre', 
+                       "em", "p", 'td', 'tr', 'table', 
+                       'font', 'hr', 'br', 'div');
+ 
+ $rm_tags_with_content = Array(
+                               'script',
+                               'style',
+                               'applet',
+                               'embed',
+                               'head',
+                               'frameset',
+                               'xml'
+                               );
+ 
+ $self_closing_tags =  Array(
+                             'img',
+                             'br',
+                             'hr',
+                             'input'
+                             );
+ 
+ $force_tag_closing = false;
+ 
+ $rm_attnames = Array(
+     '/.*/' =>
+         Array(
+               '/target/i',
+               '/^on.*/i',
+               '/^dynsrc/i',
+               '/^datasrc/i',
+               '/^data.*/i',
+               '/^lowsrc/i'
+               )
+     );
+ 
+ /**
+  * Yeah-yeah, so this looks horrible. Check out htmlfilter.inc for
+  * some idea of what's going on here. :)
+  */
+ 
+ $bad_attvals = Array(
+     '/.*/' =>
+         Array(
+             '/.*/' =>
+                 Array(
+                       Array(
+                           '/^([\'\"])\s*\S+\s*script\s*:*(.*)([\'\"])/i',
+ #                          '/^([\'\"])\s*https*\s*:(.*)([\'\"])/i',
+                           '/^([\'\"])\s*mocha\s*:*(.*)([\'\"])/i',
+                           '/^([\'\"])\s*about\s*:(.*)([\'\"])/i'
+                            ),
+                       Array(
+                       '\\1oddjob:\\2\\3',
+ #                      '\\1uucp:\\2\\3',
+                       '\\1amaretto:\\2\\3',
+                       '\\1round:\\2\\3'
+                            )
+                       ),     
+                                               
+               '/^style/i' =>
+                   Array(
+                         Array(
+                               '/expression/i',
+                               '/behaviou*r/i',
+                               '/binding/i',
+                               '/url\(([\'\"]*)\s*https*:.*([\'\"]*)\)/i',
+                               '/url\(([\'\"]*)\s*\S+script:.*([\'\"]*)\)/i'
+                              ),
+                         Array(
+                               'idiocy',
+                               'idiocy',
+                               'idiocy',
+                               'url(\\1http://securityfocus.com/\\2)',
+                               'url(\\1http://securityfocus.com/\\2)'
+                              )
+                         )
+               )
+     );
+ 
+ $add_attr_to_tag = Array(
+                          '/^a$/i' => Array('target' => '"_new"')
+                          );
+                          $add_attr_to_tag = Array();
+ 
+                       
+                       
                        for($i=0; $i<count($bodyParts); $i++ )
                        {
***************
*** 360,365 ****
  
                                // add line breaks to $bodyParts
!                               $newBody        = 
wordwrap($bodyParts[$i],90,"\n",1);
!                               $body .= htmlspecialchars($newBody,ENT_QUOTES);
                                #print "<hr><pre>$body</pre><hr>";
                        }
--- 463,486 ----
  
                                // add line breaks to $bodyParts
!                               #$newBody       = 
wordwrap($bodyParts[$i],90,"\n",1);
!                               #$newBody       = 
wordwrap($bodyParts[$i],90,"<br>",1);
!                               if($bodyParts[$i]['mimeType'] == 'text/plain')
!                               {
!                                       #$newBody       = 
ereg_replace("\n","<br>",$bodyParts[$i]['body']);
!                                       
!                                       $newBody        = 
wordwrap($bodyParts[$i]['body'],90,"\n",1);
!                                       $newBody        = 
htmlspecialchars($newBody,ENT_QUOTES);
!                                       $newBody        = 
"<pre>".$newBody."</pre>";
!                                       
!                               }
!                               else
!                               {
!                                       $newBody        = 
$bodyParts[$i]['body'];
!                                       $newBody        = 
$htmlFilter->sanitize($newBody,
!                                                               $tag_list, 
$rm_tags_with_content,
!                                                               
$self_closing_tags, $force_tag_closing,
!                                                               $rm_attnames, 
$bad_attvals, $add_attr_to_tag);
!                               }
!                               $body .= $newBody;
                                #print "<hr><pre>$body</pre><hr>";
                        }
***************
*** 389,393 ****
                        
                        // make the signate light grey
!                       $body = preg_replace("/(--)/im","<font 
color=\"grey\">$1</font>", $body);
                        
                        // create links for email addresses
--- 510,514 ----
                        
                        // make the signate light grey
!                       #$body = preg_replace("/(--)/im","<font 
color=\"grey\">$1</font>", $body);
                        
                        // create links for email addresses
***************
*** 415,419 ****
                                        
$this->t->set_var('row_color',$this->rowColor[($key+1)%2]);
                                        
$this->t->set_var('filename',htmlentities($this->bofelamimail->decode_header($value['name'])));
!                                       
$this->t->set_var('mimetype',$value['type']);
                                        
$this->t->set_var('size',$value['size']);
                                        
$this->t->set_var('attachment_number',$key);
--- 536,540 ----
                                        
$this->t->set_var('row_color',$this->rowColor[($key+1)%2]);
                                        
$this->t->set_var('filename',htmlentities($this->bofelamimail->decode_header($value['name'])));
!                                       
$this->t->set_var('mimetype',$value['mimeType']);
                                        
$this->t->set_var('size',$value['size']);
                                        
$this->t->set_var('attachment_number',$key);
***************
*** 422,426 ****
                                                'menuaction'    => 
'felamimail.uidisplay.getAttachment',
                                                'uid'           => $this->uid,
!                                               'part'          => $value['pid']
                                        );
                                        
$this->t->set_var("link_view",$GLOBALS['phpgw']->link('/index.php',$linkData));
--- 543,547 ----
                                                'menuaction'    => 
'felamimail.uidisplay.getAttachment',
                                                'uid'           => $this->uid,
!                                               'part'          => 
$value['partID']
                                        );
                                        
$this->t->set_var("link_view",$GLOBALS['phpgw']->link('/index.php',$linkData));
***************
*** 431,435 ****
                                                'mode'          => 'save',
                                                'uid'           => $this->uid,
!                                               'part'          => $value['pid']
                                        );
                                        
$this->t->set_var("link_save",$GLOBALS['phpgw']->link('/index.php',$linkData));
--- 552,556 ----
                                                'mode'          => 'save',
                                                'uid'           => $this->uid,
!                                               'part'          => 
$value['partID']
                                        );
                                        
$this->t->set_var("link_save",$GLOBALS['phpgw']->link('/index.php',$linkData));

Index: class.uifelamimail.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.uifelamimail.inc.php,v
retrieving revision 1.2.2.12.2.2
retrieving revision 1.2.2.12.2.3
diff -C2 -r1.2.2.12.2.2 -r1.2.2.12.2.3
*** class.uifelamimail.inc.php  2 May 2003 06:57:07 -0000       1.2.2.12.2.2
--- class.uifelamimail.inc.php  25 May 2003 19:37:39 -0000      1.2.2.12.2.3
***************
*** 164,182 ****
                function changeFilter()
                {
-                       /*
-                       * The old code...
-                       *
-                       * if($GLOBALS['HTTP_POST_VARS']["changeFilter"] == 
'changeFilter' &&
-                       *       isset($GLOBALS['HTTP_POST_VARS']["filter"]))
-                       * {
-                       *       // change filter
-                       *       
$this->bofelamimail->sessionData['activeFilter'] = 
$GLOBALS['HTTP_POST_VARS']["filter"];
-                       * }
-                       * elseif(isset($GLOBALS['HTTP_GET_VARS']["filter"]))
-                       * {
-                       *       // change filter
-                       *       
$this->bofelamimail->sessionData['activeFilter'] = 
$GLOBALS['HTTP_GET_VARS']["filter"];
-                       * }
-                       */
                        if(isset($GLOBALS['HTTP_POST_VARS']["filter"]))
                        {
--- 164,167 ----
***************
*** 625,628 ****
--- 610,621 ----
  
                        $this->t->set_var('maxMessages',$i);
+                       if($GLOBALS['HTTP_GET_VARS']["select_all"] == 
"select_all")
+                       {
+                               $this->t->set_var('checkedCounter',$i);
+                       }
+                       else
+                       {
+                               $this->t->set_var('checkedCounter','0');
+                       }
                        
                        // set the select all/nothing link

Index: hook_preferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/hook_preferences.inc.php,v
retrieving revision 1.2.2.7
retrieving revision 1.2.2.7.2.1
diff -C2 -r1.2.2.7 -r1.2.2.7.2.1
*** hook_preferences.inc.php    11 Mar 2003 00:20:32 -0000      1.2.2.7
--- hook_preferences.inc.php    25 May 2003 19:37:39 -0000      1.2.2.7.2.1
***************
*** 23,31 ****
        $file = array(
                'Preferences'             => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=felamimail'),
- /*            'Mail Settings'           => 
$GLOBALS['phpgw']->link('/felamimail/preferences_email.php'),*/
- /*            'Message Highlighting'    => 
$GLOBALS['phpgw']->link('/felamimail/preferences_highlight.php'),*/
- /*            'Index Order'             => 
$GLOBALS['phpgw']->link('/felamimail/preferences_index_order.php'),*/
- /*            'Translation Preferences' => 
$GLOBALS['phpgw']->link('/felamimail/preferences_translate.php'),*/
- /*            'Display Preferences'     => 
$GLOBALS['phpgw']->link('/felamimail/preferences_display.php'),*/
                'Manage Sieve'            => 
$GLOBALS['phpgw']->link('/index.php',$sieveLinkData),
                'Manage Folders'          => 
$GLOBALS['phpgw']->link('/index.php','menuaction=felamimail.uipreferences.listFolder')
     
--- 23,26 ----

Index: hook_settings.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/hook_settings.inc.php,v
retrieving revision 1.1.2.3.2.3
retrieving revision 1.1.2.3.2.4
diff -C2 -r1.1.2.3.2.3 -r1.1.2.3.2.4
*** hook_settings.inc.php       5 May 2003 20:51:45 -0000       1.1.2.3.2.3
--- hook_settings.inc.php       25 May 2003 19:37:40 -0000      1.1.2.3.2.4
***************
*** 37,41 ****
        create_select_box('Refresh time in minutes','refreshTime',$refreshTime);
  
!       create_notify('email signature','email_sig',3,50);
  
        $sortOrder = array(
--- 37,41 ----
        create_select_box('Refresh time in minutes','refreshTime',$refreshTime);
  
!       create_text_area('email signature','email_sig',3,50);
  
        $sortOrder = array(
***************
*** 57,60 ****
--- 57,67 ----
        );
        create_select_box('when deleting 
messages','deleteOptions',$deleteOptions);
+ 
+       $htmlOptions = array(
+               'never_display'         => lang('never display html emails'),
+               'only_if_no_text'       => lang('display only when no plain 
text is available'),
+               'always_display'        => lang('always show html emails')
+       );
+       create_select_box('display of html emails','htmlOptions',$htmlOptions);
  
        $trashOptions = array_merge(





reply via email to

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