From f0715b37a94262b37f0b38df8928ac38083d2830 Mon Sep 17 00:00:00 2001 From: "cedric@yterium.com" <> Date: Mon, 5 Aug 2019 13:49:35 +0000 Subject: [PATCH] derogation rubrique=0 comme pour site=0 : c'est le logo general des rubriques --- action/ajouter_documents.php | 2 +- action/editer_document.php | 2 +- paquet.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/action/ajouter_documents.php b/action/ajouter_documents.php index e3f275d9..211733a3 100644 --- a/action/ajouter_documents.php +++ b/action/ajouter_documents.php @@ -233,7 +233,7 @@ function action_ajouter_un_document_dist($id_document, $file, $objet, $id_objet, // lier le parent si necessaire // attention au cas particulier du site 0 utilisé pour le logo du site - if ($objet and (($id_objet = intval($id_objet)) or $objet=='site')) { + if ($objet and (($id_objet = intval($id_objet)) or in_array($objet, ['site', 'rubrique']))) { $champs['parents'][] = "$objet|$id_objet"; } diff --git a/action/editer_document.php b/action/editer_document.php index cfb57b35..3b717c73 100644 --- a/action/editer_document.php +++ b/action/editer_document.php @@ -281,7 +281,7 @@ function medias_revision_document_parents($id_document, $parents = null, $ajout foreach ($parents as $p) { $p = explode('|', $p); if (preg_match('/^[a-z0-9_]+$/i', $objet = $p[0]) - and (($p[1] = intval($p[1])) or $objet == 'site') + and (($p[1] = intval($p[1])) or in_array($objet, ['site', 'rubrique'])) ) { // securite $objets_parents[$p[0]][] = $p[1]; } diff --git a/paquet.xml b/paquet.xml index d4b4e252..b94831fc 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,7 +1,7 @@ <paquet prefix="medias" categorie="multimedia" - version="2.25.0" + version="2.25.1" etat="stable" compatibilite="[3.3.0-dev;3.3.*]" logo="prive/themes/spip/images/portfolio-32.png" -- GitLab