Changeset 3206 for branches/2.0


Ignore:
Timestamp:
09/01/10 17:06:26 (14 years ago)
Author:
wmerlotto
Message:

Ticket #1184 - Adicionado o tratamendo da codificação do agendamento.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/calendar/inc/class.boicalendar.inc.php

    r3203 r3206  
    12851285                                        $this->line = $this->line + 1; 
    12861286                                } 
     1287                                 
    12871288                                // Corrige a codificacao dos caracteres 
    1288                                 $str = utf8_decode ( trim ($str) ); 
     1289                                $str = trim ($str); 
     1290                                if ( mb_detect_encoding($str, 'auto') == 'UTF-8' ) 
     1291                                        $str = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $str); 
     1292 
    12891293                                //$this->debug("LINE : ".$str); 
    12901294                                return $str; 
     
    14211425                        elseif(ereg('(.*(\:\\\\)?.*):(.*)',$value,$temp)) 
    14221426                        { 
    1423                                 $this->debug('Value : '._debug_array($temp,False)); 
    1424                                 $this->debug('Param '.$majortype.' Value : '.$temp[3]); 
     1427                                //$this->debug('Value : '._debug_array($temp,False)); 
     1428                                //$this->debug('Param '.$majortype.' Value : '.$temp[3]); 
    14251429                                if($temp[3]) 
    14261430                                { 
     
    14331437                                while(ereg('(([A-Z\-]*)[=]([[:alnum:] \_\)\(\/\$\.\,\:\\\|\*\&\^\%\#\!\~\"\?\&\@\<\>\-]*))([\;]?)(.*)',$value,$temp)) 
    14341438                                { 
    1435                                         $this->debug('Value : '._debug_array($temp,False)); 
    1436                                         $this->debug('Param '.$temp[2].' Value : '.$temp[3]); 
     1439                                        //$this->debug('Value : '._debug_array($temp,False)); 
     1440                                        //$this->debug('Param '.$temp[2].' Value : '.$temp[3]); 
    14371441                                        $return_value[] = Array( 
    14381442                                                'param' => $temp[2], 
     
    14401444                                        ); 
    14411445                                        $value = chop($temp[5]); 
    1442                                         $this->debug('Value would be = '.$value); 
     1446                                        //$this->debug('Value would be = '.$value); 
    14431447                                } 
    14441448                        } 
     
    15321536                { 
    15331537                        $var = Array(); 
    1534                         $this->debug('Mode : '.$mode.' Majortype : '.$majortype); 
     1538                        //$this->debug('Mode : '.$mode.' Majortype : '.$majortype); 
    15351539                        $this->parse_parameters($var,$majortype,$value); 
    15361540                        if($this->property[$majortype][$mode]['multiples']) 
    15371541                        { 
    1538                                 $this->debug('parse_value var array: '._debug_array($var,False)); 
     1542                                //$this->debug('parse_value var array: '._debug_array($var,False)); 
    15391543                                $event[$majortype][] = $var; 
    15401544                        } 
    15411545                        else 
    15421546                        { 
    1543                                 $this->debug('Majortype : '.$majortype); 
    1544                                 $this->debug('Property : '.$this->property[$majortype]['type']); 
     1547                                //$this->debug('Majortype : '.$majortype); 
     1548                                //$this->debug('Property : '.$this->property[$majortype]['type']); 
    15451549                                if($this->property[$majortype]['type'] == 'date-time') 
    15461550                                { 
    1547                                         $this->debug('Got a DATE-TIME type!'); 
     1551                                        //$this->debug('Got a DATE-TIME type!'); 
    15481552                                        $t_var = $var[$majortype]; 
    15491553                                        unset($var[$majortype]); 
     
    15551559                                                        $var[$key] = $val; 
    15561560                                                } 
    1557                                                 $this->debug($majortype.' : '._debug_array($var,False)); 
     1561                                                //$this->debug($majortype.' : '._debug_array($var,False)); 
    15581562                                        } 
    15591563                                } 
     
    22462250                        if(is_string($var)) 
    22472251                        { 
     2252                                $var = str_replace(array("\r\n", "\n", "\r"), "", $var); 
    22482253                                if(strpos(' '.$var,':')) 
    22492254                                { 
Note: See TracChangeset for help on using the changeset viewer.