[SPIP] ~maj 3.0.10 --> 3.0.14
[lhc/web/www.git] / www / ecrire / inc / lang.php
index abfee10..169692e 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2012                                                *
+ *  Copyright (c) 2001-2014                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -141,9 +141,10 @@ function lang_typo($lang='') {
 // avec les memes typo et direction dans l'espace prive que dans le public
 // http://doc.spip.org/@changer_typo
 function changer_typo($lang = '') {
-       global $lang_objet;
-
-       return $lang_objet = $lang ? $lang : $GLOBALS['meta']['langue_site'];
+       if ($lang)
+               $GLOBALS['lang_objet'] = $lang;
+       else
+               unset($GLOBALS['lang_objet']);
 }
 
 //