Changeset 4141


Ignore:
Timestamp:
04/26/11 11:55:42 (13 years ago)
Author:
brunocosta
Message:

Ticket #189 - Evitando que se escreva dados incorretos na coluna 'attachment' do phpgw_cal.

File:
1 edited

Legend:

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

    r4024 r4141  
    967967                                        $type = 'E'; 
    968968//                      } 
    969                         is_array($event['attachment'])?$sattach=serialize($event['attachment']):$sattach=''; 
     969                        if(is_array($event['attachment']) || is_array(unserialize($event['attachment']))) 
     970                            $sattach=serialize($event['attachment']); 
     971                        else 
     972                            $sattach=''; 
    970973 
    971974                        $sql = 'UPDATE phpgw_cal SET ' 
     
    981984                                        . "description='".$this->stream->db_addslashes($event['description'])."', " 
    982985                                        . "observations='".$this->stream->db_addslashes($event['observations'])."', " 
    983                                         . "attachment='".$this->stream->db_addslashes(serialize($event['attachment']))."', " 
     986                                        . "attachment='".$this->stream->db_addslashes($sattach)."', " 
    984987                                        . "alter_by='".$this->stream->db_addslashes($GLOBALS['phpgw_info']['user']['fullname'])."', " 
    985988                                        . "ex_participants='".$this->stream->db_addslashes($event['ex_participants'])."', " 
Note: See TracChangeset for help on using the changeset viewer.