fix : compatibilité SPIP 4.2 suite à suppression d'un define

master v3.0.4
RealET 7 months ago
parent 3200d5f958
commit 6ae4246e09

@ -2,6 +2,8 @@
function accessibilite_pre_liens($texte){
if (!defined('_ACCESSIBILITE_CONSERVER_BULLE')) define('_ACCESSIBILITE_CONSERVER_BULLE', false);
// Compat SPIP 4.2
defined('_RACCOURCI_LIEN') || define('_RACCOURCI_LIEN', '/\[([^][]*?([[][^]>-]*[]][^][]*)*)->(>?)([^]]*)\]/msS');
$regs = $match = array();
// pour chaque lien
if (preg_match_all(_RACCOURCI_LIEN, $texte, $regs, PREG_SET_ORDER)) {
@ -19,12 +21,12 @@ function accessibilite_pre_liens($texte){
);
$textelien = ($intitule[0]) ? $intitule[0]:supprimer_numero(typo($row['T1']));
$langue = ($intitule[2]) ? '{'.$intitule[2].'}':'';
// Si intitulé du lien, le reprendre,
// Si intitul<EFBFBD> du lien, le reprendre,
// Sinon, si titre pour le doc, le reprendre,
// Sinon remplacer par "Document"
$titredoc = ($intitule[0]) ? $intitule[0]:
(($row['T1']) ? $row['T1']:_T('info_document'));
// Quand un title est spécifie il doit etre plus plus long que l'intitule
// Quand un title est sp<EFBFBD>cifie il doit etre plus plus long que l'intitule
// car les lecteurs d'ecran lisent le plus long des deux
$title = ((($intitule[1]) && _ACCESSIBILITE_CONSERVER_BULLE) ?
textebrut(supprimer_numero(typo($intitule[1]))) . ' (' . textebrut(supprimer_numero(typo($titredoc))) . ')':textebrut(supprimer_numero(typo($titredoc)))) // Le texte du lien + Nom du doc

@ -1,9 +1,9 @@
<paquet
prefix="Accessibilite"
categorie="navigation"
version="3.0.3"
version="3.0.4"
etat="stable"
compatibilite="[3.1.0;4.1.*]"
compatibilite="[3.1.0;4.2.*]"
logo="hand-heart-line-64.png"
documentation="https://contrib.spip.net/Accessibilite-pour-les-redacteurs"
>

Loading…
Cancel
Save