Ticket #1543: expresso-comunidade-tag-2.0.9.patch

File expresso-comunidade-tag-2.0.9.patch, 3.9 KB (added by gabriel.malheiros, 13 years ago)

patch para versão 2.0.9

  • calendar/inc/class.bocalendar.inc.php

    diff -uNr expresso/calendar/inc/class.bocalendar.inc.php expressov2/calendar/inc/class.bocalendar.inc.php
    old new  
    26432643 
    26442644                function create_vcard($event_array) 
    26452645                { 
     2646                        $sender = $GLOBALS['phpgw_info']['user']['email'];  
     2647                        $uid_dono = $GLOBALS['phpgw_info']['user']['account_lid'];  
    26462648                        if(!is_array($event_array)) 
    26472649                                return null; 
    26482650                         
     
    26712673                        ."DTSTART:".$dtstart."\r\n" 
    26722674                        ."DTEND:".$dtend."\r\n" 
    26732675                        ."LAST-MODIFIED:".gmdate("Ymd\THis\Z")."\r\n" //Hora no formato UTC 
    2674                         ."UID:Expresso-".$event_array['id'].$event_array['uid']."\r\n" 
     2676                        //."UID:Expresso-".$event_array['id'].$event_array['uid']."\r\n" 
     2677                        ."UID:Expresso-".$event[id]."@".$uid_dono."\n"   
    26752678                        ."DESCRIPTION:".$description."\r\n" 
    26762679                        ."SUMMARY:".$event_array['title']."\r\n" 
    26772680                        ."LOCATION:".$event_array['location']."\r\n" 
     2681                        ."ORGANIZER;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:".$sender."\n" 
     2682                        ."ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:".$event[ex_participants]."\n" 
    26782683                        ."END:VEVENT\r\n" 
    26792684                        ."END:VCALENDAR\r\n"; 
    26802685                         
     
    28322837                        $mail->Port = $emailadmin['smtpPort']; 
    28332838                        $mail->From = $GLOBALS['phpgw']->preferences->values['email']; 
    28342839                        $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 
    2835                         $mail->IsHTML(true); 
     2840                        //$mail->IsHTML(true); 
     2841                        $mail->IsCalendar(true); 
    28362842 
    28372843                        // Aqui e enviado o email 
    28382844                        foreach($to_notify as $userid => $statusid)  
     
    30773083                                                        break; 
    30783084                                        } 
    30793085                                        $mail->AddAddress($to); 
    3080                                         $mail->Body = $tmpbody; 
     3086                                        //$mail->Body = $tmpbody; 
     3087                                        $tmpattach_n = $this->create_vcard($GLOBALS['bocalendar']->so->cal->event); 
     3088                                        $tmpattach_a = str_replace("Expresso-","",$tmpattach_n); 
     3089                                        $tmpattach=str_replace("ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQPARTICIPANT:mailto:","ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:".$to,$tmpattach_a); 
     3090                                        $mail->Body = "This is a multi-part message in MIME format."; 
     3091                                        $mail->Body .= "\n--01BD3665.3AF0D360\n"; 
     3092                                        $mail->Body .= "Content-Type: text/html; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 8bit\n"; 
     3093                                        $mail->Body .= $tmpbody; 
     3094                                        $mail->Body .= "\n--01BD3665.3AF0D360\n"; 
     3095                                        $mail->Body.="Content-Type:text/calendar; method=REQUEST; charset=US-ASCII\nContent-Transfer-Encoding:7bit\n\n"; 
     3096                                        $mail->Body .= $tmpattach; 
     3097                                        $mail->Body .= "\n--01BD3665.3AF0D360--\n"; 
    30813098                                        $mail->From = $sender; 
    30823099                                        $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 
    30833100                                        $mail->Sender = $mail->From; 
     
    31033120                        if(count($to_notify) && $this->ex_participants){ 
    31043121                                $mail->ClearAllRecipients(); 
    31053122                                $var = explode(",",trim($this->ex_participants)); 
    3106                                 $to = array(); 
     3123                                $mail->IsHTML(true); 
     3124                                $to = array(); 
    31073125                                if(!$subject) { 
    31083126                                        $details['startdate'] = $GLOBALS['phpgw']->common->show_date($starttime); 
    31093127                                        $details['enddate']   = $GLOBALS['phpgw']->common->show_date($endtime); 
  • phpgwapi/inc/class.phpmailer.inc.php

    diff -uNr expresso/phpgwapi/inc/class.phpmailer.inc.php expressov2/phpgwapi/inc/class.phpmailer.inc.php
    old new  
    233233     * @param bool $bool 
    234234     * @return void 
    235235     */ 
     236    function Iscalendar($bool) { 
     237        if($bool == true) 
     238            $this->ContentType = "multipart/alternative;\n  boundary=\"01BD3665.3AF0D360\"\n"; 
     239        else 
     240            $this->ContentType = "text/plain"; 
     241    }   
    236242    function IsHTML($bool) { 
    237243        if($bool == true) 
    238244            $this->ContentType = "text/html";