Ignore:
Timestamp:
06/02/12 17:33:39 (12 years ago)
Author:
acoutinho
Message:

Ticket #2831 - Implementação ao suporte a repetição de eventos

File:
1 edited

Legend:

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

    r6369 r6393  
    261261            Controller::begin(array('service' => 'PostgreSQL')); 
    262262 
    263             foreach ($result as $id => $res) 
    264                 Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_repeat_occurrence(repeat_id,occurrence)VALUES('" . $id . "','" . implode("'),('" . $id . "', '", $res) . "')"); 
    265  
     263            foreach ($result as $id => $res){ 
     264                 
     265                $ocurrences = array_unique($res); 
     266                Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_repeat_occurrence(repeat_id,occurrence)VALUES('" . $id . "','" . implode("'),('" . $id . "', '", $ocurrences) . "')"); 
     267            } 
    266268            $data = array(); 
    267269 
Note: See TracChangeset for help on using the changeset viewer.