Ignore:
Timestamp:
05/04/11 17:11:07 (13 years ago)
Author:
brunocosta
Message:

Ticket #1802 - Opção nos agendamentos para enviar notificações como dono.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/calendar/inc/class.bocalendar.inc.php

    r4159 r4217  
    11861186                                        $this->so->set_category(strval($l_categories[0])); 
    11871187                                } 
    1188                                 $this->so->set_title($l_cal['title']); 
     1188                                $this->so->set_title($l_cal['title']); 
    11891189                                $this->so->set_description($l_cal['description']); 
    11901190                                $this->so->set_observations($l_cal['observations']); 
     1191                                $this->so->set_notifications_owner($l_cal['notifications_owner']); 
    11911192                                $this->so->set_attachment($l_cal['attachment']); 
    11921193                                $this->so->set_ex_participants($l_cal['ex_participants']); 
     
    31103111 
    31113112                        $GLOBALS['phpgw_info']['user']['preferences'] = $GLOBALS['phpgw']->preferences->create_email_preferences(); 
    3112                         $sender = $GLOBALS['phpgw_info']['user']['email']; 
    3113  
    3114                         $temp_tz_offset = $this->prefs['common']['tz_offset']; 
     3113                        $preferences = CreateObject('phpgwapi.preferences',(int)$this->owner); 
     3114                        $GLOBALS['phpgw']->accounts->get_account_name((int)$owner,$lid,$fname,$lname); 
     3115 
     3116                        if($new_event['notifications_owner'] == '1'){ 
     3117                            $sender = $preferences->email_address((int)$owner); 
     3118                            $sender_name = $fname.' '.$lname; 
     3119                        }else{ 
     3120                            $sender = $GLOBALS['phpgw_info']['user']['email']; 
     3121                            $sender_name = $GLOBALS['phpgw_info']['user']['fullname']; 
     3122                        } 
     3123 
     3124                        $temp_tz_offset = $this->prefs['common']['tz_offset']; 
    31153125                        $temp_timeformat = $this->prefs['common']['timeformat']; 
    31163126                        $temp_dateformat = $this->prefs['common']['dateformat']; 
     
    32523262                                        continue;       // dont notify rejected participants 
    32533263                                } 
    3254                                 if($userid != $GLOBALS['phpgw_info']['user']['account_id'] ||  $msg_type == MSG_ALARM || isset($new_event['attachment'])) 
     3264                                if($userid != $owner ||  $msg_type == MSG_ALARM || isset($new_event['attachment'])) 
    32553265                                { 
    32563266                                        print_debug('Msg Type',$msg_type); 
     
    35123522                                        $mail->Body .= "\n--01BD3665.3AF0D360--\n"; 
    35133523                                        $mail->From = $sender; 
    3514                                         $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 
     3524                                        $mail->FromName = $sender_name; 
    35153525                                        $mail->Sender = $mail->From; 
    35163526                                        $mail->SenderName = $mail->FromName; 
     
    36053615                                 
    36063616                                $mail->From = $sender; 
    3607                                 $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 
     3617                                $mail->FromName = $sender_name; 
    36083618                                $mail->Sender = $mail->From; 
    36093619                                $mail->SenderName = $mail->FromName; 
     
    36623672                                $mail->Port = $emailadmin['smtpPort']; 
    36633673                                $mail->From = $sender; 
    3664                                 $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 
     3674                                $mail->FromName = $sender_name; 
    36653675                                $mail->Sender = $mail->From; 
    36663676                                $mail->SenderName = $mail->FromName; 
Note: See TracChangeset for help on using the changeset viewer.