Changeset 117936 in spip-zone
- Timestamp:
- Sep 24, 2019, 10:15:02 AM (16 months ago)
- Location:
- _plugins_/saisies/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/saisies/trunk/paquet.xml
r117934 r117936 2 2 prefix="saisies" 3 3 categorie="outil" 4 version="3.28. 5"4 version="3.28.6" 5 5 etat="stable" 6 6 compatibilite="[3.0.0;3.2.*]" -
_plugins_/saisies/trunk/saisies_options.php
r117934 r117936 11 11 return; 12 12 } 13 include_spip('plugins/installer'); 13 14 14 15 if (!function_exists('_T_ou_typo')) { 15 16 /** … … 32 33 33 34 // Si la valeur est bien une chaine (et pas non plus un entier déguisé) 34 if (is_string($valeur) and !i ntval($valeur)) {35 // Si on a dépassé 3.2, on peut uniquement utilser typo() car ça extraitles <:chaine:>35 if (is_string($valeur) and !is_numeric($valeur)) { 36 // Si on est en >=3.2, on peut extraire les <:chaine:> 36 37 $version = explode('.',$GLOBALS['spip_version_branche']); 37 if ($version[0] > 3 or ($version[1] >= 2 and $version[0] == 3)) { 38 $extraction_chaines = (($version[0] > 3 or $version[1] >= 2) ? true : false); 39 // Si la chaine est du type <:truc:> on passe à _T() 40 if (strpos($valeur, '<:') !== false 41 and preg_match('/^\<:([^>]*?):\>$/', $valeur, $match)) { 42 $valeur = _T($match[1]); 43 } else { 44 // Sinon on la passe a typo() si c'est pertinent 38 45 if ( 39 $mode_typo == 'toujours' 40 or ( 41 $mode_typo == 'multi' 42 and include_spip('inc/filtres') 43 and (preg_match(_EXTRAIRE_IDIOME, $valeur) or strpos($valeur, '<multi>') !== false) 44 ) 46 $mode_typo === 'toujours' 47 or ($mode_typo === 'multi' and strpos($valeur, '<multi>') !== false) 48 or ($extraction_chaines 49 and $mode_typo === 'multi' 50 and strpos($valeur, '<:') !== false 51 and include_spip('inc/filtres') 52 and preg_match(_EXTRAIRE_IDIOME, $valeur)) 45 53 ) { 46 54 include_spip('inc/texte'); 47 55 $valeur = typo($valeur); 48 } elseif ($mode_typo == 'jamais' and preg_match('/^\<:(.*?):\>$/', $valeur, $match)) {49 $valeur = _T($match[1]);50 }51 }52 // Si on est avant 3.2, on fait comme avant53 else {54 // Si la chaine est du type <:truc:> on passe à _T()55 if (preg_match('/^\<:(.*?):\>$/', $valeur, $match)) {56 $valeur = _T($match[1]);57 } else {58 // Sinon on la passe a typo()59 if ($mode_typo == 'toujours' or ($mode_typo == 'multi' and strpos($valeur, '<multi>') !== false)) {60 include_spip('inc/texte');61 $valeur = typo($valeur);62 }63 56 } 64 57 }
Note: See TracChangeset
for help on using the changeset viewer.