Changeset 7797
- Timestamp:
- 01/29/13 13:05:33 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/prototype/modules/calendar/schedules.php
r7702 r7797 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 .'count(calendar_task_to_activity_object.id) as "tasks", ' 33 34 .'calendar_object.tzid as "timezone" ,calendar_to_calendar_object.calendar_id as ' 34 .'calendar FROM calendar_ to_calendar_object ,calendar_object '35 .'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 ' 35 36 .'WHERE ( calendar_to_calendar_object.calendar_id IN (\'' . implode('\',\'', $calendars) . '\')) ' 36 37 .'AND calendar_to_calendar_object.calendar_object_id = calendar_object.id ' … … 53 54 .'AND calendar_object.dtstart NOT IN (SELECT calendar_repeat_occurrence.occurrence from calendar_repeat_occurrence, ' 54 55 .'calendar_repeat where (calendar_repeat_occurrence.repeat_id = calendar_repeat.id) ' 55 .'AND (calendar_repeat.object_id = calendar_object.id)) ';56 .'AND (calendar_repeat.object_id = calendar_object.id)) group by calendar_object.id, calendar_to_calendar_object.calendar_id'; 56 57 57 58 $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); … … 73 74 .'calendar_object.range_end as "rangeEnd", calendar_object.last_update as "lastUpdate", ' 74 75 .'calendar_object.dtstamp as "dtstamp", calendar_object.sequence as "sequence", ' 76 .'count(calendar_task_to_activity_object.id) as "tasks", ' 75 77 .'calendar_object.tzid as "timezone" ,calendar_to_calendar_object.calendar_id as ' 76 .'calendar FROM calendar_ to_calendar_object ,calendar_object '78 .'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 79 .'WHERE ( calendar_to_calendar_object.calendar_id IN (\'' . implode('\',\'', $calendars) . '\')) ' 78 80 .'AND calendar_to_calendar_object.calendar_object_id = calendar_object.id ' … … 80 82 81 83 82 $where = 'AND (((upper("summary") like upper(\'%'.$summary.'%\') OR upper("description") like upper(\'%'.$description.'%\')))) ORDER BY dtstart LIMIT '.$limit.' OFFSET '.$offset.' ';84 $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 85 $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); 84 86 … … 137 139 $attend = $attend[0]; 138 140 139 $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") ) ? 1 : 0;141 $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ? 1 : 0; 140 142 141 143 }else{ … … 144 146 145 147 } 148 if( $v['type'] == 2 && $v['tasks'] > 0) 149 $result[$i]['type'] = 3; 146 150 } 147 151
Note: See TracChangeset
for help on using the changeset viewer.