diff --git a/odt2spip_pipelines.php b/odt2spip_pipelines.php index 9f0e4f7a751478b114fb77245e0e8e3e90a54256..c77868baa84e34ea3a657afa62c7f8b6250e53ab 100644 --- a/odt2spip_pipelines.php +++ b/odt2spip_pipelines.php @@ -15,6 +15,20 @@ if (!defined('_ECRIRE_INC_VERSION')) { return; } +function odt2spip_affiche_gauche($flux){ + if (_SPIP_VERSION_ID < 40000) { + $flux = odt2spip_ajouter_boite_odt_en_colonne($flux); + } + return $flux; +} + +function odt2spip_affiche_droite($flux){ + if (_SPIP_VERSION_ID >= 40000) { + $flux = odt2spip_ajouter_boite_odt_en_colonne($flux); + } + return $flux; +} + /** * Ajout une boite de creation d'un article à partir d'un fichier odt * dans la colonne gauche des pages exec=rubrique @@ -26,7 +40,7 @@ if (!defined('_ECRIRE_INC_VERSION')) { * @param Array $flux Le code de la colonne gauche * @return Array Le code modifié */ -function odt2spip_affiche_gauche($flux) { +function odt2spip_ajouter_boite_odt_en_colonne($flux) { if ( $flux['args']['exec'] == 'rubrique' and $id_rubrique = $flux['args']['id_rubrique'] diff --git a/paquet.xml b/paquet.xml index 08801b273a1ec196636b85e2c99af38f37260081..8da03a97d26505fc937ca3d3713d66f7e7b072fa 100644 --- a/paquet.xml +++ b/paquet.xml @@ -17,6 +17,7 @@ Vasil Yaroshevich, yarosh@raleigh.ru</credit> <pipeline nom="affiche_gauche" inclure="odt2spip_pipelines.php" /> + <pipeline nom="affiche_droite" inclure="odt2spip_pipelines.php" /> <necessite nom="saisies" compatibilite="[3.23.2;]" /> <utilise nom="bigup" compatibilite="[1.0.0-dev;]" />