phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: felamimail/inc class.uidisplay.inc.php,NONE,1.1.


From: Lars Kneschke <address@hidden>
Subject: [Phpgroupware-cvs] CVS: felamimail/inc class.uidisplay.inc.php,NONE,1.1.2.1 class.bocompose.inc.php,1.1.1.1.2.7,1.1.1.1.2.8 class.bofelamimail.inc.php,1.2.2.9,1.2.2.10 class.uicompose.inc.php,1.1.1.1.2.6,1.1.1.1.2.7 class.uifelamimail.inc.php,1.2.2.9,1.2.2.10
Date: Sun, 27 Oct 2002 14:39:34 -0500

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.bocompose.inc.php class.bofelamimail.inc.php 
        class.uicompose.inc.php class.uifelamimail.inc.php 
Added Files:
      Tag: Version-0_9_14-branch
        class.uidisplay.inc.php 
Log Message:
removed some Squirrelmail code again
the code for reading messages is now 100% based on phpGW
 


***** Error reading new file: [Errno 2] No such file or directory: 
'class.uidisplay.inc.php'
Index: class.bocompose.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bocompose.inc.php,v
retrieving revision 1.1.1.1.2.7
retrieving revision 1.1.1.1.2.8
diff -C2 -r1.1.1.1.2.7 -r1.1.1.1.2.8
*** class.bocompose.inc.php     24 Oct 2002 22:16:54 -0000      1.1.1.1.2.7
--- class.bocompose.inc.php     27 Oct 2002 19:39:32 -0000      1.1.1.1.2.8
***************
*** 176,180 ****
                        
                        // get message headers for specified message
!                       $headers        = 
$bofelamimail->getMessageHeaders($_uid,ST_UID);
  
                        $this->sessionData['uid'] = $_uid;
--- 176,180 ----
                        
                        // get message headers for specified message
!                       $headers        = 
$bofelamimail->getMessageHeader($_uid);
  
                        $this->sessionData['uid'] = $_uid;
***************
*** 263,267 ****
                        }
  
!                       $structure     = 
$bofelamimail->getMessageStructure($_uid,ST_UID);
                        if(sizeof($structure->parts) > 1)
                        {
--- 263,267 ----
                        }
  
!                       $structure = $bofelamimail->getMessageStructure($_uid);
                        if(sizeof($structure->parts) > 1)
                        {
***************
*** 272,296 ****
                        $this->sessionData['body']      = "On " . 
$headers->Date . ", you wrote: \n>";
                        
!                       // iterate through message parts
!                       if(is_array($sections))
                        {
!                               $this->sessionData['body'] .= "...\n";
!                               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);
!                                               $bodyPart = 
quoted_printable_decode($bodyPart);
!                                               $this->sessionData['body'] .= 
str_replace("\n", "\n>", $bodyPart);
!                                       }
!                               }
!                       }
!                       else
!                       {
!                               $bodyPart = 
$bofelamimail->getMessageBody($_uid,'',ST_UID);
!                               $bodyPart = quoted_printable_decode($bodyPart);
!                               $this->sessionData['body']      .= 
str_replace("\n", "\n>", $bodyPart);
                        }
                                                                                
                                                
--- 272,280 ----
                        $this->sessionData['body']      = "On " . 
$headers->Date . ", you wrote: \n>";
                        
!                       // get the body
!                       $bodyParts = $bofelamimail->getMessageBody($_uid);
!                       for($i=0; $i<count($bodyParts); $i++)
                        {
!                               $this->sessionData['body']      .= 
str_replace("\n", "\n>", $bodyParts[$i]);
                        }
                                                                                
                                                
***************
*** 379,382 ****
--- 363,367 ----
                        $mail->Priority = $this->sessionData['priority'];
                        $mail->Encoding = '8bit';
+                       $mail->PluginDir = PHPGW_SERVER_ROOT."/felamimail/inc/";
  
                        if (!empty($this->sessionData['to']))
***************
*** 434,438 ****
                        
                        $mail->WordWrap = 76;
!                       $mail->Subject = $this->sessionData['subject'];
                        $mail->IsHTML(false);
                        $mail->Body    = $this->sessionData['body'];
--- 419,423 ----
                        
                        $mail->WordWrap = 76;
