Revision 2608,
1.4 KB
checked in by rodsouza, 14 years ago
(diff) |
Ticket #1009 - Garantindo que a variável URL_SERVER esteja populada.
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /**************************************************************************\ |
---|
4 | * Expresso Livre * |
---|
5 | * http://www.expressolivre.org * |
---|
6 | * -------------------------------------------- * |
---|
7 | * This program is free software; you can redistribute it and/or modify it * |
---|
8 | * under the terms of the GNU General Public License as published by the * |
---|
9 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
10 | * option) any later version. * |
---|
11 | \**************************************************************************/ |
---|
12 | |
---|
13 | if ( array_key_exists( 'lang', $_GET ) ) |
---|
14 | $lang = $_GET[ 'lang' ]; |
---|
15 | else |
---|
16 | { |
---|
17 | if ( isset( $_SESSION[ 'phpgw_info' ][ 'expressomail' ][ 'user' ][ 'preferences' ][ 'common' ][ 'lang' ] ) ) |
---|
18 | $lang = $_SESSION[ 'phpgw_info' ][ 'expressomail' ][ 'user' ][ 'preferences' ][ 'common' ][ 'lang' ]; |
---|
19 | } |
---|
20 | |
---|
21 | $array_keys = array(); |
---|
22 | $fn = dirname( __FILE__ ) . "/../setup/phpgw_{$lang}.lang"; |
---|
23 | $lang = array( ); |
---|
24 | |
---|
25 | if ( file_exists( $fn ) ) |
---|
26 | { |
---|
27 | $fp = fopen( $fn, 'r' ); |
---|
28 | while ( $data = fgets( $fp, 16000 ) ) |
---|
29 | { |
---|
30 | list( $message_id, $app_name, $null, $content ) = explode( "\t", substr( $data, 0, -1 ) ); |
---|
31 | $lang[ ] = '"' . str_replace( '"', '\"', strtolower( $message_id ) ) . '" : "' . str_replace( '"', '\"', $content ) . '"'; |
---|
32 | } |
---|
33 | fclose($fp); |
---|
34 | } |
---|
35 | |
---|
36 | echo '{' . implode( ",\n", $lang ) . '}' |
---|
37 | |
---|
38 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.