Changeset 7433 for branches/2.4


Ignore:
Timestamp:
10/17/12 11:38:12 (12 years ago)
Author:
eduardow
Message:

Ticket #3164 - Corrigido problema na criação de eventos na agenda antiga.

Location:
branches/2.4/calendar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/calendar/inc/class.socalendar_sql.inc.php

    r5399 r7433  
    942942                                        $event['uid'] = $part[0].'-'.$part[1].'@'.$id_suffix; 
    943943                                } 
    944                                 $this->stream->query('INSERT INTO phpgw_cal(uid,title,owner,priority,is_public,category) ' 
     944                                $returned_id = $this->stream->query('INSERT INTO phpgw_cal(uid,title,owner,priority,is_public,category) ' 
    945945                                        . "values('".$event['uid']."','".$this->stream->db_addslashes($event['title']) 
    946946                                        . "',".(int)$event['owner'].','.(int)$event['priority'].','.(int)$event['public'].",'" 
    947                                         . $event['category']."')",__LINE__,__FILE__); 
    948                                 $event['id'] = $this->stream->get_last_insert_id('phpgw_cal','cal_id'); 
     947                                        . $event['category']."') RETURNING cal_id",__LINE__,__FILE__);  
     948 
     949                // get_last_insert_id não funciona direito com Postgres 9  
     950                $event['id'] =  $returned_id->fields['cal_id']; //$this->stream->get_last_insert_id('phpgw_cal','cal_id');  
    949951                                $last_status = true; 
    950952                        } 
  • branches/2.4/calendar/setup/tables_current.inc.php

    r5203 r7433  
    3232                                'observations' => array('type' => 'text','nullable' => True), 
    3333                                'attachment' => array('type' => 'text','nullable' => True), 
    34                                 'alter_by' => array('type' => 'varchar','precision' => '160','nullable' => True) 
     34                                'alter_by' => array('type' => 'varchar','precision' => '160','nullable' => True),  
     35                'organizer' => array('type' => 'character varying','precision' => '255','nullable' => True),  
     36                'last_status' => array('type' => 'character','precision' => '1','nullable' => True),  
     37                'last_update' => array('type' => 'bigint','nullable' => True),  
     38                'notifcations_owner' => array('type' => 'integer','nullable' => True)  
    3539                        ), 
    3640                        'pk' => array('cal_id'), 
Note: See TracChangeset for help on using the changeset viewer.