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,11 +94,15 @@ function libreavous_affiche_milieu($flux) {
$texte = '';
$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')) ) {
// pour retrouver la composition, utiliser une fonction existante du plugin "compositions" (cf compositions_fonctions.php)
$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 ($p = strpos($flux['data'], '<!--affiche_milieu-->')) {