!                       $mail->Subject = 
"=?iso-8859-1?Q?".imap_8bit($this->sessionData['subject'])."?=";
                        $mail->IsHTML(false);
                        $mail->Body    = $this->sessionData['body'];

Index: class.bofelamimail.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bofelamimail.inc.php,v
retrieving revision 1.2.2.9
retrieving revision 1.2.2.10
diff -C2 -r1.2.2.9 -r1.2.2.10
*** class.bofelamimail.inc.php  24 Oct 2002 22:16:54 -0000      1.2.2.9
--- class.bofelamimail.inc.php  27 Oct 2002 19:39:32 -0000      1.2.2.10
***************
*** 222,229 ****
                // http://www.devshed.com
                // fetch a specific attachment from a message
!               function getAttachment($_messageUID, $_partID)
                {
                        // parse message structure
!                       $structure = imap_fetchstructure($this->mbox, 
$_messageUID, FT_UID);
                        $sections = $this->parse($structure);
                        
--- 222,229 ----
                // http://www.devshed.com
                // fetch a specific attachment from a message
!               function getAttachment($_uid, $_partID)
                {
                        // parse message structure
!                       $structure = imap_fetchstructure($this->mbox, $_uid, 
FT_UID);
                        $sections = $this->parse($structure);
                        
***************
*** 234,250 ****
                                {
                                        $type = $sections[$x]["type"];
!                                       $encoding = $sections[$x]["encoding"];
                                        $filename = $sections[$x]["name"];
                                }
                        }
                        
!                       $attachment = imap_fetchbody($this->mbox, $_messageUID, 
$_partID, FT_UID);
                        
!                       switch($encoding)
                        {
!                               case "":
                                        $attachment = imap_base64($attachment);
-                                       
                                        break;
                        }
                        
--- 234,259 ----
                                {
                                        $type = $sections[$x]["type"];
!                                       $encoding = $sections[$x]["Encoding"];
                                        $filename = $sections[$x]["name"];
                                }
                        }
                        
!                       $attachment = imap_fetchbody($this->mbox, $_uid, 
$_partID, FT_UID);
                        
!                       switch ($encoding) 
                        {
!                               case ENCBASE64:
!                                       // use imap_base64 to decode
                                        $attachment = imap_base64($attachment);
                                        break;
+                               case ENCQUOTEDPRINTABLE:
+                                       // use imap_qprint to decode
+                                       $attachment = imap_qprint($attachment);
+                                       break;
+                               case ENCOTHER:
+                                       // not sure if this needs decoding at 
all
+                                       break;
+                               default:
+                                       // it is either not encoded or we don't 
know about it
                        }
                        
***************
*** 534,582 ****
                }
  
!               function getMessageBody($_replyID, $_partID='',$_options=0)
                {
!                       if(!empty($_partID))
                        {
!                               if($_options == ST_UID)
!                               {
!                                       return trim(imap_fetchbody($this->mbox, 
$_replyID, $_partID, FT_UID));
!                               }
!                               else
                                {
!                                       return trim(imap_fetchbody($this->mbox, 
$_replyID, $_partID));
                                }
                        }
                        else
                        {
!                               if($_options == ST_UID)
!                               {                               
!                                       return 
trim(imap_body($this->mbox,$_replyID, FT_UID));
!                               }
!                               else
                                {
!                                       return 
trim(imap_body($this->mbox,$_replyID));
                                }
                        }
                }
  
!               function getMessageHeaders($_replyID, $_options=0)
                {
!                       if($_options == ST_UID)
!                       {
!                               $_replyID = imap_msgno($this->mbox, $_replyID);
!                       }
!                       return imap_header($this->mbox, $_replyID);
                }
  
!               function getMessageStructure($_replyID,$_options=0)
                {
!                       if($_options == ST_UID)
!                       {
!                               return imap_fetchstructure($this->mbox, 
$_replyID, FT_UID);
!                       }
!                       else
!                       {
!                               return imap_fetchstructure($this->mbox, 
$_replyID);
!                       }
                }
  
--- 543,651 ----
                }
  
