[ Index ] |
|
Code source de SPIP 1.9.2c |
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2007 * 7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * 8 * * 9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * 10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * 11 \***************************************************************************/ 12 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 15 // http://doc.spip.org/@action_instituer_langue_rubrique_dist 16 function action_instituer_langue_rubrique_dist() { 17 18 $securiser_action = charger_fonction('securiser_action', 'inc'); 19 $arg = $securiser_action(); 20 $changer_lang = _request('changer_lang'); 21 22 list($id_rubrique, $id_parent) = preg_split('/\W/', $arg); 23 24 if ($changer_lang 25 AND $id_rubrique>0 26 AND $GLOBALS['meta']['multi_rubriques'] == 'oui' 27 AND ($GLOBALS['meta']['multi_secteurs'] == 'non' OR $id_parent == 0)) { 28 if ($changer_lang != "herit") 29 spip_query("UPDATE spip_rubriques SET lang=" . _q($changer_lang) . ", langue_choisie='oui' WHERE id_rubrique=$id_rubrique"); 30 else { 31 if ($id_parent == 0) 32 $langue_parent = $GLOBALS['meta']['langue_site']; 33 else { 34 $row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_parent")); 35 $langue_parent = $row['lang']; 36 } 37 spip_query("UPDATE spip_rubriques SET lang=" . _q($langue_parent) . ", langue_choisie='non' WHERE id_rubrique=$id_rubrique"); 38 } 39 include_spip('inc/rubriques'); 40 calculer_rubriques(); 41 calculer_langues_rubriques(); 42 43 // invalider les caches marques de cette rubrique 44 include_spip('inc/invalideur'); 45 suivre_invalideur("id='id_rubrique/$id_rubrique'"); 46 } 47 } 48 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 10:20:27 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |