@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | include_fichiers_fonctions(); |
| 97 | - foreach (array('filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc) as $f) { |
|
| 97 | + foreach (array('filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc) as $f) { |
|
| 98 | 98 | trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels |
| 99 | 99 | // fonction ou name\space\fonction |
| 100 | 100 | if (is_callable($f)) { |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | // affichage "GIT [master: abcdef]" |
| 222 | 222 | $commit = isset($desc['commit_short']) ? $desc['commit_short'] : $desc['commit']; |
| 223 | 223 | if ($desc['branch']) { |
| 224 | - $commit = $desc['branch'] . ': ' . $commit; |
|
| 224 | + $commit = $desc['branch'].': '.$commit; |
|
| 225 | 225 | } |
| 226 | 226 | return "{$desc['vcs']} [$commit]"; |
| 227 | 227 | } |
@@ -240,9 +240,9 @@ discard block |
||
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | // version installee par GIT |
| 243 | - if (lire_fichier($dir . '/.git/HEAD', $c)) { |
|
| 243 | + if (lire_fichier($dir.'/.git/HEAD', $c)) { |
|
| 244 | 244 | $currentHead = trim(substr($c, 4)); |
| 245 | - if (lire_fichier($dir . '/.git/' . $currentHead, $hash)) { |
|
| 245 | + if (lire_fichier($dir.'/.git/'.$currentHead, $hash)) { |
|
| 246 | 246 | return [ |
| 247 | 247 | 'vcs' => 'GIT', |
| 248 | 248 | 'branch' => basename($currentHead), |
@@ -269,8 +269,8 @@ discard block |
||
| 269 | 269 | $dir = '.'; |
| 270 | 270 | } |
| 271 | 271 | // version installee par SVN |
| 272 | - if (file_exists($dir . '/.svn/wc.db') && class_exists('SQLite3')) { |
|
| 273 | - $db = new SQLite3($dir . '/.svn/wc.db'); |
|
| 272 | + if (file_exists($dir.'/.svn/wc.db') && class_exists('SQLite3')) { |
|
| 273 | + $db = new SQLite3($dir.'/.svn/wc.db'); |
|
| 274 | 274 | $result = $db->query('SELECT changed_revision FROM nodes WHERE local_relpath = "" LIMIT 1'); |
| 275 | 275 | if ($result) { |
| 276 | 276 | $row = $result->fetchArray(); |
@@ -309,11 +309,11 @@ discard block |
||
| 309 | 309 | |
| 310 | 310 | // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images |
| 311 | 311 | // et laisser passer les fonctions personnelles baptisees image_... |
| 312 | -$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php'; |
|
| 313 | -$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php'; |
|
| 314 | -$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php'; |
|
| 315 | -$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php'; |
|
| 316 | -$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php'; |
|
| 312 | +$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php'; |
|
| 313 | +$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php'; |
|
| 314 | +$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php'; |
|
| 315 | +$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php'; |
|
| 316 | +$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php'; |
|
| 317 | 317 | |
| 318 | 318 | $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php'; |
| 319 | 319 | $GLOBALS['spip_matrice']['couleur_hex_to_hsl'] = 'inc/filtres_images_mini.php'; |
@@ -472,8 +472,8 @@ discard block |
||
| 472 | 472 | */ |
| 473 | 473 | function filtre_debug($val, $key = null) { |
| 474 | 474 | $debug = ( |
| 475 | - is_null($key) ? '' : (var_export($key, true) . " = ") |
|
| 476 | - ) . var_export($val, true); |
|
| 475 | + is_null($key) ? '' : (var_export($key, true)." = ") |
|
| 476 | + ).var_export($val, true); |
|
| 477 | 477 | |
| 478 | 478 | include_spip('inc/autoriser'); |
| 479 | 479 | if (autoriser('webmestre')) { |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | if (preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match)) { |
| 573 | 573 | $srcover = $match[1]; |
| 574 | 574 | array_shift($args); |
| 575 | - array_unshift($args, "<img src='" . $match[1] . "' />"); |
|
| 575 | + array_unshift($args, "<img src='".$match[1]."' />"); |
|
| 576 | 576 | $srcover_filter = call_user_func_array($filtre, $args); |
| 577 | 577 | $srcover_filter = extraire_attribut($srcover_filter, 'src'); |
| 578 | 578 | $reduit = str_replace($srcover, $srcover_filter, $reduit); |
@@ -643,14 +643,14 @@ discard block |
||
| 643 | 643 | $hauteur_img[$src] = $srcHeight = $srcsize[1]; |
| 644 | 644 | } |
| 645 | 645 | } |
| 646 | - elseif(strpos($src, "<svg") !== false) { |
|
| 646 | + elseif (strpos($src, "<svg") !== false) { |
|
| 647 | 647 | include_spip('inc/svg'); |
| 648 | - if ($attrs = svg_lire_attributs($src)){ |
|
| 648 | + if ($attrs = svg_lire_attributs($src)) { |
|
| 649 | 649 | list($width, $height, $viewbox) = svg_getimagesize_from_attr($attrs); |
| 650 | - if (!$srcWidth){ |
|
| 650 | + if (!$srcWidth) { |
|
| 651 | 651 | $largeur_img[$src] = $srcWidth = $width; |
| 652 | 652 | } |
| 653 | - if (!$srcHeight){ |
|
| 653 | + if (!$srcHeight) { |
|
| 654 | 654 | $hauteur_img[$src] = $srcHeight = $height; |
| 655 | 655 | } |
| 656 | 656 | } |
@@ -934,7 +934,7 @@ discard block |
||
| 934 | 934 | // " -> " et tout ce genre de choses |
| 935 | 935 | $u = $GLOBALS['meta']['pcre_u']; |
| 936 | 936 | $texte = str_replace(" ", " ", $texte); |
| 937 | - $texte = preg_replace('/\s{2,}/S' . $u, " ", $texte); |
|
| 937 | + $texte = preg_replace('/\s{2,}/S'.$u, " ", $texte); |
|
| 938 | 938 | // ne pas echapper les sinqle quotes car certains outils de syndication gerent mal |
| 939 | 939 | $texte = entites_html($texte, false, false); |
| 940 | 940 | // mais bien echapper les double quotes ! |
@@ -994,7 +994,7 @@ discard block |
||
| 994 | 994 | **/ |
| 995 | 995 | function supprimer_numero($texte) { |
| 996 | 996 | return preg_replace( |
| 997 | - ",^[[:space:]]*([0-9]+)([.)]|" . chr(194) . '?' . chr(176) . ")[[:space:]]+,S", |
|
| 997 | + ",^[[:space:]]*([0-9]+)([.)]|".chr(194).'?'.chr(176).")[[:space:]]+,S", |
|
| 998 | 998 | "", $texte); |
| 999 | 999 | } |
| 1000 | 1000 | |
@@ -1019,7 +1019,7 @@ discard block |
||
| 1019 | 1019 | **/ |
| 1020 | 1020 | function recuperer_numero($texte) { |
| 1021 | 1021 | if (preg_match( |
| 1022 | - ",^[[:space:]]*([0-9]+)([.)]|" . chr(194) . '?' . chr(176) . ")[[:space:]]+,S", |
|
| 1022 | + ",^[[:space:]]*([0-9]+)([.)]|".chr(194).'?'.chr(176).")[[:space:]]+,S", |
|
| 1023 | 1023 | $texte, $regs)) { |
| 1024 | 1024 | return strval($regs[1]); |
| 1025 | 1025 | } else { |
@@ -1104,8 +1104,8 @@ discard block |
||
| 1104 | 1104 | **/ |
| 1105 | 1105 | function textebrut($texte) { |
| 1106 | 1106 | $u = $GLOBALS['meta']['pcre_u']; |
| 1107 | - $texte = preg_replace('/\s+/S' . $u, " ", $texte); |
|
| 1108 | - $texte = preg_replace("/<(p|br)( [^>]*)?" . ">/iS", "\n\n", $texte); |
|
| 1107 | + $texte = preg_replace('/\s+/S'.$u, " ", $texte); |
|
| 1108 | + $texte = preg_replace("/<(p|br)( [^>]*)?".">/iS", "\n\n", $texte); |
|
| 1109 | 1109 | $texte = preg_replace("/^\n+/", "", $texte); |
| 1110 | 1110 | $texte = preg_replace("/\n+$/", "", $texte); |
| 1111 | 1111 | $texte = preg_replace("/\n +/", "\n", $texte); |
@@ -1133,7 +1133,7 @@ discard block |
||
| 1133 | 1133 | if (preg_match_all(",(<a\s+[^>]*https?://[^>]*class=[\"']spip_(out|url)\b[^>]+>),imsS", |
| 1134 | 1134 | $texte, $liens, PREG_PATTERN_ORDER)) { |
| 1135 | 1135 | foreach ($liens[0] as $a) { |
| 1136 | - $rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel'); |
|
| 1136 | + $rel = 'noopener noreferrer '.extraire_attribut($a, 'rel'); |
|
| 1137 | 1137 | $ablank = inserer_attribut($a, 'rel', $rel); |
| 1138 | 1138 | $ablank = inserer_attribut($ablank, 'target', '_blank'); |
| 1139 | 1139 | $texte = str_replace($a, $ablank, $texte); |
@@ -1158,7 +1158,7 @@ discard block |
||
| 1158 | 1158 | foreach ($regs[0] as $a) { |
| 1159 | 1159 | $rel = extraire_attribut($a, "rel"); |
| 1160 | 1160 | if (strpos($rel, "nofollow") === false) { |
| 1161 | - $rel = "nofollow" . ($rel ? " $rel" : ""); |
|
| 1161 | + $rel = "nofollow".($rel ? " $rel" : ""); |
|
| 1162 | 1162 | $anofollow = inserer_attribut($a, "rel", $rel); |
| 1163 | 1163 | $texte = str_replace($a, $anofollow, $texte); |
| 1164 | 1164 | } |
@@ -1187,7 +1187,7 @@ discard block |
||
| 1187 | 1187 | $u = $GLOBALS['meta']['pcre_u']; |
| 1188 | 1188 | $texte = preg_replace("@</p>@iS", "\n", $texte); |
| 1189 | 1189 | $texte = preg_replace("@<p\b.*>@UiS", "<br />", $texte); |
| 1190 | - $texte = preg_replace("@^\s*<br />@S" . $u, "", $texte); |
|
| 1190 | + $texte = preg_replace("@^\s*<br />@S".$u, "", $texte); |
|
| 1191 | 1191 | |
| 1192 | 1192 | return $texte; |
| 1193 | 1193 | } |
@@ -1217,7 +1217,7 @@ discard block |
||
| 1217 | 1217 | return $texte; |
| 1218 | 1218 | } |
| 1219 | 1219 | include_spip('inc/texte'); |
| 1220 | - $tag = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $texte) ? |
|
| 1220 | + $tag = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $texte) ? |
|
| 1221 | 1221 | 'div' : 'span'; |
| 1222 | 1222 | |
| 1223 | 1223 | return "<$tag style='word-wrap:break-word;'>$texte</$tag>"; |
@@ -1326,7 +1326,7 @@ discard block |
||
| 1326 | 1326 | function attribut_html($texte, $textebrut = true) { |
| 1327 | 1327 | $u = $GLOBALS['meta']['pcre_u']; |
| 1328 | 1328 | if ($textebrut) { |
| 1329 | - $texte = preg_replace(array(",\n,", ",\s(?=\s),msS" . $u), array(" ", ""), textebrut($texte)); |
|
| 1329 | + $texte = preg_replace(array(",\n,", ",\s(?=\s),msS".$u), array(" ", ""), textebrut($texte)); |
|
| 1330 | 1330 | } |
| 1331 | 1331 | $texte = texte_backend($texte); |
| 1332 | 1332 | $texte = str_replace(array("'", '"'), array(''', '"'), $texte); |
@@ -1355,7 +1355,7 @@ discard block |
||
| 1355 | 1355 | # un message pour abs_url |
| 1356 | 1356 | $GLOBALS['mode_abs_url'] = 'url'; |
| 1357 | 1357 | $url = trim($url); |
| 1358 | - $r = ",^(?:" . _PROTOCOLES_STD . '):?/?/?$,iS'; |
|
| 1358 | + $r = ",^(?:"._PROTOCOLES_STD.'):?/?/?$,iS'; |
|
| 1359 | 1359 | |
| 1360 | 1360 | return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url); |
| 1361 | 1361 | } |
@@ -1557,14 +1557,14 @@ discard block |
||
| 1557 | 1557 | if (strpos($texte, "<") !== false) { |
| 1558 | 1558 | include_spip('inc/lien'); |
| 1559 | 1559 | if (defined('_PREG_MODELE')) { |
| 1560 | - $preg_modeles = "@" . _PREG_MODELE . "@imsS"; |
|
| 1560 | + $preg_modeles = "@"._PREG_MODELE."@imsS"; |
|
| 1561 | 1561 | $texte = echappe_html($texte, '', true, $preg_modeles); |
| 1562 | 1562 | } |
| 1563 | 1563 | } |
| 1564 | 1564 | |
| 1565 | 1565 | $debut = ''; |
| 1566 | 1566 | $suite = $texte; |
| 1567 | - while ($t = strpos('-' . $suite, "\n", 1)) { |
|
| 1567 | + while ($t = strpos('-'.$suite, "\n", 1)) { |
|
| 1568 | 1568 | $debut .= substr($suite, 0, $t - 1); |
| 1569 | 1569 | $suite = substr($suite, $t); |
| 1570 | 1570 | $car = substr($suite, 0, 1); |
@@ -1581,11 +1581,11 @@ discard block |
||
| 1581 | 1581 | $suite = substr($suite, strlen($regs[0])); |
| 1582 | 1582 | } |
| 1583 | 1583 | } |
| 1584 | - $texte = $debut . $suite; |
|
| 1584 | + $texte = $debut.$suite; |
|
| 1585 | 1585 | |
| 1586 | 1586 | $texte = echappe_retour($texte); |
| 1587 | 1587 | |
| 1588 | - return $texte . $fin; |
|
| 1588 | + return $texte.$fin; |
|
| 1589 | 1589 | } |
| 1590 | 1590 | |
| 1591 | 1591 | |
@@ -1646,7 +1646,7 @@ discard block |
||
| 1646 | 1646 | } |
| 1647 | 1647 | |
| 1648 | 1648 | foreach ($regs as $reg) { |
| 1649 | - $cle = ($reg[1] ? $reg[1] . ':' : '') . $reg[2]; |
|
| 1649 | + $cle = ($reg[1] ? $reg[1].':' : '').$reg[2]; |
|
| 1650 | 1650 | $desc = $traduire($cle, $lang, true); |
| 1651 | 1651 | $l = $desc->langue; |
| 1652 | 1652 | // si pas de traduction, on laissera l'écriture de l'idiome entier dans le texte. |
@@ -1759,9 +1759,9 @@ discard block |
||
| 1759 | 1759 | // il ne faut pas echapper en div si propre produit un seul paragraphe |
| 1760 | 1760 | include_spip('inc/texte'); |
| 1761 | 1761 | $trad_propre = preg_replace(",(^<p[^>]*>|</p>$),Uims", "", propre($trad)); |
| 1762 | - $mode = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $trad_propre) ? 'div' : 'span'; |
|
| 1762 | + $mode = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $trad_propre) ? 'div' : 'span'; |
|
| 1763 | 1763 | if ($mode === 'div') { |
| 1764 | - $trad = rtrim($trad) . "\n\n"; |
|
| 1764 | + $trad = rtrim($trad)."\n\n"; |
|
| 1765 | 1765 | } |
| 1766 | 1766 | $trad = code_echappement($trad, 'multi', false, $mode); |
| 1767 | 1767 | $trad = str_replace("'", '"', inserer_attribut($trad, 'lang', $l)); |
@@ -1955,7 +1955,7 @@ discard block |
||
| 1955 | 1955 | if (is_array($balise)) { |
| 1956 | 1956 | array_walk( |
| 1957 | 1957 | $balise, |
| 1958 | - function(&$a, $key, $t){ |
|
| 1958 | + function(&$a, $key, $t) { |
|
| 1959 | 1959 | $a = extraire_attribut($a, $t); |
| 1960 | 1960 | }, |
| 1961 | 1961 | $attribut |
@@ -2042,14 +2042,14 @@ discard block |
||
| 2042 | 2042 | |
| 2043 | 2043 | if ($old !== null) { |
| 2044 | 2044 | // Remplacer l'ancien attribut du meme nom |
| 2045 | - $balise = $r[1] . $insert . $r[5]; |
|
| 2045 | + $balise = $r[1].$insert.$r[5]; |
|
| 2046 | 2046 | } else { |
| 2047 | 2047 | // preferer une balise " />" (comme <img />) |
| 2048 | 2048 | if (preg_match(',/>,', $balise)) { |
| 2049 | - $balise = preg_replace(",\s?/>,S", $insert . " />", $balise, 1); |
|
| 2049 | + $balise = preg_replace(",\s?/>,S", $insert." />", $balise, 1); |
|
| 2050 | 2050 | } // sinon une balise <a ...> ... </a> |
| 2051 | 2051 | else { |
| 2052 | - $balise = preg_replace(",\s?>,S", $insert . ">", $balise, 1); |
|
| 2052 | + $balise = preg_replace(",\s?>,S", $insert.">", $balise, 1); |
|
| 2053 | 2053 | } |
| 2054 | 2054 | } |
| 2055 | 2055 | |
@@ -2082,7 +2082,7 @@ discard block |
||
| 2082 | 2082 | * @param string $operation |
| 2083 | 2083 | * @return string |
| 2084 | 2084 | */ |
| 2085 | -function modifier_class($balise, $class, $operation='ajouter') { |
|
| 2085 | +function modifier_class($balise, $class, $operation = 'ajouter') { |
|
| 2086 | 2086 | if (is_string($class)) { |
| 2087 | 2087 | $class = explode(' ', trim($class)); |
| 2088 | 2088 | } |
@@ -2107,7 +2107,7 @@ discard block |
||
| 2107 | 2107 | } |
| 2108 | 2108 | if (in_array($operation, ['ajouter', 'commuter']) |
| 2109 | 2109 | and !$is_class_presente) { |
| 2110 | - $class_new = rtrim($class_new) . " " . $c; |
|
| 2110 | + $class_new = rtrim($class_new)." ".$c; |
|
| 2111 | 2111 | } |
| 2112 | 2112 | elseif (in_array($operation, ['supprimer', 'commuter']) |
| 2113 | 2113 | and $is_class_presente) { |
@@ -2135,7 +2135,7 @@ discard block |
||
| 2135 | 2135 | * @param string|array $class |
| 2136 | 2136 | * @return string |
| 2137 | 2137 | */ |
| 2138 | -function ajouter_class($balise, $class){ |
|
| 2138 | +function ajouter_class($balise, $class) { |
|
| 2139 | 2139 | return modifier_class($balise, $class, 'ajouter'); |
| 2140 | 2140 | } |
| 2141 | 2141 | |
@@ -2145,7 +2145,7 @@ discard block |
||
| 2145 | 2145 | * @param string|array $class |
| 2146 | 2146 | * @return string |
| 2147 | 2147 | */ |
| 2148 | -function supprimer_class($balise, $class){ |
|
| 2148 | +function supprimer_class($balise, $class) { |
|
| 2149 | 2149 | return modifier_class($balise, $class, 'supprimer'); |
| 2150 | 2150 | } |
| 2151 | 2151 | |
@@ -2156,7 +2156,7 @@ discard block |
||
| 2156 | 2156 | * @param string|array $class |
| 2157 | 2157 | * @return string |
| 2158 | 2158 | */ |
| 2159 | -function commuter_class($balise, $class){ |
|
| 2159 | +function commuter_class($balise, $class) { |
|
| 2160 | 2160 | return modifier_class($balise, $class, 'commuter'); |
| 2161 | 2161 | } |
| 2162 | 2162 | |
@@ -2176,8 +2176,8 @@ discard block |
||
| 2176 | 2176 | // |
| 2177 | 2177 | // Quelques fonctions de calcul arithmetique |
| 2178 | 2178 | // |
| 2179 | -function floatstr($a) { return str_replace(',','.',(string)floatval($a)); } |
|
| 2180 | -function strize($f, $a, $b) { return floatstr($f(floatstr($a),floatstr($b))); } |
|
| 2179 | +function floatstr($a) { return str_replace(',', '.', (string) floatval($a)); } |
|
| 2180 | +function strize($f, $a, $b) { return floatstr($f(floatstr($a), floatstr($b))); } |
|
| 2181 | 2181 | |
| 2182 | 2182 | /** |
| 2183 | 2183 | * Additionne 2 nombres |
@@ -2197,7 +2197,7 @@ discard block |
||
| 2197 | 2197 | function plus($a, $b) { |
| 2198 | 2198 | return $a + $b; |
| 2199 | 2199 | } |
| 2200 | -function strplus($a, $b) {return strize('plus', $a, $b);} |
|
| 2200 | +function strplus($a, $b) {return strize('plus', $a, $b); } |
|
| 2201 | 2201 | /** |
| 2202 | 2202 | * Soustrait 2 nombres |
| 2203 | 2203 | * |
@@ -2216,7 +2216,7 @@ discard block |
||
| 2216 | 2216 | function moins($a, $b) { |
| 2217 | 2217 | return $a - $b; |
| 2218 | 2218 | } |
| 2219 | -function strmoins($a, $b) {return strize('moins', $a, $b);} |
|
| 2219 | +function strmoins($a, $b) {return strize('moins', $a, $b); } |
|
| 2220 | 2220 | |
| 2221 | 2221 | /** |
| 2222 | 2222 | * Multiplie 2 nombres |
@@ -2237,7 +2237,7 @@ discard block |
||
| 2237 | 2237 | function mult($a, $b) { |
| 2238 | 2238 | return $a * $b; |
| 2239 | 2239 | } |
| 2240 | -function strmult($a, $b) {return strize('mult', $a, $b);} |
|
| 2240 | +function strmult($a, $b) {return strize('mult', $a, $b); } |
|
| 2241 | 2241 | |
| 2242 | 2242 | /** |
| 2243 | 2243 | * Divise 2 nombres |
@@ -2258,7 +2258,7 @@ discard block |
||
| 2258 | 2258 | function div($a, $b) { |
| 2259 | 2259 | return $b ? $a / $b : 0; |
| 2260 | 2260 | } |
| 2261 | -function strdiv($a, $b) {return strize('div', $a, $b);} |
|
| 2261 | +function strdiv($a, $b) {return strize('div', $a, $b); } |
|
| 2262 | 2262 | |
| 2263 | 2263 | /** |
| 2264 | 2264 | * Retourne le modulo 2 nombres |
@@ -2299,13 +2299,13 @@ discard block |
||
| 2299 | 2299 | if (!defined('_TAGS_NOM_AUTEUR')) { |
| 2300 | 2300 | define('_TAGS_NOM_AUTEUR', ''); |
| 2301 | 2301 | } |
| 2302 | - $tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR)); |
|
| 2302 | + $tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR)); |
|
| 2303 | 2303 | foreach ($tags_acceptes as $tag) { |
| 2304 | 2304 | if (strlen($tag)) { |
| 2305 | - $remp1[] = '<' . trim($tag) . '>'; |
|
| 2306 | - $remp1[] = '</' . trim($tag) . '>'; |
|
| 2307 | - $remp2[] = '\x60' . trim($tag) . '\x61'; |
|
| 2308 | - $remp2[] = '\x60/' . trim($tag) . '\x61'; |
|
| 2305 | + $remp1[] = '<'.trim($tag).'>'; |
|
| 2306 | + $remp1[] = '</'.trim($tag).'>'; |
|
| 2307 | + $remp2[] = '\x60'.trim($tag).'\x61'; |
|
| 2308 | + $remp2[] = '\x60/'.trim($tag).'\x61'; |
|
| 2309 | 2309 | } |
| 2310 | 2310 | } |
| 2311 | 2311 | $v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom))); |
@@ -2355,7 +2355,7 @@ discard block |
||
| 2355 | 2355 | $s[] = preg_replace(',>[^<]+</a>,S', |
| 2356 | 2356 | '>' |
| 2357 | 2357 | . http_img_pack('attachment-16.png', $t, |
| 2358 | - 'title="' . attribut_html($t) . '"') |
|
| 2358 | + 'title="'.attribut_html($t).'"') |
|
| 2359 | 2359 | . '</a>', $tag); |
| 2360 | 2360 | } |
| 2361 | 2361 | } |
@@ -2416,10 +2416,10 @@ discard block |
||
| 2416 | 2416 | $fichier = basename($url); |
| 2417 | 2417 | |
| 2418 | 2418 | return '<a rel="enclosure"' |
| 2419 | - . ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2420 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2421 | - . ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '') |
|
| 2422 | - . '>' . $fichier . '</a>'; |
|
| 2419 | + . ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2420 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2421 | + . ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '') |
|
| 2422 | + . '>'.$fichier.'</a>'; |
|
| 2423 | 2423 | } |
| 2424 | 2424 | |
| 2425 | 2425 | /** |
@@ -2447,9 +2447,9 @@ discard block |
||
| 2447 | 2447 | } # vieux data |
| 2448 | 2448 | $fichier = basename($url); |
| 2449 | 2449 | $enclosures[] = '<enclosure' |
| 2450 | - . ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2451 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2452 | - . ($length ? ' length="' . $length . '"' : '') |
|
| 2450 | + . ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2451 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2452 | + . ($length ? ' length="'.$length.'"' : '') |
|
| 2453 | 2453 | . ' />'; |
| 2454 | 2454 | } |
| 2455 | 2455 | } |
@@ -2475,7 +2475,7 @@ discard block |
||
| 2475 | 2475 | if (extraire_attribut($e, 'rel') == 'tag') { |
| 2476 | 2476 | $subjects .= '<dc:subject>' |
| 2477 | 2477 | . texte_backend(textebrut($e)) |
| 2478 | - . '</dc:subject>' . "\n"; |
|
| 2478 | + . '</dc:subject>'."\n"; |
|
| 2479 | 2479 | } |
| 2480 | 2480 | } |
| 2481 | 2481 | |
@@ -2511,7 +2511,7 @@ discard block |
||
| 2511 | 2511 | if (is_array($texte)) { |
| 2512 | 2512 | array_walk( |
| 2513 | 2513 | $texte, |
| 2514 | - function(&$a, $key, $t){ |
|
| 2514 | + function(&$a, $key, $t) { |
|
| 2515 | 2515 | $a = extraire_balise($a, $t); |
| 2516 | 2516 | }, |
| 2517 | 2517 | $tag |
@@ -2555,7 +2555,7 @@ discard block |
||
| 2555 | 2555 | if (is_array($texte)) { |
| 2556 | 2556 | array_walk( |
| 2557 | 2557 | $texte, |
| 2558 | - function(&$a, $key, $t){ |
|
| 2558 | + function(&$a, $key, $t) { |
|
| 2559 | 2559 | $a = extraire_balises($a, $t); |
| 2560 | 2560 | }, |
| 2561 | 2561 | $tag |
@@ -2681,7 +2681,7 @@ discard block |
||
| 2681 | 2681 | if ($fond != '404') { |
| 2682 | 2682 | $contexte = array_shift($p); |
| 2683 | 2683 | $contexte['page'] = $fond; |
| 2684 | - $action = preg_replace('/([?]' . preg_quote($fond) . '[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2684 | + $action = preg_replace('/([?]'.preg_quote($fond).'[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2685 | 2685 | } |
| 2686 | 2686 | } |
| 2687 | 2687 | // defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url |
@@ -2736,9 +2736,9 @@ discard block |
||
| 2736 | 2736 | . '"' |
| 2737 | 2737 | . (is_null($val) |
| 2738 | 2738 | ? '' |
| 2739 | - : ' value="' . entites_html($val) . '"' |
|
| 2739 | + : ' value="'.entites_html($val).'"' |
|
| 2740 | 2740 | ) |
| 2741 | - . ' type="hidden"' . "\n/>"; |
|
| 2741 | + . ' type="hidden"'."\n/>"; |
|
| 2742 | 2742 | } |
| 2743 | 2743 | |
| 2744 | 2744 | return join("", $hidden); |
@@ -2875,7 +2875,7 @@ discard block |
||
| 2875 | 2875 | return preg_replace_callback( |
| 2876 | 2876 | ",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims", |
| 2877 | 2877 | function($x) use ($path) { |
| 2878 | - return "url('" . suivre_lien($path, $x[1]) . "')"; |
|
| 2878 | + return "url('".suivre_lien($path, $x[1])."')"; |
|
| 2879 | 2879 | }, |
| 2880 | 2880 | $contenu |
| 2881 | 2881 | ); |
@@ -2937,14 +2937,14 @@ discard block |
||
| 2937 | 2937 | ) { |
| 2938 | 2938 | $distant = true; |
| 2939 | 2939 | $cssf = parse_url($css); |
| 2940 | - $cssf = $cssf['path'] . ($cssf['query'] ? "?" . $cssf['query'] : ""); |
|
| 2940 | + $cssf = $cssf['path'].($cssf['query'] ? "?".$cssf['query'] : ""); |
|
| 2941 | 2941 | $cssf = preg_replace(',[?:&=],', "_", $cssf); |
| 2942 | 2942 | } else { |
| 2943 | 2943 | $distant = false; |
| 2944 | 2944 | $cssf = $css; |
| 2945 | 2945 | // 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi |
| 2946 | 2946 | //propose (rien a faire dans ce cas) |
| 2947 | - $f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css); |
|
| 2947 | + $f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css); |
|
| 2948 | 2948 | if (@file_exists($f)) { |
| 2949 | 2949 | return $f; |
| 2950 | 2950 | } |
@@ -2954,7 +2954,7 @@ discard block |
||
| 2954 | 2954 | $dir_var = sous_repertoire(_DIR_VAR, 'cache-css'); |
| 2955 | 2955 | $f = $dir_var |
| 2956 | 2956 | . preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf) |
| 2957 | - . '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css'; |
|
| 2957 | + . '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css'; |
|
| 2958 | 2958 | |
| 2959 | 2959 | // la css peut etre distante (url absolue !) |
| 2960 | 2960 | if ($distant) { |
@@ -2999,8 +2999,8 @@ discard block |
||
| 2999 | 2999 | } // si la css_direction commence par $dir_var on la fait passer pour une absolue |
| 3000 | 3000 | elseif (substr($css_direction, 0, strlen($dir_var)) == $dir_var) { |
| 3001 | 3001 | $css_direction = substr($css_direction, strlen($dir_var)); |
| 3002 | - $src_faux_abs["/@@@@@@/" . $css_direction] = $css_direction; |
|
| 3003 | - $css_direction = "/@@@@@@/" . $css_direction; |
|
| 3002 | + $src_faux_abs["/@@@@@@/".$css_direction] = $css_direction; |
|
| 3003 | + $css_direction = "/@@@@@@/".$css_direction; |
|
| 3004 | 3004 | } |
| 3005 | 3005 | $src[] = $regs[0][$k]; |
| 3006 | 3006 | $src_direction_css[] = str_replace($import_css, $css_direction, $regs[0][$k]); |
@@ -3049,7 +3049,7 @@ discard block |
||
| 3049 | 3049 | |
| 3050 | 3050 | $f = basename($css, '.css'); |
| 3051 | 3051 | $f = sous_repertoire(_DIR_VAR, 'cache-css') |
| 3052 | - . preg_replace(",(.*?)(_rtl|_ltr)?$,", "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f) |
|
| 3052 | + . preg_replace(",(.*?)(_rtl|_ltr)?$,", "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f) |
|
| 3053 | 3053 | . '.css'; |
| 3054 | 3054 | |
| 3055 | 3055 | if ((@filemtime($f) > @filemtime($css)) and (_VAR_MODE != 'recalcul')) { |
@@ -3058,7 +3058,7 @@ discard block |
||
| 3058 | 3058 | |
| 3059 | 3059 | if ($url_absolue_css == $css) { |
| 3060 | 3060 | if (strncmp($GLOBALS['meta']['adresse_site'], $css, $l = strlen($GLOBALS['meta']['adresse_site'])) != 0 |
| 3061 | - or !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu) |
|
| 3061 | + or !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu) |
|
| 3062 | 3062 | ) { |
| 3063 | 3063 | include_spip('inc/distant'); |
| 3064 | 3064 | if (!$contenu = recuperer_page($css)) { |
@@ -3168,7 +3168,7 @@ discard block |
||
| 3168 | 3168 | $expression = str_replace("\/", "/", $expression); |
| 3169 | 3169 | $expression = str_replace("/", "\/", $expression); |
| 3170 | 3170 | |
| 3171 | - if (preg_match('/' . $expression . '/' . $modif, $texte, $r)) { |
|
| 3171 | + if (preg_match('/'.$expression.'/'.$modif, $texte, $r)) { |
|
| 3172 | 3172 | if (isset($r[$capte])) { |
| 3173 | 3173 | return $r[$capte]; |
| 3174 | 3174 | } else { |
@@ -3206,7 +3206,7 @@ discard block |
||
| 3206 | 3206 | $expression = str_replace("\/", "/", $expression); |
| 3207 | 3207 | $expression = str_replace("/", "\/", $expression); |
| 3208 | 3208 | |
| 3209 | - return preg_replace('/' . $expression . '/' . $modif, $replace, $texte); |
|
| 3209 | + return preg_replace('/'.$expression.'/'.$modif, $replace, $texte); |
|
| 3210 | 3210 | } |
| 3211 | 3211 | |
| 3212 | 3212 | |
@@ -3225,7 +3225,7 @@ discard block |
||
| 3225 | 3225 | function traiter_doublons_documents(&$doublons, $letexte) { |
| 3226 | 3226 | |
| 3227 | 3227 | // Verifier dans le texte & les notes (pas beau, helas) |
| 3228 | - $t = $letexte . $GLOBALS['les_notes']; |
|
| 3228 | + $t = $letexte.$GLOBALS['les_notes']; |
|
| 3229 | 3229 | |
| 3230 | 3230 | if (strstr($t, 'spip_document_') // evite le preg_match_all si inutile |
| 3231 | 3231 | and preg_match_all( |
@@ -3235,7 +3235,7 @@ discard block |
||
| 3235 | 3235 | if (!isset($doublons['documents'])) { |
| 3236 | 3236 | $doublons['documents'] = ""; |
| 3237 | 3237 | } |
| 3238 | - $doublons['documents'] .= "," . join(',', $matches[1]); |
|
| 3238 | + $doublons['documents'] .= ",".join(',', $matches[1]); |
|
| 3239 | 3239 | } |
| 3240 | 3240 | |
| 3241 | 3241 | return $letexte; |
@@ -3292,7 +3292,7 @@ discard block |
||
| 3292 | 3292 | if ($env) { |
| 3293 | 3293 | foreach ($env as $i => $j) { |
| 3294 | 3294 | if (is_string($j) and !in_array($i, $ignore_params)) { |
| 3295 | - $texte .= "<param name='" . attribut_html($i) . "'\n\tvalue='" . attribut_html($j) . "' />"; |
|
| 3295 | + $texte .= "<param name='".attribut_html($i)."'\n\tvalue='".attribut_html($j)."' />"; |
|
| 3296 | 3296 | } |
| 3297 | 3297 | } |
| 3298 | 3298 | } |
@@ -3331,7 +3331,7 @@ discard block |
||
| 3331 | 3331 | if ($env) { |
| 3332 | 3332 | foreach ($env as $i => $j) { |
| 3333 | 3333 | if (is_string($j) and !in_array($i, $ignore_params)) { |
| 3334 | - $texte .= attribut_html($i) . "='" . attribut_html($j) . "' "; |
|
| 3334 | + $texte .= attribut_html($i)."='".attribut_html($j)."' "; |
|
| 3335 | 3335 | } |
| 3336 | 3336 | } |
| 3337 | 3337 | } |
@@ -3415,19 +3415,19 @@ discard block |
||
| 3415 | 3415 | |
| 3416 | 3416 | $img_file = $img; |
| 3417 | 3417 | if ($p = strpos($img_file, '?')) { |
| 3418 | - $img_file = substr($img_file,0, $p); |
|
| 3418 | + $img_file = substr($img_file, 0, $p); |
|
| 3419 | 3419 | } |
| 3420 | 3420 | if (!isset($options['chemin_image']) or $options['chemin_image'] == true) { |
| 3421 | 3421 | $img_file = chemin_image($img); |
| 3422 | 3422 | } |
| 3423 | 3423 | else { |
| 3424 | - if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true){ |
|
| 3424 | + if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true) { |
|
| 3425 | 3425 | // on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png |
| 3426 | 3426 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 3427 | 3427 | if (preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m) |
| 3428 | - and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . "-xx.svg" |
|
| 3428 | + and $variante_svg_generique = substr($img_file, 0, -strlen($m[0]))."-xx.svg" |
|
| 3429 | 3429 | and file_exists($variante_svg_generique)) { |
| 3430 | - if ($variante_svg_size = substr($variante_svg_generique,0,-6) . $m[1] . ".svg" and file_exists($variante_svg_size)) { |
|
| 3430 | + if ($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].".svg" and file_exists($variante_svg_size)) { |
|
| 3431 | 3431 | $img_file = $variante_svg_size; |
| 3432 | 3432 | } |
| 3433 | 3433 | else { |
@@ -3452,7 +3452,7 @@ discard block |
||
| 3452 | 3452 | return ""; |
| 3453 | 3453 | } |
| 3454 | 3454 | } |
| 3455 | - $atts .= " width='" . $largeur . "' height='" . $hauteur . "'"; |
|
| 3455 | + $atts .= " width='".$largeur."' height='".$hauteur."'"; |
|
| 3456 | 3456 | } |
| 3457 | 3457 | |
| 3458 | 3458 | if (file_exists($img_file)) { |
@@ -3461,15 +3461,15 @@ discard block |
||
| 3461 | 3461 | if ($alt === false) { |
| 3462 | 3462 | $alt = ''; |
| 3463 | 3463 | } |
| 3464 | - elseif($alt or $alt==='') { |
|
| 3464 | + elseif ($alt or $alt === '') { |
|
| 3465 | 3465 | $alt = " alt='".attribut_html($alt)."'"; |
| 3466 | 3466 | } |
| 3467 | 3467 | else { |
| 3468 | 3468 | $alt = " alt='".attribut_html($title)."'"; |
| 3469 | 3469 | } |
| 3470 | 3470 | return "<img src='$img_file'$alt" |
| 3471 | - . ($title ? ' title="' . attribut_html($title) . '"' : '') |
|
| 3472 | - . " " . ltrim($atts) |
|
| 3471 | + . ($title ? ' title="'.attribut_html($title).'"' : '') |
|
| 3472 | + . " ".ltrim($atts) |
|
| 3473 | 3473 | . " />"; |
| 3474 | 3474 | } |
| 3475 | 3475 | |
@@ -3481,12 +3481,12 @@ discard block |
||
| 3481 | 3481 | * @param string $size |
| 3482 | 3482 | * @return string |
| 3483 | 3483 | */ |
| 3484 | -function http_style_background($img, $att = '', $size=null) { |
|
| 3485 | - if ($size and is_numeric($size)){ |
|
| 3486 | - $size = trim($size) . "px"; |
|
| 3484 | +function http_style_background($img, $att = '', $size = null) { |
|
| 3485 | + if ($size and is_numeric($size)) { |
|
| 3486 | + $size = trim($size)."px"; |
|
| 3487 | 3487 | } |
| 3488 | - return " style='background" . |
|
| 3489 | - ($att ? "" : "-image") . ": url(\"" . chemin_image($img) . "\")" . ($att ? (' ' . $att) : '') . ";" |
|
| 3488 | + return " style='background". |
|
| 3489 | + ($att ? "" : "-image").": url(\"".chemin_image($img)."\")".($att ? (' '.$att) : '').";" |
|
| 3490 | 3490 | . ($size ? "background-size:{$size};" : '') |
| 3491 | 3491 | . "'"; |
| 3492 | 3492 | } |
@@ -3512,7 +3512,7 @@ discard block |
||
| 3512 | 3512 | $args[] = $maybe_size; |
| 3513 | 3513 | $maybe_size = null; |
| 3514 | 3514 | } |
| 3515 | - while (count($args)<2) { |
|
| 3515 | + while (count($args) < 2) { |
|
| 3516 | 3516 | $args[] = null; // default alt or class |
| 3517 | 3517 | } |
| 3518 | 3518 | $args[] = $maybe_size; |
@@ -3522,7 +3522,7 @@ discard block |
||
| 3522 | 3522 | |
| 3523 | 3523 | function helper_filtre_balise_img_svg_size($img, $size) { |
| 3524 | 3524 | // si size est de la forme '@2x' c'est un coeff multiplicateur sur la densite |
| 3525 | - if (strpos($size, '@') === 0 and substr($size,-1) === 'x') { |
|
| 3525 | + if (strpos($size, '@') === 0 and substr($size, -1) === 'x') { |
|
| 3526 | 3526 | $coef = floatval(substr($size, 1, -1)); |
| 3527 | 3527 | list($h, $w) = taille_image($img); |
| 3528 | 3528 | $height = intval(round($h / $coef)); |
@@ -3577,7 +3577,7 @@ discard block |
||
| 3577 | 3577 | * @return string |
| 3578 | 3578 | * Code HTML de la balise IMG |
| 3579 | 3579 | */ |
| 3580 | -function filtre_balise_img_dist($img, $alt = '', $class = null, $size=null) { |
|
| 3580 | +function filtre_balise_img_dist($img, $alt = '', $class = null, $size = null) { |
|
| 3581 | 3581 | |
| 3582 | 3582 | list($alt, $class, $size) = helper_filtre_balise_img_svg_arguments($alt, $class, $size); |
| 3583 | 3583 | |
@@ -3596,7 +3596,7 @@ discard block |
||
| 3596 | 3596 | } |
| 3597 | 3597 | } |
| 3598 | 3598 | else { |
| 3599 | - $img = http_img_pack($img, $alt, $class ? " class='" . attribut_html($class) . "'" : '', '', |
|
| 3599 | + $img = http_img_pack($img, $alt, $class ? " class='".attribut_html($class)."'" : '', '', |
|
| 3600 | 3600 | array('chemin_image' => false, 'utiliser_suffixe_size' => false)); |
| 3601 | 3601 | if (is_null($alt)) { |
| 3602 | 3602 | $img = vider_attribut($img, 'alt'); |
@@ -3642,16 +3642,16 @@ discard block |
||
| 3642 | 3642 | * @return string |
| 3643 | 3643 | * Code HTML de la balise SVG |
| 3644 | 3644 | */ |
| 3645 | -function filtre_balise_svg_dist($img, $alt = '', $class = null, $size=null) { |
|
| 3645 | +function filtre_balise_svg_dist($img, $alt = '', $class = null, $size = null) { |
|
| 3646 | 3646 | |
| 3647 | 3647 | $img = trim($img); |
| 3648 | 3648 | $img_file = $img; |
| 3649 | - if (strpos($img, '<svg') === false){ |
|
| 3650 | - if ($p = strpos($img_file, '?')){ |
|
| 3649 | + if (strpos($img, '<svg') === false) { |
|
| 3650 | + if ($p = strpos($img_file, '?')) { |
|
| 3651 | 3651 | $img_file = substr($img_file, 0, $p); |
| 3652 | 3652 | } |
| 3653 | 3653 | |
| 3654 | - if (!$img_file or !$svg = file_get_contents($img_file)){ |
|
| 3654 | + if (!$img_file or !$svg = file_get_contents($img_file)) { |
|
| 3655 | 3655 | return ''; |
| 3656 | 3656 | } |
| 3657 | 3657 | } |
@@ -3666,7 +3666,7 @@ discard block |
||
| 3666 | 3666 | $balise_svg_source = $balise_svg; |
| 3667 | 3667 | |
| 3668 | 3668 | // entete XML à supprimer |
| 3669 | - $svg = preg_replace(',^\s*<\?xml[^>]*\?' . '>,', '', $svg); |
|
| 3669 | + $svg = preg_replace(',^\s*<\?xml[^>]*\?'.'>,', '', $svg); |
|
| 3670 | 3670 | |
| 3671 | 3671 | // IE est toujours mon ami |
| 3672 | 3672 | $balise_svg = inserer_attribut($balise_svg, 'focusable', 'false'); |
@@ -3682,11 +3682,11 @@ discard block |
||
| 3682 | 3682 | } |
| 3683 | 3683 | |
| 3684 | 3684 | // regler le alt |
| 3685 | - if ($alt){ |
|
| 3685 | + if ($alt) { |
|
| 3686 | 3686 | $balise_svg = inserer_attribut($balise_svg, 'role', 'img'); |
| 3687 | - $id = "img-svg-title-" . substr(md5("$img_file:$svg:$alt"),0,4); |
|
| 3687 | + $id = "img-svg-title-".substr(md5("$img_file:$svg:$alt"), 0, 4); |
|
| 3688 | 3688 | $balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id); |
| 3689 | - $title = "<title id=\"$id\">" . entites_html($alt)."</title>\n"; |
|
| 3689 | + $title = "<title id=\"$id\">".entites_html($alt)."</title>\n"; |
|
| 3690 | 3690 | $balise_svg .= $title; |
| 3691 | 3691 | } |
| 3692 | 3692 | else { |
@@ -3730,7 +3730,7 @@ discard block |
||
| 3730 | 3730 | $texte = ''; |
| 3731 | 3731 | if (is_array($tableau)) { |
| 3732 | 3732 | foreach ($tableau as $k => $v) { |
| 3733 | - $res = recuperer_fond('modeles/' . $modele, |
|
| 3733 | + $res = recuperer_fond('modeles/'.$modele, |
|
| 3734 | 3734 | array_merge(array('cle' => $k), (is_array($v) ? $v : array('valeur' => $v))) |
| 3735 | 3735 | ); |
| 3736 | 3736 | $texte .= $res; |
@@ -3907,7 +3907,7 @@ discard block |
||
| 3907 | 3907 | } |
| 3908 | 3908 | |
| 3909 | 3909 | $c = serialize($c); |
| 3910 | - $cle = calculer_cle_action($form . $c); |
|
| 3910 | + $cle = calculer_cle_action($form.$c); |
|
| 3911 | 3911 | $c = "$cle:$c"; |
| 3912 | 3912 | |
| 3913 | 3913 | // on ne stocke pas les contextes dans des fichiers en cache |
@@ -3964,15 +3964,15 @@ discard block |
||
| 3964 | 3964 | } |
| 3965 | 3965 | // toujours encoder l'url source dans le bloc ajax |
| 3966 | 3966 | $r = self(); |
| 3967 | - $r = ' data-origin="' . $r . '"'; |
|
| 3967 | + $r = ' data-origin="'.$r.'"'; |
|
| 3968 | 3968 | $class = 'ajaxbloc'; |
| 3969 | 3969 | if ($ajaxid and is_string($ajaxid)) { |
| 3970 | 3970 | // ajaxid est normalement conforme a un nom de classe css |
| 3971 | 3971 | // on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution |
| 3972 | - $class .= ' ajax-id-' . entites_html($ajaxid); |
|
| 3972 | + $class .= ' ajax-id-'.entites_html($ajaxid); |
|
| 3973 | 3973 | } |
| 3974 | 3974 | |
| 3975 | - return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 3975 | + return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 3976 | 3976 | } |
| 3977 | 3977 | |
| 3978 | 3978 | /** |
@@ -4011,11 +4011,11 @@ discard block |
||
| 4011 | 4011 | // extraire la signature en debut de contexte |
| 4012 | 4012 | // et la verifier avant de deserializer |
| 4013 | 4013 | // format : signature:donneesserializees |
| 4014 | - if ($p = strpos($c,":")){ |
|
| 4015 | - $cle = substr($c,0,$p); |
|
| 4016 | - $c = substr($c,$p+1); |
|
| 4014 | + if ($p = strpos($c, ":")) { |
|
| 4015 | + $cle = substr($c, 0, $p); |
|
| 4016 | + $c = substr($c, $p + 1); |
|
| 4017 | 4017 | |
| 4018 | - if ($cle == calculer_cle_action($form . $c)) { |
|
| 4018 | + if ($cle == calculer_cle_action($form.$c)) { |
|
| 4019 | 4019 | $env = @unserialize($c); |
| 4020 | 4020 | return $env; |
| 4021 | 4021 | } |
@@ -4121,24 +4121,24 @@ discard block |
||
| 4121 | 4121 | $att = ""; |
| 4122 | 4122 | // si $on passe la balise et optionnelement une ou ++classe |
| 4123 | 4123 | // a.active span.selected.active etc.... |
| 4124 | - if (is_string($on) and (strncmp($on, 'a', 1)==0 or strncmp($on, 'span', 4)==0 or strncmp($on, 'strong', 6)==0)){ |
|
| 4124 | + if (is_string($on) and (strncmp($on, 'a', 1) == 0 or strncmp($on, 'span', 4) == 0 or strncmp($on, 'strong', 6) == 0)) { |
|
| 4125 | 4125 | $on = explode(".", $on); |
| 4126 | 4126 | // on verifie que c'est exactement une des 3 balises a, span ou strong |
| 4127 | - if (in_array(reset($on), array('a', 'span', 'strong'))){ |
|
| 4127 | + if (in_array(reset($on), array('a', 'span', 'strong'))) { |
|
| 4128 | 4128 | $bal = array_shift($on); |
| 4129 | 4129 | $class = implode(" ", $on); |
| 4130 | - if ($bal=="a"){ |
|
| 4130 | + if ($bal == "a") { |
|
| 4131 | 4131 | $att = 'href="#" '; |
| 4132 | 4132 | } |
| 4133 | 4133 | } |
| 4134 | 4134 | } |
| 4135 | - $att .= 'class="' . ($class ? attribut_html($class) . ' ' : '') . (defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on') . '"'; |
|
| 4135 | + $att .= 'class="'.($class ? attribut_html($class).' ' : '').(defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on').'"'; |
|
| 4136 | 4136 | } else { |
| 4137 | 4137 | $bal = 'a'; |
| 4138 | 4138 | $att = "href='$url'" |
| 4139 | - . ($title ? " title='" . attribut_html($title) . "'" : '') |
|
| 4140 | - . ($class ? " class='" . attribut_html($class) . "'" : '') |
|
| 4141 | - . ($rel ? " rel='" . attribut_html($rel) . "'" : '') |
|
| 4139 | + . ($title ? " title='".attribut_html($title)."'" : '') |
|
| 4140 | + . ($class ? " class='".attribut_html($class)."'" : '') |
|
| 4141 | + . ($rel ? " rel='".attribut_html($rel)."'" : '') |
|
| 4142 | 4142 | . $evt; |
| 4143 | 4143 | } |
| 4144 | 4144 | if ($libelle === null) { |
@@ -4232,7 +4232,7 @@ discard block |
||
| 4232 | 4232 | } |
| 4233 | 4233 | |
| 4234 | 4234 | // ajouter le type d'objet dans la class de l'icone |
| 4235 | - $class .= " " . substr(basename($fond), 0, -4); |
|
| 4235 | + $class .= " ".substr(basename($fond), 0, -4); |
|
| 4236 | 4236 | |
| 4237 | 4237 | $alt = attribut_html($texte); |
| 4238 | 4238 | $title = " title=\"$alt\""; // est-ce pertinent de doubler le alt par un title ? |
@@ -4256,7 +4256,7 @@ discard block |
||
| 4256 | 4256 | } |
| 4257 | 4257 | |
| 4258 | 4258 | $icone = http_img_pack($fond, $alt, "width='$size' height='$size'"); |
| 4259 | - $icone = "<span class=\"icone-image".($fonction ? " icone-fonction icone-fonction-$fonction" : "") . "\">$icone</span>"; |
|
| 4259 | + $icone = "<span class=\"icone-image".($fonction ? " icone-fonction icone-fonction-$fonction" : "")."\">$icone</span>"; |
|
| 4260 | 4260 | |
| 4261 | 4261 | if ($type == 'lien') { |
| 4262 | 4262 | return "<span class='icone s$size $class'>" |
@@ -4486,13 +4486,13 @@ discard block |
||
| 4486 | 4486 | $res = ""; |
| 4487 | 4487 | foreach ($boutons as $page => $detail) { |
| 4488 | 4488 | if ($detail->icone and strlen(trim($detail->icone))) { |
| 4489 | - $res .= "\n.navigation_avec_icones #bando1_$page {background-image:url(" . $detail->icone . ");}"; |
|
| 4489 | + $res .= "\n.navigation_avec_icones #bando1_$page {background-image:url(".$detail->icone.");}"; |
|
| 4490 | 4490 | } |
| 4491 | 4491 | $selecteur = (in_array($page, array('outils_rapides', 'outils_collaboratifs')) ? "" : ".navigation_avec_icones "); |
| 4492 | 4492 | if (is_array($detail->sousmenu)) { |
| 4493 | 4493 | foreach ($detail->sousmenu as $souspage => $sousdetail) { |
| 4494 | 4494 | if ($sousdetail->icone and strlen(trim($sousdetail->icone))) { |
| 4495 | - $res .= "\n$selecteur.bando2_$souspage {background-image:url(" . $sousdetail->icone . ");}"; |
|
| 4495 | + $res .= "\n$selecteur.bando2_$souspage {background-image:url(".$sousdetail->icone.");}"; |
|
| 4496 | 4496 | } |
| 4497 | 4497 | } |
| 4498 | 4498 | } |
@@ -4518,17 +4518,17 @@ discard block |
||
| 4518 | 4518 | */ |
| 4519 | 4519 | function bouton_action($libelle, $url, $class = "", $confirm = "", $title = "", $callback = "") { |
| 4520 | 4520 | if ($confirm) { |
| 4521 | - $confirm = "confirm(\"" . attribut_html($confirm) . "\")"; |
|
| 4521 | + $confirm = "confirm(\"".attribut_html($confirm)."\")"; |
|
| 4522 | 4522 | if ($callback) { |
| 4523 | 4523 | $callback = "$confirm?($callback):false"; |
| 4524 | 4524 | } else { |
| 4525 | 4525 | $callback = $confirm; |
| 4526 | 4526 | } |
| 4527 | 4527 | } |
| 4528 | - $onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : ""; |
|
| 4528 | + $onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : ""; |
|
| 4529 | 4529 | $title = $title ? " title='$title'" : ""; |
| 4530 | 4530 | |
| 4531 | - return "<form class='bouton_action_post $class' method='post' action='$url'><div>" . form_hidden($url) |
|
| 4531 | + return "<form class='bouton_action_post $class' method='post' action='$url'><div>".form_hidden($url) |
|
| 4532 | 4532 | . "<button type='submit' class='submit'$title$onclick>$libelle</button></div></form>"; |
| 4533 | 4533 | } |
| 4534 | 4534 | |
@@ -4589,14 +4589,14 @@ discard block |
||
| 4589 | 4589 | $champ_titre = ""; |
| 4590 | 4590 | if ($demande_titre) { |
| 4591 | 4591 | // si pas de titre declare mais champ titre, il sera peuple par le select * |
| 4592 | - $champ_titre = (!empty($desc['titre'])) ? ', ' . $desc['titre'] : ''; |
|
| 4592 | + $champ_titre = (!empty($desc['titre'])) ? ', '.$desc['titre'] : ''; |
|
| 4593 | 4593 | } |
| 4594 | 4594 | include_spip('base/abstract_sql'); |
| 4595 | 4595 | include_spip('base/connect_sql'); |
| 4596 | 4596 | $objets[$type_objet][$id_objet] = sql_fetsel( |
| 4597 | - '*' . $champ_titre, |
|
| 4597 | + '*'.$champ_titre, |
|
| 4598 | 4598 | $desc['table_sql'], |
| 4599 | - id_table_objet($type_objet) . ' = ' . intval($id_objet) |
|
| 4599 | + id_table_objet($type_objet).' = '.intval($id_objet) |
|
| 4600 | 4600 | ); |
| 4601 | 4601 | } |
| 4602 | 4602 | |
@@ -4666,7 +4666,7 @@ discard block |
||
| 4666 | 4666 | return $texte; |
| 4667 | 4667 | } |
| 4668 | 4668 | |
| 4669 | - $traitement = str_replace('%s', "'" . texte_script($texte) . "'", $traitement); |
|
| 4669 | + $traitement = str_replace('%s', "'".texte_script($texte)."'", $traitement); |
|
| 4670 | 4670 | |
| 4671 | 4671 | // Fournir $connect et $Pile[0] au traitement si besoin |
| 4672 | 4672 | $Pile = array(0 => $env); |
@@ -4700,7 +4700,7 @@ discard block |
||
| 4700 | 4700 | } |
| 4701 | 4701 | $url = generer_url_entite($id_objet, $objet, '', '', $connect); |
| 4702 | 4702 | |
| 4703 | - return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . "</a>"; |
|
| 4703 | + return "<a href='$url' class='$objet'>".couper($titre, $longueur)."</a>"; |
|
| 4704 | 4704 | } |
| 4705 | 4705 | |
| 4706 | 4706 | |
@@ -4719,10 +4719,10 @@ discard block |
||
| 4719 | 4719 | function wrap($texte, $wrap) { |
| 4720 | 4720 | $balises = extraire_balises($wrap); |
| 4721 | 4721 | if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) { |
| 4722 | - $texte = $wrap . $texte; |
|
| 4722 | + $texte = $wrap.$texte; |
|
| 4723 | 4723 | $regs = array_reverse($regs[1]); |
| 4724 | - $wrap = "</" . implode("></", $regs) . ">"; |
|
| 4725 | - $texte = $texte . $wrap; |
|
| 4724 | + $wrap = "</".implode("></", $regs).">"; |
|
| 4725 | + $texte = $texte.$wrap; |
|
| 4726 | 4726 | } |
| 4727 | 4727 | |
| 4728 | 4728 | return $texte; |
@@ -4753,7 +4753,7 @@ discard block |
||
| 4753 | 4753 | |
| 4754 | 4754 | // caster $u en array si besoin |
| 4755 | 4755 | if (is_object($u)) { |
| 4756 | - $u = (array)$u; |
|
| 4756 | + $u = (array) $u; |
|
| 4757 | 4757 | } |
| 4758 | 4758 | |
| 4759 | 4759 | if (is_array($u)) { |
@@ -4774,7 +4774,7 @@ discard block |
||
| 4774 | 4774 | // sinon on passe a la ligne et on indente |
| 4775 | 4775 | $i_str = str_pad("", $indent, " "); |
| 4776 | 4776 | foreach ($u as $k => $v) { |
| 4777 | - $out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2); |
|
| 4777 | + $out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2); |
|
| 4778 | 4778 | } |
| 4779 | 4779 | |
| 4780 | 4780 | return $out; |
@@ -4827,8 +4827,8 @@ discard block |
||
| 4827 | 4827 | * @param string $class |
| 4828 | 4828 | * @return string |
| 4829 | 4829 | */ |
| 4830 | -function objet_icone($objet, $taille = 24, $class='') { |
|
| 4831 | - $icone = objet_info($objet, 'icone_objet') . "-" . $taille . ".png"; |
|
| 4830 | +function objet_icone($objet, $taille = 24, $class = '') { |
|
| 4831 | + $icone = objet_info($objet, 'icone_objet')."-".$taille.".png"; |
|
| 4832 | 4832 | $icone = chemin_image($icone); |
| 4833 | 4833 | $balise_img = charger_filtre('balise_img'); |
| 4834 | 4834 | |
@@ -4852,12 +4852,12 @@ discard block |
||
| 4852 | 4852 | * @param array $options |
| 4853 | 4853 | * @return string |
| 4854 | 4854 | */ |
| 4855 | -function objet_T($objet, $chaine, $args = array(), $options = array()){ |
|
| 4856 | - $chaine = explode(':',$chaine); |
|
| 4857 | - if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, array('force'=>false)))) { |
|
| 4855 | +function objet_T($objet, $chaine, $args = array(), $options = array()) { |
|
| 4856 | + $chaine = explode(':', $chaine); |
|
| 4857 | + if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, array('force'=>false)))) { |
|
| 4858 | 4858 | return $t; |
| 4859 | 4859 | } |
| 4860 | - $chaine = implode(':',$chaine); |
|
| 4860 | + $chaine = implode(':', $chaine); |
|
| 4861 | 4861 | return _T($chaine, $args, $options); |
| 4862 | 4862 | } |
| 4863 | 4863 | |
@@ -4917,7 +4917,7 @@ discard block |
||
| 4917 | 4917 | $cache = recuperer_fond($fond, $contexte, $options, $connect); |
| 4918 | 4918 | |
| 4919 | 4919 | // calculer le nom de la css |
| 4920 | - $dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension); |
|
| 4920 | + $dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension); |
|
| 4921 | 4921 | $nom_safe = preg_replace(",\W,", '_', str_replace('.', '_', $fond)); |
| 4922 | 4922 | $contexte_implicite = calculer_contexte_implicite(); |
| 4923 | 4923 | |
@@ -4925,22 +4925,22 @@ discard block |
||
| 4925 | 4925 | // mais on peut hasher selon le contenu a la demande, si plusieurs contextes produisent un meme contenu |
| 4926 | 4926 | // reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine |
| 4927 | 4927 | if (isset($options['hash_on_content']) and $options['hash_on_content']) { |
| 4928 | - $hash = md5($contexte_implicite['host'] . '::'. $cache); |
|
| 4928 | + $hash = md5($contexte_implicite['host'].'::'.$cache); |
|
| 4929 | 4929 | } |
| 4930 | 4930 | else { |
| 4931 | 4931 | unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js |
| 4932 | 4932 | ksort($contexte); |
| 4933 | - $hash = md5($fond . json_encode($contexte_implicite) . json_encode($contexte) . $connect); |
|
| 4933 | + $hash = md5($fond.json_encode($contexte_implicite).json_encode($contexte).$connect); |
|
| 4934 | 4934 | } |
| 4935 | - $filename = $dir_var . $extension . "dyn-$nom_safe-" . substr($hash, 0, 8) . ".$extension"; |
|
| 4935 | + $filename = $dir_var.$extension."dyn-$nom_safe-".substr($hash, 0, 8).".$extension"; |
|
| 4936 | 4936 | |
| 4937 | 4937 | // mettre a jour le fichier si il n'existe pas |
| 4938 | 4938 | // ou trop ancien |
| 4939 | 4939 | // le dernier fichier produit est toujours suffixe par .last |
| 4940 | 4940 | // et recopie sur le fichier cible uniquement si il change |
| 4941 | 4941 | if (!file_exists($filename) |
| 4942 | - or !file_exists($filename . ".last") |
|
| 4943 | - or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename . ".last") < $cache['lastmodified']) |
|
| 4942 | + or !file_exists($filename.".last") |
|
| 4943 | + or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename.".last") < $cache['lastmodified']) |
|
| 4944 | 4944 | or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul') |
| 4945 | 4945 | ) { |
| 4946 | 4946 | $contenu = $cache['texte']; |
@@ -4959,10 +4959,10 @@ discard block |
||
| 4959 | 4959 | } |
| 4960 | 4960 | // pas de date dans le commentaire car sinon ca invalide le md5 et force la maj |
| 4961 | 4961 | // mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non |
| 4962 | - $comment .= "}\n md5:" . md5($contenu) . " */\n"; |
|
| 4962 | + $comment .= "}\n md5:".md5($contenu)." */\n"; |
|
| 4963 | 4963 | } |
| 4964 | 4964 | // et ecrire le fichier si il change |
| 4965 | - ecrire_fichier_calcule_si_modifie($filename, $comment . $contenu, false, true); |
|
| 4965 | + ecrire_fichier_calcule_si_modifie($filename, $comment.$contenu, false, true); |
|
| 4966 | 4966 | } |
| 4967 | 4967 | |
| 4968 | 4968 | return timestamp($filename); |
@@ -5157,11 +5157,11 @@ discard block |
||
| 5157 | 5157 | function spip_affiche_mot_de_passe_masque($passe, $afficher_partiellement = false, $portion_pourcent = null) { |
| 5158 | 5158 | $l = strlen($passe); |
| 5159 | 5159 | |
| 5160 | - if ($l<=8 or !$afficher_partiellement){ |
|
| 5160 | + if ($l <= 8 or !$afficher_partiellement) { |
|
| 5161 | 5161 | if (!$l) { |
| 5162 | 5162 | return ''; // montrer qu'il y a pas de mot de passe si il y en a pas |
| 5163 | 5163 | } |
| 5164 | - return str_pad('',$afficher_partiellement ? $l : 16,'*'); |
|
| 5164 | + return str_pad('', $afficher_partiellement ? $l : 16, '*'); |
|
| 5165 | 5165 | } |
| 5166 | 5166 | |
| 5167 | 5167 | if (is_null($portion_pourcent)) { |
@@ -5175,11 +5175,11 @@ discard block |
||
| 5175 | 5175 | } |
| 5176 | 5176 | $e = intval(ceil($l * $portion_pourcent / 100 / 2)); |
| 5177 | 5177 | $e = max($e, 0); |
| 5178 | - $mid = str_pad('',$l-2*$e,'*'); |
|
| 5179 | - if ($e>0 and strlen($mid)>8){ |
|
| 5178 | + $mid = str_pad('', $l - 2 * $e, '*'); |
|
| 5179 | + if ($e > 0 and strlen($mid) > 8) { |
|
| 5180 | 5180 | $mid = '***...***'; |
| 5181 | 5181 | } |
| 5182 | - return substr($passe,0,$e) . $mid . ($e > 0 ? substr($passe,-$e) : ''); |
|
| 5182 | + return substr($passe, 0, $e).$mid.($e > 0 ? substr($passe, -$e) : ''); |
|
| 5183 | 5183 | } |
| 5184 | 5184 | |
| 5185 | 5185 | |
@@ -5201,9 +5201,9 @@ discard block |
||
| 5201 | 5201 | function identifiant_slug($texte, $type = '', $options = array()) { |
| 5202 | 5202 | |
| 5203 | 5203 | $original = $texte; |
| 5204 | - $separateur = (isset($options['separateur'])?$options['separateur']:'_'); |
|
| 5205 | - $longueur_maxi = (isset($options['longueur_maxi'])?$options['longueur_maxi']:60); |
|
| 5206 | - $longueur_mini = (isset($options['longueur_mini'])?$options['longueur_mini']:0); |
|
| 5204 | + $separateur = (isset($options['separateur']) ? $options['separateur'] : '_'); |
|
| 5205 | + $longueur_maxi = (isset($options['longueur_maxi']) ? $options['longueur_maxi'] : 60); |
|
| 5206 | + $longueur_mini = (isset($options['longueur_mini']) ? $options['longueur_mini'] : 0); |
|
| 5207 | 5207 | |
| 5208 | 5208 | if (!function_exists('translitteration')) { |
| 5209 | 5209 | include_spip('inc/charsets'); |
@@ -5245,15 +5245,15 @@ discard block |
||
| 5245 | 5245 | } |
| 5246 | 5246 | } |
| 5247 | 5247 | |
| 5248 | - if (strlen($texte)>$longueur_maxi) { |
|
| 5248 | + if (strlen($texte) > $longueur_maxi) { |
|
| 5249 | 5249 | $texte = substr($texte, 0, $longueur_maxi); |
| 5250 | 5250 | } |
| 5251 | 5251 | |
| 5252 | 5252 | if (strlen($texte) < $longueur_mini and $longueur_mini < $longueur_maxi) { |
| 5253 | 5253 | if (preg_match(',^\d,', $texte)) { |
| 5254 | - $texte = ($type ? substr($type,0,1) : "s") . $texte; |
|
| 5254 | + $texte = ($type ? substr($type, 0, 1) : "s").$texte; |
|
| 5255 | 5255 | } |
| 5256 | - $texte .= $separateur . md5($original); |
|
| 5256 | + $texte .= $separateur.md5($original); |
|
| 5257 | 5257 | $texte = substr($texte, 0, $longueur_mini); |
| 5258 | 5258 | } |
| 5259 | 5259 | |