Revision 1121,
1.1 KB
checked in by eduardoalex, 15 years ago
(diff) |
Ticket #548 - Implementação do Expresso (Mail) Offline
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[1036] | 1 | <?php |
---|
[2] | 2 | // Load the lang of the module. |
---|
[1121] | 3 | if(isset($offline_language)) { //Expresso offline, quando o gears sincroniza com uma nova versão, não é dado acesso as sessões do usuário, e é preciso o nome do arquivo de linguagens na session abaixo. |
---|
| 4 | $_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'] = $offline_language; |
---|
| 5 | } |
---|
| 6 | |
---|
[2] | 7 | if(!$_SESSION['phpgw_info']['expressomail']['lang']) |
---|
| 8 | { |
---|
| 9 | $array_keys = array(); |
---|
[604] | 10 | $fn = 'setup/phpgw_'.$_SESSION['phpgw_info']['expressomail']['user']['preferences']['common']['lang'].'.lang'; |
---|
[2] | 11 | if (file_exists($fn)){ |
---|
| 12 | $fp = fopen($fn,'r'); |
---|
| 13 | while ($data = fgets($fp,16000)) { |
---|
| 14 | list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1)); |
---|
| 15 | $_SESSION['phpgw_info']['expressomail']['lang'][$message_id] = $content; |
---|
| 16 | } |
---|
| 17 | fclose($fp); |
---|
| 18 | } |
---|
| 19 | } |
---|
[604] | 20 | |
---|
[566] | 21 | foreach($_SESSION['phpgw_info']['expressomail']['lang'] as $key => $value) |
---|
| 22 | $script .= "array_lang['".str_replace("'","\'",strtolower($key))."'] = '".str_replace("'","\'",$value)."';\n"; |
---|
[604] | 23 | echo "<script type='text/javascript'>$script</script>"; |
---|
[566] | 24 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.