bouton "importer l'émission" seulement si composition émission

This commit is contained in:
chankalan 2021-10-25 21:52:16 +02:00
parent 79445a64f9
commit 424d98244b

View File

@ -94,10 +94,14 @@ function libreavous_affiche_milieu($flux) {
$texte = ''; $texte = '';
$e = trouver_objet_exec($flux['args']['exec']); $e = trouver_objet_exec($flux['args']['exec']);
if ($e and !$e['edition'] and in_array($e['type'], array('article')) ) { if ( $e and !$e['edition'] and in_array($e['type'], array('article')) ) {
$texte .= recuperer_fond('prive/squelettes/inclure/importer_emission', array( // pour retrouver la composition, utiliser une fonction existante du plugin "compositions" (cf compositions_fonctions.php)
'id_article' => $flux['args'][$e['id_table_objet']] $compo = compositions_heriter('article', $flux['args'][$e['id_table_objet']]);
)); if ($compo == 'emission') {
$texte .= recuperer_fond('prive/squelettes/inclure/importer_emission', array(
'id_article' => $flux['args'][$e['id_table_objet']]
));
}
} }
if ($texte) { if ($texte) {