Ignore:
Timestamp:
05/04/12 18:38:56 (12 years ago)
Author:
natan
Message:

Ticket #2141 - Eventos com repeticao nao dispara notificacao nos alarmes - implementação final

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/Sync.php

    r5905 r6111  
    3636 
    3737               false; 
     38    } 
     39} 
     40 
     41///Conversor Para utf8 ante de codificar para json pois o json so funciona com utf8 
     42if(!function_exists('toUtf8')) 
     43{ 
     44    function toUtf8($data) 
     45    { 
     46        if(!is_array($data)) 
     47          return mb_convert_encoding( $data , 'UTF-8' , 'UTF-8 , ISO-8859-1' ); 
     48 
     49        $return = array(); 
     50 
     51        foreach ($data as $i => $v) 
     52          $return[toUtf8($i)] = toUtf8($v); 
     53 
     54        return $return; 
    3855    } 
    3956} 
     
    128145          } 
    129146          catch( Exception $e ){ 
    130               $return[ $uri ] = $e->getMessage(); 
     147              $return[ $uri ] = toUtf8( $e->getMessage() ); 
    131148              unset( $data[$uri] ); 
    132149              continue; 
Note: See TracChangeset for help on using the changeset viewer.