Changeset 7789
- Timestamp:
- 01/23/13 17:03:48 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/schedules.php
r7702 r7789 31 31 .'calendar_object.range_end as "rangeEnd", calendar_object.last_update as "lastUpdate", ' 32 32 .'calendar_object.dtstamp as "dtstamp", calendar_object.sequence as "sequence", ' 33 34 .'count(calendar_task_to_activity_object.id) as "tasks", ' 35 33 36 .'calendar_object.tzid as "timezone" ,calendar_to_calendar_object.calendar_id as ' 34 .'calendar FROM calendar_to_calendar_object , calendar_object ' 37 .'calendar FROM calendar_object left join calendar_task_to_activity_object on ( calendar_object.id = calendar_task_to_activity_object.calendar_object_activity_id ), calendar_to_calendar_object ' 38 35 39 .'WHERE ( calendar_to_calendar_object.calendar_id IN (\'' . implode('\',\'', $calendars) . '\')) ' 36 40 .'AND calendar_to_calendar_object.calendar_object_id = calendar_object.id ' … … 53 57 .'AND calendar_object.dtstart NOT IN (SELECT calendar_repeat_occurrence.occurrence from calendar_repeat_occurrence, ' 54 58 .'calendar_repeat where (calendar_repeat_occurrence.repeat_id = calendar_repeat.id) ' 55 .'AND (calendar_repeat.object_id = calendar_object.id)) ';59 .'AND (calendar_repeat.object_id = calendar_object.id)) group by calendar_object.id, calendar_to_calendar_object.calendar_id'; 56 60 57 61 $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); … … 73 77 .'calendar_object.range_end as "rangeEnd", calendar_object.last_update as "lastUpdate", ' 74 78 .'calendar_object.dtstamp as "dtstamp", calendar_object.sequence as "sequence", ' 79 80 .'count(calendar_task_to_activity_object.id) as "tasks", ' 81 75 82 .'calendar_object.tzid as "timezone" ,calendar_to_calendar_object.calendar_id as ' 76 .'calendar FROM calendar_ to_calendar_object ,calendar_object '83 .'calendar FROM calendar_object left join calendar_task_to_activity_object on ( calendar_object.id = calendar_task_to_activity_object.calendar_object_activity_id ), calendar_to_calendar_object ' 77 84 .'WHERE ( calendar_to_calendar_object.calendar_id IN (\'' . implode('\',\'', $calendars) . '\')) ' 78 85 .'AND calendar_to_calendar_object.calendar_object_id = calendar_object.id ' … … 80 87 81 88 82 $where = 'AND (((upper("summary") like upper(\'%'.$summary.'%\') OR upper("description") like upper(\'%'.$description.'%\')))) ORDER BY dtstart LIMIT '.$limit.' OFFSET '.$offset.' ';89 $where = 'AND (((upper("summary") like upper(\'%'.$summary.'%\') OR upper("description") like upper(\'%'.$description.'%\')))) group by calendar_object.id, calendar_to_calendar_object.calendar_id ORDER BY dtstart LIMIT '.$limit.' OFFSET '.$offset.' '; 83 90 $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); 84 85 86 91 87 92 return $this->normalizeEvents( $params, $timezones ); … … 137 142 $attend = $attend[0]; 138 143 139 $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") ) ? 1 : 0;144 $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ? 1 : 0; 140 145 141 146 }else{ … … 144 149 145 150 } 151 if( $v['type'] == 2 && $v['tasks'] > 0) 152 $result[$i]['type'] = 3; 146 153 } 147 154
Note: See TracChangeset
for help on using the changeset viewer.