|
Revision 16, 1.4 KB
(checked in by alexx, 7 years ago)
|
- cleanup crapy code in dotnode-xml.php
- include new Smarty_dotnode object to fix #14
- modify reset_data.sh bash script to fix log problem
- remove hardcoded ini_set error_log in config (it must bi fixed in vhost, or if not possible: in config_server.inc.php
- fix impossibility to change language in dotpage (cookie name not set correctly)
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | if(valid_lang($token[2])) |
|---|
| 27 | $lang = $token[2]; |
|---|
| 28 | else |
|---|
| 29 | $lang = 'en_US'; |
|---|
| 30 | |
|---|
| 31 | setcookie('lang', $lang, time()+31536000, '/', $config['domain']); |
|---|
| 32 | setcookie('lang', $lang, time()+31536000, '/'); |
|---|
| 33 | |
|---|
| 34 | if(isset($_SESSION['my_id'])) |
|---|
| 35 | $db->query('UPDATE user SET lang=? WHERE id=?', array($lang, $_SESSION['my_id'])); |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | if(array_key_exists('HTTP_REFERER', $_SERVER) ) |
|---|
| 39 | header('Location: '.$_SERVER['HTTP_REFERER']); |
|---|
| 40 | else |
|---|
| 41 | header('Location: /'); |
|---|
| 42 | ?> |
|---|