Changeset 7990


Ignore:
Timestamp:
03/11/13 17:58:44 (7 years ago)
Author:
douglas
Message:

Ticket #3378 - Erro de visualização evento com repetição

Location:
branches/2.5/prototype/modules/calendar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/prototype/modules/calendar/interceptors/DBMapping.php

    r7982 r7990  
    471471        $result = array(); 
    472472        $params = array(); 
    473  
     473    $realResult = array();  
    474474        foreach ($return as $ret) { 
    475475            $currentId = $ret['schedulable']; 
     
    478478                $result[$currentId] = Controller::read(array('concept' => 'schedulable', 'id' => $currentId)); 
    479479                $result[$currentId]['occurrences'] = array(); 
    480  
    481                 $calendarToCalendarObj = self::schedulable2calendarToObject($currentId); 
    482                 $result[$currentId]['calendar'] = $calendarToCalendarObj[0]['calendar_id']; 
    483480            } 
    484481 
     
    486483        } 
    487484 
    488         return( $result ); 
     485    foreach($result as $i => $v)  
     486    {  
     487        $calendarToCalendarObj = self::schedulable2calendarToObject($v['id']);  
     488            foreach($calendarToCalendarObj as $vv)  
     489            {  
     490                $v['calendar'] = $vv['calendar_id'];  
     491                $realResult[] = $v;  
     492            }  
     493    }  
     494  
     495        return( $realResult );  
    489496    } 
    490497 
  • branches/2.5/prototype/modules/calendar/schedules.php

    r7982 r7990  
    113113    function normalizeEvents( &$result, $timezones ){ 
    114114 
     115        $myCalendarsT =  Controller::service('PostgreSQL')->execResultSql('SELECT calendar_id FROM calendar_signature WHERE user_uidnumber = \''.Config::me('uidNumber').'\' AND is_owner = \'1\' AND type = \'0\'');  
     116        $myCalendars = array();  
     117        foreach($myCalendarsT as $v)  
     118            $myCalendars[] = $v['calendar_id'];  
     119  
     120  
    115121        $date = new DateTime('now', new DateTimeZone('UTC')); 
    116122        $DayLigth = array(); 
     
    166172                $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ? 1 : 0; 
    167173  
    168                 if($attend['status'] == STATUS_UNANSWERED)  
     174                if($attend['status'] == STATUS_UNANSWERED && in_array($result[$i]['calendar'] , $myCalendars) )  
    169175                    $result[$i]['unanswered'] = 1;  
    170176 
Note: See TracChangeset for help on using the changeset viewer.