X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Faction%2Finstituer_langue_rubrique.php;fp=www%2Fecrire%2Faction%2Finstituer_langue_rubrique.php;h=75fcfc00b674b93cd8995134f68ca634500df1d5;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/action/instituer_langue_rubrique.php b/www/ecrire/action/instituer_langue_rubrique.php new file mode 100644 index 0000000..75fcfc0 --- /dev/null +++ b/www/ecrire/action/instituer_langue_rubrique.php @@ -0,0 +1,46 @@ +0 + AND $GLOBALS['meta']['multi_rubriques'] == 'oui' + AND ($GLOBALS['meta']['multi_secteurs'] == 'non' OR $id_parent == 0)) { + if ($changer_lang != "herit") + sql_updateq('spip_rubriques', array('lang'=>$changer_lang, 'langue_choisie'=>'oui'), "id_rubrique=$id_rubrique"); + else { + if ($id_parent == 0) + $langue_parent = $GLOBALS['meta']['langue_site']; + else { + $langue_parent = sql_getfetsel("lang", "spip_rubriques", "id_rubrique=$id_parent"); + } + sql_updateq('spip_rubriques', array('lang'=>$langue_parent, 'langue_choisie'=>'non'), "id_rubrique=$id_rubrique"); + } + include_spip('inc/rubriques'); + calculer_langues_rubriques(); + + // invalider les caches marques de cette rubrique + include_spip('inc/invalideur'); + suivre_invalideur("id='id_rubrique/$id_rubrique'"); + } +} +?>