/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2016 *
+ * Copyright (c) 2001-2017 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
\***************************************************************************/
-if (!defined('_ECRIRE_INC_VERSION')) return;
+/**
+ * Action des changements de langue des objets éditoriaux
+ *
+ * @package SPIP\Core\Edition
+ **/
+
+if (!defined('_ECRIRE_INC_VERSION')) {
+ return;
+}
/**
* Modifier la langue d'un objet
+ *
* @param string $objet
* @param int $id
* @param int $id_rubrique
}
$langues = calculer_langues_utilisees($serveur);
ecrire_meta('langues_utilisees', $langues);
- }
- else {
+ } else {
$langue_parent = sql_getfetsel("lang", "spip_rubriques", "id_rubrique=" . intval($id_rubrique));
- if (!$langue_parent)
+ if (!$langue_parent) {
$langue_parent = $GLOBALS['meta']['langue_site'];
+ }
$changer_lang = $langue_parent;
$set['lang'] = $changer_lang;
if (isset($set['langue_choisie'])){
}
}
}
+
return $changer_lang;
}