Changeset 1572


Ignore:
Timestamp:
11/03/09 11:14:50 (14 years ago)
Author:
eduardoalex
Message:

Ticket #712 - corrigida a funcao getLang e o arquivo load_lang para setar o lang na sessao

Location:
trunk/expressoMail1_2/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.functions.inc.php

    r1526 r1572  
    101101                function getLang($key){ 
    102102                        if ($_SESSION['phpgw_info']['expressomail']['lang'][$key]) 
    103                                 return $_SESSION['phpgw_info']['expressomail']['lang'][$key]; 
     103                                return $_SESSION['phpgw_info']['expressomail']['lang'][$key];                    
     104                        else 
     105                                return ($key . '*'); 
    104106                } 
    105107 
  • trunk/expressoMail1_2/inc/load_lang.php

    r1526 r1572  
    55        } 
    66         
     7        if(!$_SESSION['phpgw_info']['expressomail']['lang'])  
     8        { 
    79                $array_keys = array(); 
    810                $fn = 'setup/phpgw_'.$_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'].'.lang';                   
     
    1113                        while ($data = fgets($fp,16000)){ 
    1214                                list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1)); 
    13                                 $script .= "array_lang['".str_replace("'","\'",strtolower($message_id))."'] = '".str_replace("'","\'",$content)."';\n"; 
     15                                $_SESSION['phpgw_info']['expressomail']['lang'][$message_id] =  $content; 
    1416                        } 
    1517                        fclose($fp); 
    1618                } 
     19        } 
     20         
     21        foreach($_SESSION['phpgw_info']['expressomail']['lang'] as $key => $value) 
     22                $script .= "array_lang['".str_replace("'","\'",strtolower($key))."'] = '".str_replace("'","\'",$value)."';\n"; 
    1723        echo "<script type='text/javascript'>$script</script>"; 
    1824?> 
Note: See TracChangeset for help on using the changeset viewer.