Changeset 117935 in spip-zone
- Timestamp:
- Sep 24, 2019, 10:00:02 AM (16 months ago)
- Location:
- _plugins_/spip-bonux-3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/spip-bonux-3/paquet.xml
r117933 r117935 2 2 prefix="spip_bonux" 3 3 categorie="outil" 4 version="3.5. 3"4 version="3.5.4" 5 5 etat="stable" 6 6 compatibilite="[3.0.0;3.2.*]" … … 16 16 <auteur>romy.tetue.net</auteur> 17 17 18 <copyright>2008-201 7</copyright>18 <copyright>2008-2019</copyright> 19 19 20 20 <licence lien="http://www.gnu.org/licenses/gpl-3.0.html">GPL</licence> -
_plugins_/spip-bonux-3/spip_bonux_options.php
r117933 r117935 64 64 return $flux; 65 65 } 66 67 66 68 67 if (!function_exists('_T_ou_typo')) { … … 86 85 87 86 // Si la valeur est bien une chaine (et pas non plus un entier déguisé) 88 if (is_string($valeur) and !i ntval($valeur)) {89 // Si on a dépassé 3.2, on peut uniquement utilser typo() car ça extraitles <:chaine:>87 if (is_string($valeur) and !is_numeric($valeur)) { 88 // Si on est en >=3.2, on peut extraire les <:chaine:> 90 89 $version = explode('.',$GLOBALS['spip_version_branche']); 91 if ($version[0] > 3 or ($version[1] >= 2 and $version[0] == 3)) { 90 $extraction_chaines = (($version[0] > 3 or $version[1] >= 2) ? true : false); 91 // Si la chaine est du type <:truc:> on passe à _T() 92 if (strpos($valeur, '<:') !== false 93 and preg_match('/^\<:([^>]*?):\>$/', $valeur, $match)) { 94 $valeur = _T($match[1]); 95 } else { 96 // Sinon on la passe a typo() si c'est pertinent 92 97 if ( 93 $mode_typo == 'toujours' 94 or ( 95 $mode_typo == 'multi' 96 and include_spip('inc/filtres') 97 and (preg_match(_EXTRAIRE_IDIOME, $valeur) or strpos($valeur, '<multi>') !== false) 98 ) 98 $mode_typo === 'toujours' 99 or ($mode_typo === 'multi' and strpos($valeur, '<multi>') !== false) 100 or ($extraction_chaines 101 and $mode_typo === 'multi' 102 and strpos($valeur, '<:') !== false 103 and include_spip('inc/filtres') 104 and preg_match(_EXTRAIRE_IDIOME, $valeur)) 99 105 ) { 100 106 include_spip('inc/texte'); 101 107 $valeur = typo($valeur); 102 } elseif ($mode_typo == 'jamais' and preg_match('/^\<:(.*?):\>$/', $valeur, $match)) {103 $valeur = _T($match[1]);104 }105 }106 // Si on est avant 3.2, on fait comme avant107 else {108 // Si la chaine est du type <:truc:> on passe à _T()109 if (preg_match('/^\<:(.*?):\>$/', $valeur, $match)) {110 $valeur = _T($match[1]);111 } else {112 // Sinon on la passe a typo()113 if ($mode_typo == 'toujours' or ($mode_typo == 'multi' and strpos($valeur, '<multi>') !== false)) {114 include_spip('inc/texte');115 $valeur = typo($valeur);116 }117 108 } 118 109 }
Note: See TracChangeset
for help on using the changeset viewer.