!               function getMessageAttachments($_uid)
                {
!                       $structure = imap_fetchstructure($this->mbox, $_uid, 
FT_UID);
!                       if(sizeof($structure->parts) > 1)
                        {
!                               $sections = $this->parse($structure);
!                               return $this->get_attachments($sections);
!                       }
!               }
!               
!               function getMessageBody($_uid)
!               {
!                       $structure = imap_fetchstructure($this->mbox, $_uid, 
FT_UID);
!                       if(sizeof($structure->parts) > 1)
!                       {
!                               $sections = $this->parse($structure);
!                       }
!                       
!                       if(is_array($sections))
!                       {
!                               for($x=0; $x<sizeof($sections); $x++)
                                {
!                                       unset($newPart);
!                                       #print "getMessageBody<br>";
!                                       #print $sections[$x]["type"]."<br>";
!                                       #print 
$sections[$x]["disposition"]."<br>";
!                                       #print 
$sections[$x]["disposition"]."<br>";
!                                       #print 
stripslashes(trim(imap_fetchbody($this->mbox, $_uid, $sections[$x]["pid"], 
FT_UID)))."<br>";
!                                       if(($sections[$x]["type"] == 
"text/plain" || 
!                                               $sections[$x]["type"] == 
"message/rfc822") && 
!                                               $sections[$x]["disposition"] != 
"attachment")
!                                       {
!                                               $newPart = 
stripslashes(trim(imap_fetchbody($this->mbox, $_uid, $sections[$x]["pid"], 
FT_UID)));
!                                       }
!                                       
!                                       // a hack for Outlook
!                                       // fetch x.1 because this is the text 
part
!                                       if($sections[$x]["type"] == 
"multipart/alternative" &&
!                                               $sections[$x]["disposition"] != 
"attachment")
!                                       {
!                                               $newPart = 
stripslashes(trim(imap_fetchbody($this->mbox, $_uid, $sections[$x]["pid"].".1", 
FT_UID)));
!                                               // hack!!!
!                                               $sections[$x]['Encoding'] = 
ENCQUOTEDPRINTABLE;
!                                       }
!                                       if(isset($newPart)) 
!                                       {
!                                       switch ($sections[$x]['Encoding']) 
!                                       {
!                                               case ENCBASE64:
!                                                       // use imap_base64 to 
decode
!                                                       $newPart = 
imap_base64($newPart);
!                                                       break;
!                                               case ENCQUOTEDPRINTABLE:
!                                                       // use imap_qprint to 
decode
!                                                       $newPart = 
imap_qprint($newPart);
!                                                       break;
!                                               case ENCOTHER:
!                                                       // not sure if this 
needs decoding at all
!                                                       break;
!                                               default:
!                                                       // it is either not 
encoded or we don't know about it
!                                       }
!                                               $bodyPart[] = $newPart;
!                                       }
                                }
                        }
                        else
                        {
!                               $newPart = 
stripslashes(trim(imap_body($this->mbox, $_uid, FT_UID)));
!                               switch ($structure->encoding) 
                                {
!                                       case ENCBASE64:
!                                               // use imap_base64 to decode
!                                               $newPart = 
imap_base64($newPart);
!                                               break;
!                                       case ENCQUOTEDPRINTABLE:
!                                               // use imap_qprint to decode
!                                               $newPart = 
imap_qprint($newPart);
!                                               break;
!                                       case ENCOTHER:
!                                               // not sure if this needs 
decoding at all
!                                               break;
!                                       default:
!                                               // it is either not encoded or 
we don't know about it
                                }
+                               $bodyPart[] = $newPart;
                        }
+                       
+                       return $bodyPart;
                }
  
!               function getMessageHeader($_uid)
                {
!                       $msgno = imap_msgno($this->mbox, $_uid);
!                       return imap_header($this->mbox, $msgno);
                }
  
!               function getMessageRawHeader($_uid)
                {
!                       return imap_fetchheader($this->mbox, $_uid, FT_UID);
!               }
! 
!               function getMessageStructure($_uid)
!               {
!                       return imap_fetchstructure($this->mbox, $_uid, FT_UID);
                }
  
***************
*** 639,642 ****
--- 708,712 ----
                        // split structure into parts
                        $parts = $structure->parts;
+                                                                               
                                
                        
                        for($x=0; $x<sizeof($parts); $x++)
***************
*** 654,657 ****
--- 724,728 ----
                                if ($part->encoding == "") { $part->encoding = 
0; }
                                $ret[$x]["encoding"] = 
$this->encoding[$part->encoding];
+                               $ret[$x]["Encoding"] = $part->encoding;
                                
                                $ret[$x]["size"] = strtolower($part->bytes);

