Changeset 7952 for trunk


Ignore:
Timestamp:
03/05/13 11:29:29 (11 years ago)
Author:
acoutinho
Message:

Ticket #3355 - Compatibilzacao da consulta de eventos com pg 8.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/schedules.php

    r7804 r7952  
    5757                .'AND calendar_object.dtstart NOT IN (SELECT calendar_repeat_occurrence.occurrence from calendar_repeat_occurrence, ' 
    5858                .'calendar_repeat where (calendar_repeat_occurrence.repeat_id = calendar_repeat.id) ' 
    59                 .'AND (calendar_repeat.object_id = calendar_object.id)) group by calendar_object.id, calendar_to_calendar_object.calendar_id ORDER BY calendar_object.dtstart'; 
     59                .'AND (calendar_repeat.object_id = calendar_object.id)) ' 
     60                .'group by 
     61                    calendar_object.id, calendar_object.cal_uid, calendar_object.type_id, 
     62                    calendar_object.dtstart, calendar_object.summary, calendar_object.description, 
     63                    calendar_object.dtend, calendar_object.priority, calendar_object.due, calendar_object.percentage, 
     64                    calendar_object.status, calendar_object.location, calendar_object.allday, calendar_object.transp, 
     65                    calendar_object.class_id, calendar_object.repeat, calendar_object.range_start, calendar_object.range_end, 
     66                    calendar_object.last_update, calendar_object.dtstamp, calendar_object.sequence, 
     67                    calendar_object.tzid, calendar_to_calendar_object.calendar_id 
     68                ORDER BY 
     69                    calendar_object.dtstart'; 
    6070 
    6171        $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); 
     
    8797 
    8898 
    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.' '; 
     99            $where = 'AND (((upper("summary") like upper(\'%'.$summary.'%\') OR upper("description") like upper(\'%'.$description.'%\')))) 
     100                group by 
     101                    calendar_object.id, calendar_object.cal_uid, calendar_object.type_id, 
     102                    calendar_object.dtstart, calendar_object.summary, calendar_object.description, 
     103                    calendar_object.dtend, calendar_object.priority, calendar_object.due, calendar_object.percentage, 
     104                    calendar_object.status, calendar_object.location, calendar_object.allday, calendar_object.transp, 
     105                    calendar_object.class_id, calendar_object.repeat, calendar_object.range_start, calendar_object.range_end, 
     106                    calendar_object.last_update, calendar_object.dtstamp, calendar_object.sequence, 
     107                    calendar_object.tzid, calendar_to_calendar_object.calendar_id 
     108                ORDER BY 
     109                    dtstart LIMIT '.$limit.'  OFFSET '.$offset.' '; 
     110 
    90111            $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); 
    91112 
Note: See TracChangeset for help on using the changeset viewer.