Changeset 8003 for branches/2.5


Ignore:
Timestamp:
03/12/13 16:25:52 (11 years ago)
Author:
douglas
Message:

Ticket #3385 - ERRO ao Ao excluir um evento de uma agenda compartilhada

Location:
branches/2.5/prototype
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/prototype/config/participant.ini

    r7982 r8003  
    2828[before.delete] 
    2929prepareParticipantHistoric = modules/calendar/interceptors/DBMapping.php 
     30deleteParticipant = modules/calendar/interceptors/Notifications.php 
    3031 
    3132[after.delete] 
  • branches/2.5/prototype/modules/calendar/interceptors/Notifications.php

    r7918 r8003  
    483483    public function deleteEvent(&$uri, &$result, &$params, $original) { 
    484484        $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $uri['id']), null, array('deepness' => '2')); 
     485 
    485486        if ((Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd'], $schedulable['id']))) { 
    486487            $method = 'CANCEL'; 
     
    490491 
    491492            if (count($part) > 0) 
    492                 self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_cancel_body'); 
     493        {  
     494            $from = false;  
     495            foreach($schedulable['participants'] as $v)  
     496            {  
     497                if($v['isOrganizer'] == 1)  
     498                    $from =  $v;  
     499            }  
     500  
     501            self::sendMail($data, $ical, implode(',', $part), $subject, 'notify_cancel_body' , $from );  
     502        }  
    493503        } 
    494504    } 
     
    507517 
    508518        $participant = Controller::read(array('concept' => 'participant', 'id' => $uri['id']), null, array('deepness' => '1')); 
    509         $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $participant['schedulable'])); 
     519    $schedulable = Controller::read(array('concept' => 'schedulable', 'id' => $participant['schedulable']) , false , array('deepness' => '2')); 
    510520 
    511521        if ((Config::regGet('noAlarm') === false) && (self::futureEvent($schedulable['startTime'], $schedulable['rangeEnd'], $schedulable['id']))) { 
    512522            $method = 'CANCEL'; 
    513523            $notificationType = 'Cancelamento de Calendario'; 
    514             $part = 'others'; 
    515             self::mountStruture(false, $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType); 
    516  
    517             self::sendMail($data, $ical, $participant['user']['mail'], $subject, 'notify_cancel_body'); 
     524            $part = 'me';  
     525            self::mountStruture($schedulable['id'], $schedulable, false, $data, $subject, $ical, $part, $method, $notificationType);  
     526  
     527        $from = false;  
     528        foreach($schedulable['participants'] as $v)  
     529        {  
     530            if($v['isOrganizer'] == 1)  
     531                $from =  $v;  
     532        }  
     533            self::sendMail($data, $ical, $participant['user']['mail'], $subject, 'notify_cancel_body' , $from);  
    518534        } 
    519535    } 
  • branches/2.5/prototype/modules/calendar/js/init.js

    r7995 r8003  
    482482                                'onClose':  function(clicked) { 
    483483                                    if(clicked == 'Editar todas ocorrências') { 
    484  
    485                                         eventDetails(  getSchedulable(evt.id, ''), true); 
     484                                        var schedule = getSchedulable(evt.id, '');  
     485                                        schedule.calendar = evt.calendar;  
     486                                        eventDetails( schedule , true);  
    486487 
    487488                                    }else if (clicked == 'Editar essa ocorrência'){ 
Note: See TracChangeset for help on using the changeset viewer.