Index: class.uicompose.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.uicompose.inc.php,v
retrieving revision 1.1.1.1.2.6
retrieving revision 1.1.1.1.2.7
diff -C2 -r1.1.1.1.2.6 -r1.1.1.1.2.7
*** class.uicompose.inc.php     24 Oct 2002 22:16:54 -0000      1.1.1.1.2.6
--- class.uicompose.inc.php     27 Oct 2002 19:39:32 -0000      1.1.1.1.2.7
***************
*** 264,266 ****
                        
$this->t->set_var("bg03",$GLOBALS['phpgw_info']["theme"]["bg03"]);
                }
! }
\ No newline at end of file
--- 264,268 ----
                        
$this->t->set_var("bg03",$GLOBALS['phpgw_info']["theme"]["bg03"]);
                }
! }
! 
! ?>

Index: class.uifelamimail.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.uifelamimail.inc.php,v
retrieving revision 1.2.2.9
retrieving revision 1.2.2.10
diff -C2 -r1.2.2.9 -r1.2.2.10
*** class.uifelamimail.inc.php  26 Oct 2002 14:16:50 -0000      1.2.2.9
--- class.uifelamimail.inc.php  27 Oct 2002 19:39:32 -0000      1.2.2.10
***************
*** 95,98 ****
--- 95,103 ----
                                
$this->bofelamimail->sessionData['startMessage']= 1;
                        }
+                       elseif($GLOBALS['HTTP_GET_VARS']["menuaction"] == 
"felamimail.uifelamimail.deleteMessage")
+                       {
+                               // delete 1 message from the mail reading window
+                               
$this->bofelamimail->sessionData['startMessage']= 1;
+                       }
  
                        // navigate for and back
***************
*** 366,370 ****
                                                
$headers['header'][$i]['subject'] = 
substr($headers['header'][$i]['subject'],0,$maxSubjectLength)."...";
                                        }
! 
                                        
if($headers['header'][$i]['attachments'] == "true")
                                        {
--- 371,375 ----
                                                
$headers['header'][$i]['subject'] = 
substr($headers['header'][$i]['subject'],0,$maxSubjectLength)."...";
                                        }
!                                       $headers['header'][$i]['subject'] = 
htmlentities($headers['header'][$i]['subject']);
                                        
if($headers['header'][$i]['attachments'] == "true")
                                        {
***************
*** 372,376 ****
                                                
$headers['header'][$i]['subject'] = 
"$image&nbsp;".$headers['header'][$i]['subject'];
                                        }
!                                       
$this->t->set_var('header_subject',htmlentities($headers['header'][$i]['subject']));
                                        
                                }
--- 377,381 ----
                                                
$headers['header'][$i]['subject'] = 
"$image&nbsp;".$headers['header'][$i]['subject'];
                                        }
!                                       $this->t->set_var('header_subject', 
$headers['header'][$i]['subject']);
                                        
                                }
***************
*** 440,450 ****
                                #$this->t->set_var('flags',$flags);
  
                                $linkData = array
                                (
!                                       'mailbox'       => $urlMailbox,
!                                       'passed_id'     => 
$headers['header'][$i]['id'],
!                                       'uid'           => 
$headers['header'][$i]['uid'],
                                );
!                               
$this->t->set_var('url_read_message',$GLOBALS['phpgw']->link('/felamimail/read_body.php',$linkData));
                                
                                $linkData = array
--- 445,462 ----
                                #$this->t->set_var('flags',$flags);
  
+ #                             $linkData = array
+ #                             (
+ #                                     'mailbox'       => $urlMailbox,
+ #                                     'passed_id'     => 
$headers['header'][$i]['id'],
+ #                                     'uid'           => 
$headers['header'][$i]['uid'],
+ #                             );
+ #                             
$this->t->set_var('url_read_message',$GLOBALS['phpgw']->link('/felamimail/read_body.php',$linkData));
+                               
                                $linkData = array
                                (
!                                       'menuaction'    => 
'felamimail.uidisplay.display',
!                                       'uid'           => 
$headers['header'][$i]['uid']
                                );
!                               
$this->t->set_var('url_read_message',$GLOBALS['phpgw']->link('/index.php',$linkData));
                                
                                $linkData = array





reply via email to

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