[PLUGINS] ~maj globale
[lhc/web/www.git] / www / plugins / saisies / saisies_options.php
index a64d7dc..c35bebe 100644 (file)
@@ -7,10 +7,11 @@
 **/
 
 // Sécurité
-if (!defined('_ECRIRE_INC_VERSION')) return;
-
+if (!defined('_ECRIRE_INC_VERSION')) {
+       return;
+}
 
-if (!function_exists('_T_ou_typo')){
+if (!function_exists('_T_ou_typo')) {
        /**
         * une fonction qui regarde si $texte est une chaine de langue
         * de la forme <:qqch:>
@@ -24,26 +25,26 @@ if (!function_exists('_T_ou_typo')){
         * @return mixed
         *     Retourne la valeur éventuellement modifiée.
         */
-       function _T_ou_typo($valeur, $mode_typo='toujours') {
+       function _T_ou_typo($valeur, $mode_typo = 'toujours') {
                // Si la valeur est bien une chaine (et pas non plus un entier déguisé)
-               if (is_string($valeur) and !intval($valeur)){
+               if (is_string($valeur) and !intval($valeur)) {
                        // Si la chaine est du type <:truc:> on passe à _T()
-                       if (preg_match('/^\<:(.*?):\>$/', $valeur, $match)) 
+                       if (preg_match('/^\<:(.*?):\>$/', $valeur, $match)) {
                                $valeur = _T($match[1]);
-                       // Sinon on la passe a typo()
-                       else {
-                               if (!in_array($mode_typo, array('toujours', 'multi', 'jamais')))
+                       } else {
+                               // Sinon on la passe a typo()
+                               if (!in_array($mode_typo, array('toujours', 'multi', 'jamais'))) {
                                        $mode_typo = 'toujours';
-                       
-                               if ($mode_typo == 'toujours' or ($mode_typo == 'multi' and strpos($valeur, '<multi>') !== false)){
+                               }
+
+                               if ($mode_typo == 'toujours' or ($mode_typo == 'multi' and strpos($valeur, '<multi>') !== false)) {
                                        include_spip('inc/texte');
                                        $valeur = typo($valeur);
                                }
                        }
-               }
-               // Si c'est un tableau, on reapplique la fonction récursivement
-               elseif (is_array($valeur)){
-                       foreach ($valeur as $cle => $valeur2){
+               } elseif (is_array($valeur)) {
+                       // Si c'est un tableau, on reapplique la fonction récursivement
+                       foreach ($valeur as $cle => $valeur2) {
                                $valeur[$cle] = _T_ou_typo($valeur2, $mode_typo);
                        }
                }
@@ -51,4 +52,3 @@ if (!function_exists('_T_ou_typo')){
                return $valeur;
        }
 }
-