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/request.php

    r5399 r6111  
    2929 
    3030///Conversor Para utf8 ante de codificar para json pois o json so funciona com utf8 
    31 function srtToUtf8($data) 
    32 { 
    33     return mb_convert_encoding( $data , 'UTF-8' , 'UTF-8 , ISO-8859-1' ); 
    34 } 
    35  
    3631function toUtf8($data) 
    3732{ 
    38     if(is_array($data)) 
    39     {    
    40         $return = array(); 
    41         foreach ($data as $i => $v) 
    42            $return[srtToUtf8($i)] = (is_array($v)) ? toUtf8($v) : srtToUtf8($v); 
    43          
    44         return $return; 
    45     } 
    46     else 
    47        return srtToUtf8($data); 
     33    if(!is_array($data)) 
     34      return mb_convert_encoding( $data , 'UTF-8' , 'UTF-8 , ISO-8859-1' ); 
     35 
     36    $return = array(); 
     37 
     38    foreach ($data as $i => $v) 
     39      $return[toUtf8($i)] = toUtf8($v); 
     40 
     41    return $return; 
    4842} 
    4943//////////////////////////////////////////////////////////////////////////////////////// 
Note: See TracChangeset for help on using the changeset viewer.