From bd828e1cdd74bc1581ce6525c765b6f0e1bb4a2e Mon Sep 17 00:00:00 2001 From: "real3t@gmail.com" <> Date: Tue, 17 Jul 2018 10:31:09 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20en=20application=20de=20https://zone.spi?= =?UTF-8?q?p.net/trac/spip-zone/changeset/108693/spip-zone=20Pouvoir=20(en?= =?UTF-8?q?fin!)=20mettre=20des=20,=20'=20et=20"=20dans=20un=20nom=20de=20?= =?UTF-8?q?fichier=20et=20les=20retrouver=20dans=20le=20titre=20du=20docum?= =?UTF-8?q?ent=20import=C3=A9=20par=20SPIP=20!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 1 + inc/titrer_document.php | 9 +++++++++ soyezcreateurs_options.php | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 inc/titrer_document.php diff --git a/.gitattributes b/.gitattributes index 02f92edb..91b3d7b6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -348,6 +348,7 @@ img_pack/soyezcreateurs_help-24.png -text img_pack/soyezcreateurs_help-48.png -text inc/sc_agenda.php -text inc/sc_article.php -text +inc/titrer_document.php -text /inc_mots_article.html -text inclure/agenda_programmation.html -text inclure/agenda_programmation_fonctions.php -text diff --git a/inc/titrer_document.php b/inc/titrer_document.php new file mode 100644 index 00000000..a57aaabd --- /dev/null +++ b/inc/titrer_document.php @@ -0,0 +1,9 @@ +<?php +if (!defined('_ECRIRE_INC_VERSION')) return; + +function inc_titrer_document_dist($titre) { + $titre = substr($titre, 0, strrpos($titre, '.')); // Enlever l'extension du nom du fichier + $titre = preg_replace(',[[:space:]]+,u', ' ', $titre); + $titre = safehtml($titre); + return $titre; +} \ No newline at end of file diff --git a/soyezcreateurs_options.php b/soyezcreateurs_options.php index 0edc650b..fce9951c 100644 --- a/soyezcreateurs_options.php +++ b/soyezcreateurs_options.php @@ -18,7 +18,7 @@ if (!defined('_ACCESSIBILITE_CONSERVER_BULLE')) if (!defined('_LARGEUR_MODE_IMAGE')) define('_LARGEUR_MODE_IMAGE', 799); // Voir http://permalink.gmane.org/gmane.comp.web.spip.zone/16461 if (!defined('_TITRER_DOCUMENTS')) - define('_TITRER_DOCUMENTS', true); // Le titre des documents joints est automatiquement pris à partir du nom du fichier (avec mediatheque) ; Voir https://zone.spip.org/trac/spip-zone/changeset/41565 + define('_TITRER_DOCUMENTS', true); // Le titre des documents joints est automatiquement pris à partir du nom du fichier (avec mediatheque) ; Voir https://zone.spip.org/trac/spip-zone/changeset/41565 et https://zone.spip.net/trac/spip-zone/changeset/108693 if (!defined('_MOTS_CREATION_RETOUR_MOT_CREE')) define('_MOTS_CREATION_RETOUR_MOT_CREE', true); // Revenir au mot clef nouvellement créé. Cf https://zone.spip.net/trac/spip-zone/changeset/110686/spip-zone if (!defined('_AGENDA_CHOIX_RUBRIQUE_OUVERT')) -- GitLab