@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | include_fichiers_fonctions(); |
| 98 | - foreach (['filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc] as $f) { |
|
| 98 | + foreach (['filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc] as $f) { |
|
| 99 | 99 | trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels |
| 100 | 100 | if (is_callable($f)) { |
| 101 | 101 | return $f; |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | // affichage "GIT [master: abcdef]" |
| 231 | 231 | $commit = $desc['commit_short'] ?? $desc['commit']; |
| 232 | 232 | if ($desc['branch']) { |
| 233 | - $commit = $desc['branch'] . ': ' . $commit; |
|
| 233 | + $commit = $desc['branch'].': '.$commit; |
|
| 234 | 234 | } |
| 235 | 235 | return "{$desc['vcs']} [$commit]"; |
| 236 | 236 | } |
@@ -251,9 +251,9 @@ discard block |
||
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | // version installee par GIT |
| 254 | - if (lire_fichier($dir . '/.git/HEAD', $c)) { |
|
| 254 | + if (lire_fichier($dir.'/.git/HEAD', $c)) { |
|
| 255 | 255 | $currentHead = trim(substr($c, 4)); |
| 256 | - if (lire_fichier($dir . '/.git/' . $currentHead, $hash)) { |
|
| 256 | + if (lire_fichier($dir.'/.git/'.$currentHead, $hash)) { |
|
| 257 | 257 | return [ |
| 258 | 258 | 'vcs' => 'GIT', |
| 259 | 259 | 'branch' => basename($currentHead), |
@@ -268,12 +268,12 @@ discard block |
||
| 268 | 268 | |
| 269 | 269 | // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images |
| 270 | 270 | // et laisser passer les fonctions personnelles baptisees image_... |
| 271 | -$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php'; |
|
| 272 | -$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php'; |
|
| 273 | -$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php'; |
|
| 274 | -$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php'; |
|
| 275 | -$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php'; |
|
| 276 | -$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true;//'inc/filtres_images_mini.php'; |
|
| 271 | +$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php'; |
|
| 272 | +$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php'; |
|
| 273 | +$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php'; |
|
| 274 | +$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php'; |
|
| 275 | +$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php'; |
|
| 276 | +$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true; //'inc/filtres_images_mini.php'; |
|
| 277 | 277 | |
| 278 | 278 | $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php'; |
| 279 | 279 | $GLOBALS['spip_matrice']['couleur_hex_to_hsl'] = 'inc/filtres_images_mini.php'; |
@@ -432,8 +432,8 @@ discard block |
||
| 432 | 432 | */ |
| 433 | 433 | function filtre_debug($val, $key = null) { |
| 434 | 434 | $debug = ( |
| 435 | - is_null($key) ? '' : (var_export($key, true) . ' = ') |
|
| 436 | - ) . var_export($val, true); |
|
| 435 | + is_null($key) ? '' : (var_export($key, true).' = ') |
|
| 436 | + ).var_export($val, true); |
|
| 437 | 437 | |
| 438 | 438 | include_spip('inc/autoriser'); |
| 439 | 439 | if (autoriser('webmestre')) { |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $is_file = false; |
| 490 | 490 | } |
| 491 | 491 | if ($is_file) { |
| 492 | - $is_local_file = function ($path) { |
|
| 492 | + $is_local_file = function($path) { |
|
| 493 | 493 | if (str_contains($path, '?')) { |
| 494 | 494 | $path = supprimer_timestamp($path); |
| 495 | 495 | // remove ?24px added by find_in_theme on .svg files |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | && preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match) |
| 538 | 538 | ) { |
| 539 | 539 | $srcover = $match[1]; |
| 540 | - $srcover_filter = $filtre("<img src='" . $match[1] . "' />", ...$args); |
|
| 540 | + $srcover_filter = $filtre("<img src='".$match[1]."' />", ...$args); |
|
| 541 | 541 | $srcover_filter = extraire_attribut($srcover_filter, 'src'); |
| 542 | 542 | $reduit = str_replace($srcover, $srcover_filter, $reduit); |
| 543 | 543 | } |
@@ -936,7 +936,7 @@ discard block |
||
| 936 | 936 | // " -> " et tout ce genre de choses |
| 937 | 937 | $u = $GLOBALS['meta']['pcre_u']; |
| 938 | 938 | $texte = str_replace(' ', ' ', $texte); |
| 939 | - $texte = preg_replace('/\s{2,}/S' . $u, ' ', $texte); |
|
| 939 | + $texte = preg_replace('/\s{2,}/S'.$u, ' ', $texte); |
|
| 940 | 940 | // ne pas echapper les sinqle quotes car certains outils de syndication gerent mal |
| 941 | 941 | $texte = entites_html($texte, false, false); |
| 942 | 942 | // mais bien echapper les double quotes ! |
@@ -998,7 +998,7 @@ discard block |
||
| 998 | 998 | return ''; |
| 999 | 999 | } |
| 1000 | 1000 | return preg_replace( |
| 1001 | - ',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S', |
|
| 1001 | + ',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S', |
|
| 1002 | 1002 | '', |
| 1003 | 1003 | $texte |
| 1004 | 1004 | ); |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | if ( |
| 1028 | 1028 | $texte |
| 1029 | 1029 | && preg_match( |
| 1030 | - ',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S', |
|
| 1030 | + ',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S', |
|
| 1031 | 1031 | $texte, |
| 1032 | 1032 | $regs |
| 1033 | 1033 | ) |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | **/ |
| 1117 | 1117 | function textebrut($texte) { |
| 1118 | 1118 | $u = $GLOBALS['meta']['pcre_u']; |
| 1119 | - $texte = preg_replace('/\s+/S' . $u, ' ', $texte); |
|
| 1119 | + $texte = preg_replace('/\s+/S'.$u, ' ', $texte); |
|
| 1120 | 1120 | $texte = preg_replace('/<(p|br)( [^>]*)?>/iS', "\n\n", $texte); |
| 1121 | 1121 | $texte = preg_replace("/^\n+/", '', $texte); |
| 1122 | 1122 | $texte = preg_replace("/\n+$/", '', $texte); |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | ) |
| 1152 | 1152 | ) { |
| 1153 | 1153 | foreach ($liens[0] as $a) { |
| 1154 | - $rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel'); |
|
| 1154 | + $rel = 'noopener noreferrer '.extraire_attribut($a, 'rel'); |
|
| 1155 | 1155 | $ablank = inserer_attribut($a, 'rel', $rel); |
| 1156 | 1156 | $ablank = inserer_attribut($ablank, 'target', '_blank'); |
| 1157 | 1157 | $texte = str_replace($a, $ablank, $texte); |
@@ -1176,7 +1176,7 @@ discard block |
||
| 1176 | 1176 | foreach ($regs[0] as $a) { |
| 1177 | 1177 | $rel = extraire_attribut($a, 'rel') ?? ''; |
| 1178 | 1178 | if (!str_contains($rel, 'nofollow')) { |
| 1179 | - $rel = 'nofollow' . ($rel ? " $rel" : ''); |
|
| 1179 | + $rel = 'nofollow'.($rel ? " $rel" : ''); |
|
| 1180 | 1180 | $anofollow = inserer_attribut($a, 'rel', $rel); |
| 1181 | 1181 | $texte = str_replace($a, $anofollow, $texte); |
| 1182 | 1182 | } |
@@ -1206,7 +1206,7 @@ discard block |
||
| 1206 | 1206 | $texte = preg_replace('@</p>@iS', "\n", $texte); |
| 1207 | 1207 | $texte = preg_replace("@<p\b.*>@UiS", '<br />', $texte); |
| 1208 | 1208 | |
| 1209 | - return preg_replace('@^\s*<br />@S' . $u, '', $texte); |
|
| 1209 | + return preg_replace('@^\s*<br />@S'.$u, '', $texte); |
|
| 1210 | 1210 | } |
| 1211 | 1211 | |
| 1212 | 1212 | |
@@ -1240,7 +1240,7 @@ discard block |
||
| 1240 | 1240 | return $texte; |
| 1241 | 1241 | } |
| 1242 | 1242 | include_spip('inc/texte'); |
| 1243 | - $tag = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $texte) ? |
|
| 1243 | + $tag = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $texte) ? |
|
| 1244 | 1244 | 'div' : 'span'; |
| 1245 | 1245 | |
| 1246 | 1246 | return "<$tag style='word-wrap:break-word;'>$texte</$tag>"; |
@@ -1331,7 +1331,7 @@ discard block |
||
| 1331 | 1331 | |
| 1332 | 1332 | // Calcul de la taille et choix de l'unité |
| 1333 | 1333 | $affichage = _T( |
| 1334 | - 'spip:taille_' . $unites[$puissance] . $suffixe_item, |
|
| 1334 | + 'spip:taille_'.$unites[$puissance].$suffixe_item, |
|
| 1335 | 1335 | [ |
| 1336 | 1336 | 'taille' => round($octets / $kilo ** $puissance, $precisions[$puissance]) |
| 1337 | 1337 | ] |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | } |
| 1366 | 1366 | $u = $GLOBALS['meta']['pcre_u']; |
| 1367 | 1367 | if ($textebrut) { |
| 1368 | - $texte = preg_replace([",\n,", ',\s(?=\s),msS' . $u], [' ', ''], textebrut($texte)); |
|
| 1368 | + $texte = preg_replace([",\n,", ',\s(?=\s),msS'.$u], [' ', ''], textebrut($texte)); |
|
| 1369 | 1369 | } |
| 1370 | 1370 | $texte = texte_backend($texte); |
| 1371 | 1371 | $texte = str_replace(["'", '"'], [''', '"'], $texte); |
@@ -1400,7 +1400,7 @@ discard block |
||
| 1400 | 1400 | # un message pour abs_url |
| 1401 | 1401 | $GLOBALS['mode_abs_url'] = 'url'; |
| 1402 | 1402 | $url = trim($url); |
| 1403 | - $r = ',^(?:' . _PROTOCOLES_STD . '):?/?/?$,iS'; |
|
| 1403 | + $r = ',^(?:'._PROTOCOLES_STD.'):?/?/?$,iS'; |
|
| 1404 | 1404 | |
| 1405 | 1405 | return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url); |
| 1406 | 1406 | } |
@@ -1605,7 +1605,7 @@ discard block |
||
| 1605 | 1605 | |
| 1606 | 1606 | $debut = ''; |
| 1607 | 1607 | $suite = $texte; |
| 1608 | - while ($t = strpos('-' . $suite, "\n", 1)) { |
|
| 1608 | + while ($t = strpos('-'.$suite, "\n", 1)) { |
|
| 1609 | 1609 | $debut .= substr($suite, 0, $t - 1); |
| 1610 | 1610 | $suite = substr($suite, $t); |
| 1611 | 1611 | $car = substr($suite, 0, 1); |
@@ -1623,7 +1623,7 @@ discard block |
||
| 1623 | 1623 | $suite = substr($suite, strlen($regs[0])); |
| 1624 | 1624 | } |
| 1625 | 1625 | } |
| 1626 | - $texte = $debut . $suite; |
|
| 1626 | + $texte = $debut.$suite; |
|
| 1627 | 1627 | |
| 1628 | 1628 | if ($collecteurModeles) { |
| 1629 | 1629 | $texte = $collecteurModeles->retablir($texte); |
@@ -1631,7 +1631,7 @@ discard block |
||
| 1631 | 1631 | |
| 1632 | 1632 | $texte = echappe_retour($texte); |
| 1633 | 1633 | |
| 1634 | - return $texte . $fin; |
|
| 1634 | + return $texte.$fin; |
|
| 1635 | 1635 | } |
| 1636 | 1636 | |
| 1637 | 1637 | |
@@ -1900,7 +1900,7 @@ discard block |
||
| 1900 | 1900 | if (is_array($balise)) { |
| 1901 | 1901 | array_walk( |
| 1902 | 1902 | $balise, |
| 1903 | - function (&$a, $key, $t) { |
|
| 1903 | + function(&$a, $key, $t) { |
|
| 1904 | 1904 | $a = extraire_attribut($a, $t); |
| 1905 | 1905 | }, |
| 1906 | 1906 | $attribut |
@@ -1994,14 +1994,14 @@ discard block |
||
| 1994 | 1994 | |
| 1995 | 1995 | if ($old !== null) { |
| 1996 | 1996 | // Remplacer l'ancien attribut du meme nom |
| 1997 | - $balise = $r[1] . $insert . $r[5]; |
|
| 1997 | + $balise = $r[1].$insert.$r[5]; |
|
| 1998 | 1998 | } else { |
| 1999 | 1999 | // preferer une balise " />" (comme <img />) |
| 2000 | 2000 | if (preg_match(',/>,', $balise)) { |
| 2001 | - $balise = preg_replace(',\s?/>,S', $insert . ' />', $balise, 1); |
|
| 2001 | + $balise = preg_replace(',\s?/>,S', $insert.' />', $balise, 1); |
|
| 2002 | 2002 | } // sinon une balise <a ...> ... </a> |
| 2003 | 2003 | else { |
| 2004 | - $balise = preg_replace(',\s?>,S', $insert . '>', $balise, 1); |
|
| 2004 | + $balise = preg_replace(',\s?>,S', $insert.'>', $balise, 1); |
|
| 2005 | 2005 | } |
| 2006 | 2006 | } |
| 2007 | 2007 | |
@@ -2059,7 +2059,7 @@ discard block |
||
| 2059 | 2059 | in_array($operation, ['ajouter', 'commuter']) |
| 2060 | 2060 | && !$is_class_presente |
| 2061 | 2061 | ) { |
| 2062 | - $class_new = ltrim(rtrim($class_new ?? '') . ' ' . $c); |
|
| 2062 | + $class_new = ltrim(rtrim($class_new ?? '').' '.$c); |
|
| 2063 | 2063 | } elseif ( |
| 2064 | 2064 | in_array($operation, ['supprimer', 'commuter']) |
| 2065 | 2065 | && $is_class_presente |
@@ -2129,7 +2129,7 @@ discard block |
||
| 2129 | 2129 | // Quelques fonctions de calcul arithmetique |
| 2130 | 2130 | // |
| 2131 | 2131 | function floatstr($a) { |
| 2132 | - return str_replace(',', '.', (string)(float) $a); |
|
| 2132 | + return str_replace(',', '.', (string) (float) $a); |
|
| 2133 | 2133 | } |
| 2134 | 2134 | function strize($f, $a, $b) { |
| 2135 | 2135 | return floatstr($f(floatstr($a), floatstr($b))); |
@@ -2270,13 +2270,13 @@ discard block |
||
| 2270 | 2270 | if (!defined('_TAGS_NOM_AUTEUR')) { |
| 2271 | 2271 | define('_TAGS_NOM_AUTEUR', ''); |
| 2272 | 2272 | } |
| 2273 | - $tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR)); |
|
| 2273 | + $tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR)); |
|
| 2274 | 2274 | foreach ($tags_acceptes as $tag) { |
| 2275 | 2275 | if (strlen($tag)) { |
| 2276 | - $remp1[] = '<' . trim($tag) . '>'; |
|
| 2277 | - $remp1[] = '</' . trim($tag) . '>'; |
|
| 2278 | - $remp2[] = '\x60' . trim($tag) . '\x61'; |
|
| 2279 | - $remp2[] = '\x60/' . trim($tag) . '\x61'; |
|
| 2276 | + $remp1[] = '<'.trim($tag).'>'; |
|
| 2277 | + $remp1[] = '</'.trim($tag).'>'; |
|
| 2278 | + $remp2[] = '\x60'.trim($tag).'\x61'; |
|
| 2279 | + $remp2[] = '\x60/'.trim($tag).'\x61'; |
|
| 2280 | 2280 | } |
| 2281 | 2281 | } |
| 2282 | 2282 | $v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom))); |
@@ -2395,10 +2395,10 @@ discard block |
||
| 2395 | 2395 | $fichier = basename($url); |
| 2396 | 2396 | |
| 2397 | 2397 | return '<a rel="enclosure"' |
| 2398 | - . ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2399 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2400 | - . ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '') |
|
| 2401 | - . '>' . $fichier . '</a>'; |
|
| 2398 | + . ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2399 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2400 | + . ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '') |
|
| 2401 | + . '>'.$fichier.'</a>'; |
|
| 2402 | 2402 | } |
| 2403 | 2403 | |
| 2404 | 2404 | /** |
@@ -2426,9 +2426,9 @@ discard block |
||
| 2426 | 2426 | } # vieux data |
| 2427 | 2427 | $fichier = basename($url); |
| 2428 | 2428 | $enclosures[] = '<enclosure' |
| 2429 | - . ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2430 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2431 | - . ($length ? ' length="' . $length . '"' : '') |
|
| 2429 | + . ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2430 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2431 | + . ($length ? ' length="'.$length.'"' : '') |
|
| 2432 | 2432 | . ' />'; |
| 2433 | 2433 | } |
| 2434 | 2434 | } |
@@ -2454,7 +2454,7 @@ discard block |
||
| 2454 | 2454 | if (extraire_attribut($e, 'rel') == 'tag') { |
| 2455 | 2455 | $subjects .= '<dc:subject>' |
| 2456 | 2456 | . texte_backend(textebrut($e)) |
| 2457 | - . '</dc:subject>' . "\n"; |
|
| 2457 | + . '</dc:subject>'."\n"; |
|
| 2458 | 2458 | } |
| 2459 | 2459 | } |
| 2460 | 2460 | |
@@ -2490,7 +2490,7 @@ discard block |
||
| 2490 | 2490 | if (is_array($texte)) { |
| 2491 | 2491 | array_walk( |
| 2492 | 2492 | $texte, |
| 2493 | - function (&$a, $key, $t) { |
|
| 2493 | + function(&$a, $key, $t) { |
|
| 2494 | 2494 | $a = extraire_balise($a, $t); |
| 2495 | 2495 | }, |
| 2496 | 2496 | $tag |
@@ -2538,7 +2538,7 @@ discard block |
||
| 2538 | 2538 | if (is_array($texte)) { |
| 2539 | 2539 | array_walk( |
| 2540 | 2540 | $texte, |
| 2541 | - function (&$a, $key, $t) { |
|
| 2541 | + function(&$a, $key, $t) { |
|
| 2542 | 2542 | $a = extraire_balises($a, $t); |
| 2543 | 2543 | }, |
| 2544 | 2544 | $tag |
@@ -2671,7 +2671,7 @@ discard block |
||
| 2671 | 2671 | if ($fond != '404') { |
| 2672 | 2672 | $contexte = array_shift($p); |
| 2673 | 2673 | $contexte['page'] = $fond; |
| 2674 | - $action = preg_replace('/([?]' . preg_quote($fond, '/') . '[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2674 | + $action = preg_replace('/([?]'.preg_quote($fond, '/').'[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2675 | 2675 | } |
| 2676 | 2676 | } |
| 2677 | 2677 | // defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url |
@@ -2726,9 +2726,9 @@ discard block |
||
| 2726 | 2726 | . '"' |
| 2727 | 2727 | . (is_null($val) |
| 2728 | 2728 | ? '' |
| 2729 | - : ' value="' . entites_html($val) . '"' |
|
| 2729 | + : ' value="'.entites_html($val).'"' |
|
| 2730 | 2730 | ) |
| 2731 | - . ' type="hidden"' . "\n/>"; |
|
| 2731 | + . ' type="hidden"'."\n/>"; |
|
| 2732 | 2732 | } |
| 2733 | 2733 | |
| 2734 | 2734 | return implode('', $hidden); |
@@ -2838,7 +2838,7 @@ discard block |
||
| 2838 | 2838 | |
| 2839 | 2839 | return preg_replace_callback( |
| 2840 | 2840 | ",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims", |
| 2841 | - fn($x) => "url('" . suivre_lien($path, $x[1]) . "')", |
|
| 2841 | + fn($x) => "url('".suivre_lien($path, $x[1])."')", |
|
| 2842 | 2842 | $contenu |
| 2843 | 2843 | ); |
| 2844 | 2844 | } |
@@ -2899,14 +2899,14 @@ discard block |
||
| 2899 | 2899 | ) { |
| 2900 | 2900 | $distant = true; |
| 2901 | 2901 | $cssf = parse_url($css); |
| 2902 | - $cssf = $cssf['path'] . ($cssf['query'] ? '?' . $cssf['query'] : ''); |
|
| 2902 | + $cssf = $cssf['path'].($cssf['query'] ? '?'.$cssf['query'] : ''); |
|
| 2903 | 2903 | $cssf = preg_replace(',[?:&=],', '_', $cssf); |
| 2904 | 2904 | } else { |
| 2905 | 2905 | $distant = false; |
| 2906 | 2906 | $cssf = $css; |
| 2907 | 2907 | // 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi |
| 2908 | 2908 | //propose (rien a faire dans ce cas) |
| 2909 | - $f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css); |
|
| 2909 | + $f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css); |
|
| 2910 | 2910 | if (@file_exists($f)) { |
| 2911 | 2911 | return $f; |
| 2912 | 2912 | } |
@@ -2916,7 +2916,7 @@ discard block |
||
| 2916 | 2916 | $dir_var = sous_repertoire(_DIR_VAR, 'cache-css'); |
| 2917 | 2917 | $f = $dir_var |
| 2918 | 2918 | . preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf) |
| 2919 | - . '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css'; |
|
| 2919 | + . '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css'; |
|
| 2920 | 2920 | |
| 2921 | 2921 | // la css peut etre distante (url absolue !) |
| 2922 | 2922 | $contenu = null; |
@@ -2963,8 +2963,8 @@ discard block |
||
| 2963 | 2963 | } // si la css_direction commence par $dir_var on la fait passer pour une absolue |
| 2964 | 2964 | elseif (str_starts_with($css_direction, $dir_var)) { |
| 2965 | 2965 | $css_direction = substr($css_direction, strlen($dir_var)); |
| 2966 | - $src_faux_abs['/@@@@@@/' . $css_direction] = $css_direction; |
|
| 2967 | - $css_direction = '/@@@@@@/' . $css_direction; |
|
| 2966 | + $src_faux_abs['/@@@@@@/'.$css_direction] = $css_direction; |
|
| 2967 | + $css_direction = '/@@@@@@/'.$css_direction; |
|
| 2968 | 2968 | } |
| 2969 | 2969 | $src[] = $regs[0][$k]; |
| 2970 | 2970 | $src_direction_css[] = str_replace($import_css, $css_direction, $regs[0][$k]); |
@@ -3013,7 +3013,7 @@ discard block |
||
| 3013 | 3013 | |
| 3014 | 3014 | $f = basename($css, '.css'); |
| 3015 | 3015 | $f = sous_repertoire(_DIR_VAR, 'cache-css') |
| 3016 | - . preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f) |
|
| 3016 | + . preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f) |
|
| 3017 | 3017 | . '.css'; |
| 3018 | 3018 | |
| 3019 | 3019 | if (@filemtime($f) > @filemtime($css) && _VAR_MODE != 'recalcul') { |
@@ -3024,7 +3024,7 @@ discard block |
||
| 3024 | 3024 | if ($url_absolue_css == $css) { |
| 3025 | 3025 | if ( |
| 3026 | 3026 | strncmp($GLOBALS['meta']['adresse_site'], $css, $l = strlen($GLOBALS['meta']['adresse_site'])) != 0 |
| 3027 | - || !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu) |
|
| 3027 | + || !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu) |
|
| 3028 | 3028 | ) { |
| 3029 | 3029 | include_spip('inc/distant'); |
| 3030 | 3030 | $contenu = recuperer_url($css); |
@@ -3136,7 +3136,7 @@ discard block |
||
| 3136 | 3136 | $expression = str_replace('\/', '/', $expression); |
| 3137 | 3137 | $expression = str_replace('/', '\/', $expression); |
| 3138 | 3138 | |
| 3139 | - if (preg_match('/' . $expression . '/' . $modif, $texte ?? '', $r)) { |
|
| 3139 | + if (preg_match('/'.$expression.'/'.$modif, $texte ?? '', $r)) { |
|
| 3140 | 3140 | if (isset($r[$capte])) { |
| 3141 | 3141 | return $r[$capte]; |
| 3142 | 3142 | } else { |
@@ -3178,7 +3178,7 @@ discard block |
||
| 3178 | 3178 | $expression = str_replace('\/', '/', $expression); |
| 3179 | 3179 | $expression = str_replace('/', '\/', $expression); |
| 3180 | 3180 | |
| 3181 | - return (string) preg_replace('/' . $expression . '/' . $modif, $replace, $texte); |
|
| 3181 | + return (string) preg_replace('/'.$expression.'/'.$modif, $replace, $texte); |
|
| 3182 | 3182 | } |
| 3183 | 3183 | |
| 3184 | 3184 | |
@@ -3197,7 +3197,7 @@ discard block |
||
| 3197 | 3197 | function traiter_doublons_documents(&$doublons, $letexte) { |
| 3198 | 3198 | |
| 3199 | 3199 | // Verifier dans le texte & les notes (pas beau, helas) |
| 3200 | - $t = $letexte . $GLOBALS['les_notes']; |
|
| 3200 | + $t = $letexte.$GLOBALS['les_notes']; |
|
| 3201 | 3201 | |
| 3202 | 3202 | if ( |
| 3203 | 3203 | strstr($t, 'spip_document_') |
@@ -3211,7 +3211,7 @@ discard block |
||
| 3211 | 3211 | if (!isset($doublons['documents'])) { |
| 3212 | 3212 | $doublons['documents'] = ''; |
| 3213 | 3213 | } |
| 3214 | - $doublons['documents'] .= ',' . implode(',', $matches[1]); |
|
| 3214 | + $doublons['documents'] .= ','.implode(',', $matches[1]); |
|
| 3215 | 3215 | } |
| 3216 | 3216 | |
| 3217 | 3217 | return $letexte; |
@@ -3268,7 +3268,7 @@ discard block |
||
| 3268 | 3268 | if ($env) { |
| 3269 | 3269 | foreach ($env as $i => $j) { |
| 3270 | 3270 | if (is_string($j) && !in_array($i, $ignore_params)) { |
| 3271 | - $texte .= "<param name='" . attribut_html($i) . "'\n\tvalue='" . attribut_html($j) . "' />"; |
|
| 3271 | + $texte .= "<param name='".attribut_html($i)."'\n\tvalue='".attribut_html($j)."' />"; |
|
| 3272 | 3272 | } |
| 3273 | 3273 | } |
| 3274 | 3274 | } |
@@ -3307,7 +3307,7 @@ discard block |
||
| 3307 | 3307 | if ($env) { |
| 3308 | 3308 | foreach ($env as $i => $j) { |
| 3309 | 3309 | if (is_string($j) && !in_array($i, $ignore_params)) { |
| 3310 | - $texte .= attribut_html($i) . "='" . attribut_html($j) . "' "; |
|
| 3310 | + $texte .= attribut_html($i)."='".attribut_html($j)."' "; |
|
| 3311 | 3311 | } |
| 3312 | 3312 | } |
| 3313 | 3313 | } |
@@ -3381,11 +3381,11 @@ discard block |
||
| 3381 | 3381 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 3382 | 3382 | if ( |
| 3383 | 3383 | preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m) |
| 3384 | - && ($variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . '-xx.svg') |
|
| 3384 | + && ($variante_svg_generique = substr($img_file, 0, -strlen($m[0])).'-xx.svg') |
|
| 3385 | 3385 | && file_exists($variante_svg_generique) |
| 3386 | 3386 | ) { |
| 3387 | 3387 | if ( |
| 3388 | - ($variante_svg_size = substr($variante_svg_generique, 0, -6) . $m[1] . '.svg') |
|
| 3388 | + ($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].'.svg') |
|
| 3389 | 3389 | && file_exists($variante_svg_size)) { |
| 3390 | 3390 | $img_file = $variante_svg_size; |
| 3391 | 3391 | } else { |
@@ -3440,7 +3440,7 @@ discard block |
||
| 3440 | 3440 | return ''; |
| 3441 | 3441 | } |
| 3442 | 3442 | } |
| 3443 | - $atts .= " width='" . $largeur . "' height='" . $hauteur . "'"; |
|
| 3443 | + $atts .= " width='".$largeur."' height='".$hauteur."'"; |
|
| 3444 | 3444 | } |
| 3445 | 3445 | |
| 3446 | 3446 | if (file_exists($img_file)) { |
@@ -3450,14 +3450,14 @@ discard block |
||
| 3450 | 3450 | $alt = ''; |
| 3451 | 3451 | } |
| 3452 | 3452 | elseif ($alt || $alt === '') { |
| 3453 | - $alt = " alt='" . attribut_html($alt) . "'"; |
|
| 3453 | + $alt = " alt='".attribut_html($alt)."'"; |
|
| 3454 | 3454 | } |
| 3455 | 3455 | else { |
| 3456 | - $alt = " alt='" . attribut_html($title) . "'"; |
|
| 3456 | + $alt = " alt='".attribut_html($title)."'"; |
|
| 3457 | 3457 | } |
| 3458 | - return "<img src='" . attribut_html($img_file) . "'$alt" |
|
| 3459 | - . ($title ? ' title="' . attribut_html($title) . '"' : '') |
|
| 3460 | - . ' ' . ltrim($atts) |
|
| 3458 | + return "<img src='".attribut_html($img_file)."'$alt" |
|
| 3459 | + . ($title ? ' title="'.attribut_html($title).'"' : '') |
|
| 3460 | + . ' '.ltrim($atts) |
|
| 3461 | 3461 | . ' />'; |
| 3462 | 3462 | } |
| 3463 | 3463 | |
@@ -3471,10 +3471,10 @@ discard block |
||
| 3471 | 3471 | */ |
| 3472 | 3472 | function http_style_background($img, $att = '', $size = null) { |
| 3473 | 3473 | if ($size && is_numeric($size)) { |
| 3474 | - $size = trim($size) . 'px'; |
|
| 3474 | + $size = trim($size).'px'; |
|
| 3475 | 3475 | } |
| 3476 | - return " style='background" . |
|
| 3477 | - ($att ? '' : '-image') . ': url("' . chemin_image($img) . '")' . ($att ? (' ' . $att) : '') . ';' |
|
| 3476 | + return " style='background". |
|
| 3477 | + ($att ? '' : '-image').': url("'.chemin_image($img).'")'.($att ? (' '.$att) : '').';' |
|
| 3478 | 3478 | . ($size ? "background-size:{$size};" : '') |
| 3479 | 3479 | . "'"; |
| 3480 | 3480 | } |
@@ -3584,7 +3584,7 @@ discard block |
||
| 3584 | 3584 | $img = http_img_pack( |
| 3585 | 3585 | $img, |
| 3586 | 3586 | $alt, |
| 3587 | - $class ? " class='" . attribut_html($class) . "'" : '', |
|
| 3587 | + $class ? " class='".attribut_html($class)."'" : '', |
|
| 3588 | 3588 | '', |
| 3589 | 3589 | ['chemin_image' => false, 'utiliser_suffixe_size' => false] |
| 3590 | 3590 | ); |
@@ -3684,9 +3684,9 @@ discard block |
||
| 3684 | 3684 | // regler le alt |
| 3685 | 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 { |
@@ -3734,7 +3734,7 @@ discard block |
||
| 3734 | 3734 | if (is_array($tableau)) { |
| 3735 | 3735 | foreach ($tableau as $k => $v) { |
| 3736 | 3736 | $res = recuperer_fond( |
| 3737 | - 'modeles/' . $modele, |
|
| 3737 | + 'modeles/'.$modele, |
|
| 3738 | 3738 | array_merge(['cle' => $k], (is_array($v) ? $v : ['valeur' => $v])) |
| 3739 | 3739 | ); |
| 3740 | 3740 | $texte .= $res; |
@@ -3916,7 +3916,7 @@ discard block |
||
| 3916 | 3916 | } |
| 3917 | 3917 | |
| 3918 | 3918 | $c = serialize($c); |
| 3919 | - $cle = calculer_cle_action($form . $c); |
|
| 3919 | + $cle = calculer_cle_action($form.$c); |
|
| 3920 | 3920 | $c = "$cle:$c"; |
| 3921 | 3921 | |
| 3922 | 3922 | // on ne stocke pas les contextes dans des fichiers en cache |
@@ -3974,15 +3974,15 @@ discard block |
||
| 3974 | 3974 | } |
| 3975 | 3975 | // toujours encoder l'url source dans le bloc ajax |
| 3976 | 3976 | $r = self(); |
| 3977 | - $r = ' data-origin="' . $r . '"'; |
|
| 3977 | + $r = ' data-origin="'.$r.'"'; |
|
| 3978 | 3978 | $class = 'ajaxbloc'; |
| 3979 | 3979 | if ($ajaxid && is_string($ajaxid)) { |
| 3980 | 3980 | // ajaxid est normalement conforme a un nom de classe css |
| 3981 | 3981 | // on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution |
| 3982 | - $class .= ' ajax-id-' . entites_html($ajaxid); |
|
| 3982 | + $class .= ' ajax-id-'.entites_html($ajaxid); |
|
| 3983 | 3983 | } |
| 3984 | 3984 | |
| 3985 | - return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 3985 | + return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 3986 | 3986 | } |
| 3987 | 3987 | |
| 3988 | 3988 | /** |
@@ -4027,7 +4027,7 @@ discard block |
||
| 4027 | 4027 | $cle = substr($c, 0, $p); |
| 4028 | 4028 | $c = substr($c, $p + 1); |
| 4029 | 4029 | |
| 4030 | - if ($cle == calculer_cle_action($form . $c)) { |
|
| 4030 | + if ($cle == calculer_cle_action($form.$c)) { |
|
| 4031 | 4031 | return @unserialize($c); |
| 4032 | 4032 | } |
| 4033 | 4033 | } |
@@ -4147,13 +4147,13 @@ discard block |
||
| 4147 | 4147 | } |
| 4148 | 4148 | } |
| 4149 | 4149 | } |
| 4150 | - $att .= 'class="' . ($class ? attribut_html($class) . ' ' : '') . (defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on') . '"'; |
|
| 4150 | + $att .= 'class="'.($class ? attribut_html($class).' ' : '').(defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on').'"'; |
|
| 4151 | 4151 | } else { |
| 4152 | 4152 | $bal = 'a'; |
| 4153 | 4153 | $att = "href='$url'" |
| 4154 | - . ($title ? " title='" . attribut_html($title) . "'" : '') |
|
| 4155 | - . ($class ? " class='" . attribut_html($class) . "'" : '') |
|
| 4156 | - . ($rel ? " rel='" . attribut_html($rel) . "'" : '') |
|
| 4154 | + . ($title ? " title='".attribut_html($title)."'" : '') |
|
| 4155 | + . ($class ? " class='".attribut_html($class)."'" : '') |
|
| 4156 | + . ($rel ? " rel='".attribut_html($rel)."'" : '') |
|
| 4157 | 4157 | . $evt; |
| 4158 | 4158 | } |
| 4159 | 4159 | if ($libelle === null) { |
@@ -4290,7 +4290,7 @@ discard block |
||
| 4290 | 4290 | |
| 4291 | 4291 | // Icône |
| 4292 | 4292 | $icone = http_img_pack($fond, $alt, "width='$size' height='$size'"); |
| 4293 | - $icone = '<span class="icone-image' . ($fonction ? " icone-fonction icone-fonction-$fonction" : '') . "\">$icone</span>"; |
|
| 4293 | + $icone = '<span class="icone-image'.($fonction ? " icone-fonction icone-fonction-$fonction" : '')."\">$icone</span>"; |
|
| 4294 | 4294 | |
| 4295 | 4295 | // Markup final |
| 4296 | 4296 | if ($type == 'lien') { |
@@ -4565,16 +4565,16 @@ discard block |
||
| 4565 | 4565 | $class_form = 'ajax'; |
| 4566 | 4566 | $class = str_replace('ajax', '', $class); |
| 4567 | 4567 | } |
| 4568 | - $class_btn = 'submit ' . trim($class); |
|
| 4568 | + $class_btn = 'submit '.trim($class); |
|
| 4569 | 4569 | |
| 4570 | 4570 | if ($confirm) { |
| 4571 | - $confirm = 'confirm("' . attribut_html($confirm) . '")'; |
|
| 4571 | + $confirm = 'confirm("'.attribut_html($confirm).'")'; |
|
| 4572 | 4572 | $callback = $callback ? "$confirm?($callback):false" : $confirm; |
| 4573 | 4573 | } |
| 4574 | - $onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : ''; |
|
| 4574 | + $onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : ''; |
|
| 4575 | 4575 | $title = $title ? " title='$title'" : ''; |
| 4576 | 4576 | |
| 4577 | - return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>" . form_hidden($url) |
|
| 4577 | + return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>".form_hidden($url) |
|
| 4578 | 4578 | . "<button type='submit' class='$class_btn'$title$onclick>$libelle</button></div></form>"; |
| 4579 | 4579 | } |
| 4580 | 4580 | |
@@ -4638,14 +4638,14 @@ discard block |
||
| 4638 | 4638 | $champ_titre = ''; |
| 4639 | 4639 | if ($demande_titre) { |
| 4640 | 4640 | // si pas de titre declare mais champ titre, il sera peuple par le select * |
| 4641 | - $champ_titre = (empty($desc['titre'])) ? '' : ', ' . $desc['titre']; |
|
| 4641 | + $champ_titre = (empty($desc['titre'])) ? '' : ', '.$desc['titre']; |
|
| 4642 | 4642 | } |
| 4643 | 4643 | include_spip('base/abstract_sql'); |
| 4644 | 4644 | include_spip('base/connect_sql'); |
| 4645 | 4645 | $objets[$type_objet][$id_objet] = sql_fetsel( |
| 4646 | - '*' . $champ_titre, |
|
| 4646 | + '*'.$champ_titre, |
|
| 4647 | 4647 | $desc['table_sql'], |
| 4648 | - id_table_objet($type_objet) . ' = ' . (int) $id_objet |
|
| 4648 | + id_table_objet($type_objet).' = '.(int) $id_objet |
|
| 4649 | 4649 | ); |
| 4650 | 4650 | |
| 4651 | 4651 | // Toujours noter la longueur d'introduction, même si pas demandé cette fois-ci |
@@ -4736,8 +4736,7 @@ discard block |
||
| 4736 | 4736 | if (isset($ligne_sql['chapo'])) { |
| 4737 | 4737 | $chapo = $ligne_sql['chapo']; |
| 4738 | 4738 | $texte = strlen($descriptif) ? |
| 4739 | - '' : |
|
| 4740 | - "$chapo \n\n $texte"; |
|
| 4739 | + '' : "$chapo \n\n $texte"; |
|
| 4741 | 4740 | } |
| 4742 | 4741 | |
| 4743 | 4742 | // Longueur en paramètre, sinon celle renseignée dans la description de l'objet, sinon valeur en dur |
@@ -4809,7 +4808,7 @@ discard block |
||
| 4809 | 4808 | return $texte; |
| 4810 | 4809 | } |
| 4811 | 4810 | |
| 4812 | - $traitement = str_replace('%s', "'" . texte_script($texte) . "'", $traitement); |
|
| 4811 | + $traitement = str_replace('%s', "'".texte_script($texte)."'", $traitement); |
|
| 4813 | 4812 | |
| 4814 | 4813 | // signaler qu'on est dans l'espace prive pour les filtres qui se servent de ce flag |
| 4815 | 4814 | if (test_espace_prive()) { |
@@ -4845,7 +4844,7 @@ discard block |
||
| 4845 | 4844 | } |
| 4846 | 4845 | $url = generer_objet_url($id_objet, $objet, '', '', null, '', $connect); |
| 4847 | 4846 | |
| 4848 | - return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . '</a>'; |
|
| 4847 | + return "<a href='$url' class='$objet'>".couper($titre, $longueur).'</a>'; |
|
| 4849 | 4848 | } |
| 4850 | 4849 | |
| 4851 | 4850 | /** |
@@ -4871,9 +4870,9 @@ discard block |
||
| 4871 | 4870 | function wrap($texte, $wrap) { |
| 4872 | 4871 | $balises = extraire_balises($wrap); |
| 4873 | 4872 | if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) { |
| 4874 | - $texte = $wrap . $texte; |
|
| 4873 | + $texte = $wrap.$texte; |
|
| 4875 | 4874 | $regs = array_reverse($regs[1]); |
| 4876 | - $wrap = '</' . implode('></', $regs) . '>'; |
|
| 4875 | + $wrap = '</'.implode('></', $regs).'>'; |
|
| 4877 | 4876 | $texte .= $wrap; |
| 4878 | 4877 | } |
| 4879 | 4878 | |
@@ -4903,7 +4902,7 @@ discard block |
||
| 4903 | 4902 | |
| 4904 | 4903 | // caster $u en array si besoin |
| 4905 | 4904 | if (is_object($u)) { |
| 4906 | - $u = (array)$u; |
|
| 4905 | + $u = (array) $u; |
|
| 4907 | 4906 | } |
| 4908 | 4907 | |
| 4909 | 4908 | if (is_array($u)) { |
@@ -4925,7 +4924,7 @@ discard block |
||
| 4925 | 4924 | // sinon on passe a la ligne et on indente |
| 4926 | 4925 | $i_str = str_pad('', $indent, ' '); |
| 4927 | 4926 | foreach ($u as $k => $v) { |
| 4928 | - $out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2); |
|
| 4927 | + $out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2); |
|
| 4929 | 4928 | } |
| 4930 | 4929 | |
| 4931 | 4930 | return $out; |
@@ -4979,7 +4978,7 @@ discard block |
||
| 4979 | 4978 | * @return string |
| 4980 | 4979 | */ |
| 4981 | 4980 | function objet_icone($objet, $taille = 24, $class = '') { |
| 4982 | - $icone = objet_info($objet, 'icone_objet') . '-' . $taille . '.png'; |
|
| 4981 | + $icone = objet_info($objet, 'icone_objet').'-'.$taille.'.png'; |
|
| 4983 | 4982 | $icone = chemin_image($icone); |
| 4984 | 4983 | $balise_img = charger_filtre('balise_img'); |
| 4985 | 4984 | |
@@ -5005,7 +5004,7 @@ discard block |
||
| 5005 | 5004 | */ |
| 5006 | 5005 | function objet_T($objet, $chaine, $args = [], $options = []) { |
| 5007 | 5006 | $chaine = explode(':', $chaine); |
| 5008 | - if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, ['force' => false]))) { |
|
| 5007 | + if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, ['force' => false]))) { |
|
| 5009 | 5008 | return $t; |
| 5010 | 5009 | } |
| 5011 | 5010 | $chaine = implode(':', $chaine); |
@@ -5071,7 +5070,7 @@ discard block |
||
| 5071 | 5070 | $cache = recuperer_fond($fond, $contexte, $options, $connect); |
| 5072 | 5071 | |
| 5073 | 5072 | // calculer le nom de la css |
| 5074 | - $dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension); |
|
| 5073 | + $dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension); |
|
| 5075 | 5074 | $nom_safe = preg_replace(',\W,', '_', str_replace('.', '_', $fond)); |
| 5076 | 5075 | $contexte_implicite = calculer_contexte_implicite(); |
| 5077 | 5076 | |
@@ -5079,14 +5078,14 @@ discard block |
||
| 5079 | 5078 | // mais on peut hasher selon le contenu a la demande, si plusieurs contextes produisent un meme contenu |
| 5080 | 5079 | // reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine |
| 5081 | 5080 | if (isset($options['hash_on_content']) && $options['hash_on_content']) { |
| 5082 | - $hash = md5($contexte_implicite['host'] . '::' . $cache); |
|
| 5081 | + $hash = md5($contexte_implicite['host'].'::'.$cache); |
|
| 5083 | 5082 | } |
| 5084 | 5083 | else { |
| 5085 | 5084 | unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js |
| 5086 | 5085 | ksort($contexte); |
| 5087 | - $hash = md5($fond . json_encode($contexte_implicite, JSON_THROW_ON_ERROR) . json_encode($contexte, JSON_THROW_ON_ERROR) . $connect); |
|
| 5086 | + $hash = md5($fond.json_encode($contexte_implicite, JSON_THROW_ON_ERROR).json_encode($contexte, JSON_THROW_ON_ERROR).$connect); |
|
| 5088 | 5087 | } |
| 5089 | - $filename = $dir_var . $extension . "dyn-$nom_safe-" . substr($hash, 0, 8) . ".$extension"; |
|
| 5088 | + $filename = $dir_var.$extension."dyn-$nom_safe-".substr($hash, 0, 8).".$extension"; |
|
| 5090 | 5089 | |
| 5091 | 5090 | // mettre a jour le fichier si il n'existe pas |
| 5092 | 5091 | // ou trop ancien |
@@ -5094,8 +5093,8 @@ discard block |
||
| 5094 | 5093 | // et recopie sur le fichier cible uniquement si il change |
| 5095 | 5094 | if ( |
| 5096 | 5095 | !file_exists($filename) |
| 5097 | - || !file_exists($filename . '.last') |
|
| 5098 | - || isset($cache['lastmodified']) && $cache['lastmodified'] && filemtime($filename . '.last') < $cache['lastmodified'] |
|
| 5096 | + || !file_exists($filename.'.last') |
|
| 5097 | + || isset($cache['lastmodified']) && $cache['lastmodified'] && filemtime($filename.'.last') < $cache['lastmodified'] |
|
| 5099 | 5098 | || defined('_VAR_MODE') && _VAR_MODE == 'recalcul' |
| 5100 | 5099 | ) { |
| 5101 | 5100 | $contenu = $cache['texte']; |
@@ -5119,10 +5118,10 @@ discard block |
||
| 5119 | 5118 | } |
| 5120 | 5119 | // pas de date dans le commentaire car sinon ca invalide le md5 et force la maj |
| 5121 | 5120 | // mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non |
| 5122 | - $comment .= "}\n md5:" . md5($contenu) . " */\n"; |
|
| 5121 | + $comment .= "}\n md5:".md5($contenu)." */\n"; |
|
| 5123 | 5122 | } |
| 5124 | 5123 | // et ecrire le fichier si il change |
| 5125 | - ecrire_fichier_calcule_si_modifie($filename, $comment . $contenu, false, true); |
|
| 5124 | + ecrire_fichier_calcule_si_modifie($filename, $comment.$contenu, false, true); |
|
| 5126 | 5125 | } |
| 5127 | 5126 | |
| 5128 | 5127 | return timestamp($filename); |
@@ -5349,7 +5348,7 @@ discard block |
||
| 5349 | 5348 | if ($e > 0 && strlen($mid) > 8) { |
| 5350 | 5349 | $mid = '***...***'; |
| 5351 | 5350 | } |
| 5352 | - return substr($passe, 0, $e) . $mid . ($e > 0 ? substr($passe, -$e) : ''); |
|
| 5351 | + return substr($passe, 0, $e).$mid.($e > 0 ? substr($passe, -$e) : ''); |
|
| 5353 | 5352 | } |
| 5354 | 5353 | |
| 5355 | 5354 | |
@@ -5411,7 +5410,7 @@ discard block |
||
| 5411 | 5410 | case 'id': |
| 5412 | 5411 | case 'anchor': |
| 5413 | 5412 | if (preg_match(',^\d,', $texte)) { |
| 5414 | - $texte = substr($type, 0, 1) . $texte; |
|
| 5413 | + $texte = substr($type, 0, 1).$texte; |
|
| 5415 | 5414 | } |
| 5416 | 5415 | } |
| 5417 | 5416 | |
@@ -5421,9 +5420,9 @@ discard block |
||
| 5421 | 5420 | |
| 5422 | 5421 | if (strlen($texte) < $longueur_mini && $longueur_mini < $longueur_maxi) { |
| 5423 | 5422 | if (preg_match(',^\d,', $texte)) { |
| 5424 | - $texte = ($type ? substr($type, 0, 1) : 's') . $texte; |
|
| 5423 | + $texte = ($type ? substr($type, 0, 1) : 's').$texte; |
|
| 5425 | 5424 | } |
| 5426 | - $texte .= $separateur . md5($original); |
|
| 5425 | + $texte .= $separateur.md5($original); |
|
| 5427 | 5426 | $texte = substr($texte, 0, $longueur_mini); |
| 5428 | 5427 | } |
| 5429 | 5428 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $type = reset($objets); |
| 160 | 160 | $type = objet_type($type); |
| 161 | 161 | $id = (int) $ref; |
| 162 | - $ref = $type . $ref; |
|
| 162 | + $ref = $type.$ref; |
|
| 163 | 163 | } |
| 164 | 164 | else { |
| 165 | 165 | // Si la référence ne correspond à rien, c'est fini |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | return json_export(false); |
| 168 | 168 | } |
| 169 | 169 | // Sinon on récupère les infos utiles |
| 170 | - [$type, , $id, , , , ] = array_pad($match, 7, null); |
|
| 170 | + [$type,, $id,,,,] = array_pad($match, 7, null); |
|
| 171 | 171 | |
| 172 | 172 | // On regarde si le type trouvé fait partie des objets sélectionnables |
| 173 | 173 | if (!in_array(table_objet($type), $objets)) { |
@@ -213,8 +213,8 @@ discard block |
||
| 213 | 213 | $types = (is_array($types) ? array_filter($types) : []); |
| 214 | 214 | |
| 215 | 215 | // recuperer tous les freres et soeurs de la rubrique visee |
| 216 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 217 | - $fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . (int) $id_parent); |
|
| 216 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 217 | + $fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent='.(int) $id_parent); |
|
| 218 | 218 | $fratrie = array_column($fratrie, 'id_rubrique'); |
| 219 | 219 | $has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie)); |
| 220 | 220 | $has = array_column($has, 'id_parent'); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | // confirmation du deplacement |
| 117 | 117 | if ( |
| 118 | 118 | sql_table_exists('spip_breves') |
| 119 | - && ($contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . (int) $id_objet)) |
|
| 119 | + && ($contient_breves = sql_countsel('spip_breves', 'id_rubrique='.(int) $id_objet)) |
|
| 120 | 120 | && $contient_breves > 0 |
| 121 | 121 | ) { |
| 122 | 122 | // FIXME: utiliser singulier_ou_pluriel, migrer dans plugin Brèves |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | ); |
| 131 | 131 | $confirm .= "\n<div class='confirmer_deplacement verdana2'>" |
| 132 | 132 | . "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>" |
| 133 | - . $scb . |
|
| 133 | + . $scb. |
|
| 134 | 134 | "</label></div></div>\n"; |
| 135 | 135 | } else { |
| 136 | 136 | $confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n"; |
@@ -139,11 +139,11 @@ discard block |
||
| 139 | 139 | $form .= $confirm; |
| 140 | 140 | if ($actionable) { |
| 141 | 141 | if (str_contains($form, '<select')) { |
| 142 | - $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 143 | - . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>' |
|
| 142 | + $form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 143 | + . '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>' |
|
| 144 | 144 | . '</div>'; |
| 145 | 145 | } |
| 146 | - $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form; |
|
| 146 | + $form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form; |
|
| 147 | 147 | if ($action = charger_fonction("editer_$objet", 'action', true)) { |
| 148 | 148 | $form = generer_action_auteur( |
| 149 | 149 | "editer_$objet", |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | include_spip('inc/presentation'); |
| 171 | 171 | |
| 172 | - return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur(); |
|
| 172 | + return debut_cadre_couleur($logo, true, '', $titre).$form.fin_cadre_couleur(); |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | if ($statut == 'nouveau') { |
| 246 | 246 | if ($attente) { |
| 247 | 247 | $statut = $attente; |
| 248 | - $plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')'; |
|
| 248 | + $plus = ' ('._T('info_statut_auteur_a_confirmer').')'; |
|
| 249 | 249 | } else { |
| 250 | 250 | return _T('info_statut_auteur_a_confirmer'); |
| 251 | 251 | } |
@@ -258,16 +258,16 @@ discard block |
||
| 258 | 258 | '5poubelle' => _T('texte_statut_poubelle'), // bouh |
| 259 | 259 | ]; |
| 260 | 260 | if (isset($recom[$statut])) { |
| 261 | - return $recom[$statut] . $plus; |
|
| 261 | + return $recom[$statut].$plus; |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | // retrouver directement par le statut sinon |
| 265 | 265 | if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) { |
| 266 | 266 | if (isset($recom[$t])) { |
| 267 | - return $recom[$t] . $plus; |
|
| 267 | + return $recom[$t].$plus; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - return _T($t) . $plus; |
|
| 270 | + return _T($t).$plus; |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | // si on a pas reussi a le traduire, retournons la chaine telle quelle |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | |
| 388 | 388 | if (!$id_rubrique && defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') && _CHOIX_RUBRIQUE_PAR_DEFAUT) { |
| 389 | 389 | $in = (is_countable($GLOBALS['connect_id_rubrique']) ? count($GLOBALS['connect_id_rubrique']) : 0) |
| 390 | - ? ' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']) |
|
| 390 | + ? ' AND '.sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']) |
|
| 391 | 391 | : ''; |
| 392 | 392 | |
| 393 | 393 | // on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | return ''; |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | - return propre('[->' . $virtuel . ']'); |
|
| 425 | + return propre('[->'.$virtuel.']'); |
|
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | $clic = http_img_pack('rss-16.png', 'RSS', '', $title); |
| 450 | 450 | |
| 451 | 451 | $url = generer_url_api_low_sec('transmettre', 'rss', $op, '', http_build_query($args), false, true); |
| 452 | - return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>"; |
|
| 452 | + return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>"; |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | ); |
| 522 | 522 | |
| 523 | 523 | if ($alertes = array_filter($alertes)) { |
| 524 | - return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" . |
|
| 524 | + return "<div class='wrap-messages-alertes'><div class='messages-alertes'>". |
|
| 525 | 525 | implode(' | ', $alertes) |
| 526 | 526 | . '</div></div>'; |
| 527 | 527 | } |
@@ -557,13 +557,13 @@ discard block |
||
| 557 | 557 | */ |
| 558 | 558 | function afficher_plus_info($lien, $titre = '+', $titre_lien = '') { |
| 559 | 559 | $titre = attribut_html($titre); |
| 560 | - $icone = "\n<a href='$lien' title='$titre' class='plus_info'>" . |
|
| 561 | - http_img_pack('information-16.png', $titre) . '</a>'; |
|
| 560 | + $icone = "\n<a href='$lien' title='$titre' class='plus_info'>". |
|
| 561 | + http_img_pack('information-16.png', $titre).'</a>'; |
|
| 562 | 562 | |
| 563 | 563 | if (!$titre_lien) { |
| 564 | 564 | return $icone; |
| 565 | 565 | } else { |
| 566 | - return $icone . "\n<a href='$lien'>$titre_lien</a>"; |
|
| 566 | + return $icone."\n<a href='$lien'>$titre_lien</a>"; |
|
| 567 | 567 | } |
| 568 | 568 | } |
| 569 | 569 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $role = $roles['roles']['defaut']; |
| 147 | 147 | } |
| 148 | 148 | // where |
| 149 | - $cond = ["$colonne_role=" . sql_quote($role)]; |
|
| 149 | + $cond = ["$colonne_role=".sql_quote($role)]; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | return [$role, $colonne_role, $cond]; |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | unset($cond['role']); // cette condition est particuliere... |
| 180 | 180 | // on ajoute la condition du role aux autres conditions. |
| 181 | 181 | if ($colonne_role && $role != '*') { |
| 182 | - $cond[] = "$colonne_role=" . sql_quote($role); |
|
| 182 | + $cond[] = "$colonne_role=".sql_quote($role); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | return [$cond, $colonne_role, $role]; |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | $all = sql_allfetsel( |
| 363 | 363 | "DISTINCT $colone_role", |
| 364 | 364 | $l, |
| 365 | - 'objet=' . sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source) |
|
| 365 | + 'objet='.sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source) |
|
| 366 | 366 | ); |
| 367 | 367 | $done[$hash] = array_map('reset', $all); |
| 368 | 368 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | static $t1 = ['&', '<', '>']; |
| 120 | 120 | static $t2 = ['&', '<', '>']; |
| 121 | 121 | |
| 122 | - return '<pre>' . str_replace($t1, $t2, (string) $t) . '</pre>'; |
|
| 122 | + return '<pre>'.str_replace($t1, $t2, (string) $t).'</pre>'; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
@@ -139,12 +139,12 @@ discard block |
||
| 139 | 139 | foreach ($lignes as &$l) { |
| 140 | 140 | $l = implode('|', $l); |
| 141 | 141 | } |
| 142 | - $corps = implode("\n", $lignes) . "\n"; |
|
| 143 | - $corps = $caption . |
|
| 144 | - "\n|{{" . |
|
| 145 | - implode('}}|{{', $entete) . |
|
| 146 | - '}}|' . |
|
| 147 | - "\n|" . |
|
| 142 | + $corps = implode("\n", $lignes)."\n"; |
|
| 143 | + $corps = $caption. |
|
| 144 | + "\n|{{". |
|
| 145 | + implode('}}|{{', $entete). |
|
| 146 | + '}}|'. |
|
| 147 | + "\n|". |
|
| 148 | 148 | str_replace("\n", "|\n|", $corps); |
| 149 | 149 | include_spip('inc/texte'); |
| 150 | 150 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? |
| 189 | 189 | $t = safehtml(preg_replace(',<script.*?</script>,is', '', $t)); |
| 190 | 190 | |
| 191 | - return ($style ? "\n<style>" . $style . '</style>' : '') . $t; |
|
| 191 | + return ($style ? "\n<style>".$style.'</style>' : '').$t; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
@@ -43,13 +43,13 @@ discard block |
||
| 43 | 43 | // celle du texte) et public (spip_lang est la langue du texte) |
| 44 | 44 | $dir = _DIR_RESTREINT ? lang_dir() : lang_dir($GLOBALS['spip_lang']); |
| 45 | 45 | |
| 46 | - $p = 'puce' . (test_espace_prive() ? '_prive' : ''); |
|
| 46 | + $p = 'puce'.(test_espace_prive() ? '_prive' : ''); |
|
| 47 | 47 | if ($dir == 'rtl') { |
| 48 | 48 | $p .= '_rtl'; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if (!isset($GLOBALS[$p])) { |
| 52 | - $GLOBALS[$p] = '<span class="spip-puce ' . $dir . '"><b>–</b></span>'; |
|
| 52 | + $GLOBALS[$p] = '<span class="spip-puce '.$dir.'"><b>–</b></span>'; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $GLOBALS[$p]; |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | function spip_balisage_code(string $corps, bool $bloc = false, string $attributs = '', string $langage = '') { |
| 68 | 68 | |
| 69 | 69 | $echap = spip_htmlspecialchars($corps); // il ne faut pas passer dans entites_html, ne pas transformer les &#xxx; du code ! |
| 70 | - $class = 'spip_code ' . ($bloc ? 'spip_code_block' : 'spip_code_inline'); |
|
| 70 | + $class = 'spip_code '.($bloc ? 'spip_code_block' : 'spip_code_inline'); |
|
| 71 | 71 | if ($attributs) { |
| 72 | - $attributs = ' ' . trim($attributs); |
|
| 72 | + $attributs = ' '.trim($attributs); |
|
| 73 | 73 | } |
| 74 | 74 | if ($langage) { |
| 75 | 75 | $class .= " language-$langage"; |
| 76 | - $attributs .= ' data-language="' . $langage . '"'; |
|
| 76 | + $attributs .= ' data-language="'.$langage.'"'; |
|
| 77 | 77 | } |
| 78 | 78 | if ($bloc) { |
| 79 | 79 | $html = '<div class="precode">' |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | else { |
| 88 | 88 | $echap = str_replace("\t", ' ', $echap); |
| 89 | 89 | $echap = str_replace(' ', ' ', $echap); |
| 90 | - $html = "<code class=\"$class\" dir=\"ltr\"$attributs>" . $echap . '</code>'; |
|
| 90 | + $html = "<code class=\"$class\" dir=\"ltr\"$attributs>".$echap.'</code>'; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | return $html; |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | if (!defined('_BALISES_BLOCS_REGEXP')) { |
| 108 | - define('_BALISES_BLOCS_REGEXP', ',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS'); |
|
| 108 | + define('_BALISES_BLOCS_REGEXP', ',</?('._BALISES_BLOCS.')[>[:space:]],iS'); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | // |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | // Tester si on echappe en span ou en div |
| 124 | 124 | if (is_null($mode) or !in_array($mode, ['div', 'span'])) { |
| 125 | - $mode = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $rempl) ? 'div' : 'span'; |
|
| 125 | + $mode = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $rempl) ? 'div' : 'span'; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | // Decouper en morceaux, base64 a des probleme selon la taille de la pile |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | ) { |
| 158 | 158 | foreach ($matches as $m) { |
| 159 | 159 | if ($m[1] === 'code') { |
| 160 | - $code = '<code' . $m[2] . '>' . spip_htmlspecialchars($m[3]) . '</code>'; |
|
| 160 | + $code = '<code'.$m[2].'>'.spip_htmlspecialchars($m[3]).'</code>'; |
|
| 161 | 161 | $pre = str_replace($m[0], $code, $pre); |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | // Echapper les <code>...</ code> |
| 169 | 169 | function traiter_echap_code_dist($regs, $options = []) { |
| 170 | - [, , $att, $corps] = $regs; |
|
| 170 | + [,, $att, $corps] = $regs; |
|
| 171 | 171 | |
| 172 | 172 | // ne pas mettre le <div...> s'il n'y a qu'une ligne |
| 173 | 173 | if (strpos($corps, "\n") !== false) { |
@@ -252,11 +252,11 @@ discard block |
||
| 252 | 252 | // sinon les traiter selon le cas |
| 253 | 253 | $callback_secure_prefix = ($callback_options['secure_prefix'] ?? ''); |
| 254 | 254 | if ( |
| 255 | - function_exists($f = $callback_prefix . $callback_secure_prefix . 'traiter_echap_' . strtolower($regs[1])) |
|
| 256 | - or function_exists($f = $f . '_dist') |
|
| 255 | + function_exists($f = $callback_prefix.$callback_secure_prefix.'traiter_echap_'.strtolower($regs[1])) |
|
| 256 | + or function_exists($f = $f.'_dist') |
|
| 257 | 257 | or ($callback_secure_prefix and ( |
| 258 | - function_exists($f = $callback_prefix . 'traiter_echap_' . strtolower($regs[1])) |
|
| 259 | - or function_exists($f = $f . '_dist') |
|
| 258 | + function_exists($f = $callback_prefix.'traiter_echap_'.strtolower($regs[1])) |
|
| 259 | + or function_exists($f = $f.'_dist') |
|
| 260 | 260 | )) |
| 261 | 261 | ) { |
| 262 | 262 | $echap = $f($regs, $callback_options); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | // dans une callback autonommee |
| 279 | 279 | if (strpos($preg ?: _PROTEGE_BLOCS, 'script') !== false) { |
| 280 | 280 | if ( |
| 281 | - strpos($letexte, '<' . '?') !== false and preg_match_all( |
|
| 281 | + strpos($letexte, '<'.'?') !== false and preg_match_all( |
|
| 282 | 282 | ',<[?].*($|[?]>),UisS', |
| 283 | 283 | $letexte, |
| 284 | 284 | $matches, |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | strpos($letexte, '<') !== false |
| 311 | 311 | and |
| 312 | 312 | preg_match_all( |
| 313 | - ',<(span|div)\sclass=[\'"]base64' . $source . '[\'"]\s(.*)>\s*</\1>,UmsS', |
|
| 313 | + ',<(span|div)\sclass=[\'"]base64'.$source.'[\'"]\s(.*)>\s*</\1>,UmsS', |
|
| 314 | 314 | $letexte, |
| 315 | 315 | $regs, |
| 316 | 316 | PREG_SET_ORDER |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | } |
| 328 | 328 | } |
| 329 | 329 | if ($at) { |
| 330 | - $rempl = '<' . $reg[1] . '>' . $rempl . '</' . $reg[1] . '>'; |
|
| 330 | + $rempl = '<'.$reg[1].'>'.$rempl.'</'.$reg[1].'>'; |
|
| 331 | 331 | foreach ($at as $attr => $a) { |
| 332 | 332 | $rempl = inserer_attribut($rempl, $attr, $a); |
| 333 | 333 | } |
@@ -408,8 +408,8 @@ discard block |
||
| 408 | 408 | $texte = nettoyer_raccourcis_typo($texte); |
| 409 | 409 | |
| 410 | 410 | // balises de sauts de ligne et paragraphe |
| 411 | - $texte = preg_replace('/<p( [^>]*)?' . '>/', "\r\r", $texte); |
|
| 412 | - $texte = preg_replace('/<br( [^>]*)?' . '>/', "\n", $texte); |
|
| 411 | + $texte = preg_replace('/<p( [^>]*)?'.'>/', "\r\r", $texte); |
|
| 412 | + $texte = preg_replace('/<br( [^>]*)?'.'>/', "\n", $texte); |
|
| 413 | 413 | |
| 414 | 414 | // on repasse les doubles \n en \r que nettoyer_raccourcis_typo() a pu modifier |
| 415 | 415 | $texte = str_replace("\n\n", "\r\r", $texte); |
@@ -434,15 +434,15 @@ discard block |
||
| 434 | 434 | // excédentaire est ensuite supprimé par l'appel à preg_replace() |
| 435 | 435 | $long = spip_substr($texte, 0, max($taille + 1 - $taille_suite, 1)); |
| 436 | 436 | $u = $GLOBALS['meta']['pcre_u']; |
| 437 | - $court = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D' . $u, "\\2", $long); |
|
| 437 | + $court = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D'.$u, "\\2", $long); |
|
| 438 | 438 | $points = $suite; |
| 439 | 439 | |
| 440 | 440 | // trop court ? ne pas faire de (...) |
| 441 | 441 | if (spip_strlen($court) < max(0.75 * $taille, 2)) { |
| 442 | 442 | $points = ''; |
| 443 | 443 | $long = spip_substr($texte, 0, $taille + 1); |
| 444 | - preg_match('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D' . $u, $long, $m); |
|
| 445 | - $texte = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D' . $u, "\\2", $long); |
|
| 444 | + preg_match('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D'.$u, $long, $m); |
|
| 445 | + $texte = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D'.$u, "\\2", $long); |
|
| 446 | 446 | // encore trop court ? couper au caractere |
| 447 | 447 | if (spip_strlen($texte) < 0.75 * $taille) { |
| 448 | 448 | $texte = spip_substr($long, 0, $taille); |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | // supprimer l'eventuelle entite finale mal coupee |
| 459 | 459 | $texte = preg_replace('/&#?[a-z0-9]*$/S', '', $texte); |
| 460 | 460 | |
| 461 | - return quote_amp(trim($texte)) . $points; |
|
| 461 | + return quote_amp(trim($texte)).$points; |
|
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | |
@@ -470,16 +470,16 @@ discard block |
||
| 470 | 470 | define('_PROTEGE_JS_MODELES', creer_uniqid()); |
| 471 | 471 | } |
| 472 | 472 | foreach ($r as $regs) { |
| 473 | - $t = str_replace($regs[0], code_echappement($regs[0], 'javascript' . _PROTEGE_JS_MODELES), $t); |
|
| 473 | + $t = str_replace($regs[0], code_echappement($regs[0], 'javascript'._PROTEGE_JS_MODELES), $t); |
|
| 474 | 474 | } |
| 475 | 475 | } |
| 476 | - if (preg_match_all(',<\?php.*?($|\?' . '>),isS', $t, $r, PREG_SET_ORDER)) { |
|
| 476 | + if (preg_match_all(',<\?php.*?($|\?'.'>),isS', $t, $r, PREG_SET_ORDER)) { |
|
| 477 | 477 | if (!defined('_PROTEGE_PHP_MODELES')) { |
| 478 | 478 | include_spip('inc/acces'); |
| 479 | 479 | define('_PROTEGE_PHP_MODELES', creer_uniqid()); |
| 480 | 480 | } |
| 481 | 481 | foreach ($r as $regs) { |
| 482 | - $t = str_replace($regs[0], code_echappement($regs[0], 'php' . _PROTEGE_PHP_MODELES), $t); |
|
| 482 | + $t = str_replace($regs[0], code_echappement($regs[0], 'php'._PROTEGE_PHP_MODELES), $t); |
|
| 483 | 483 | } |
| 484 | 484 | } |
| 485 | 485 | } |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | if (!empty($options['wrap_suspect'])) { |
| 597 | 597 | $texte = wrap($texte, $options['wrap_suspect']); |
| 598 | 598 | } |
| 599 | - $texte = "<mark class='danger-js' title='" . attribut_html(_T('erreur_contenu_suspect')) . "'>⚠️</mark> " . $texte; |
|
| 599 | + $texte = "<mark class='danger-js' title='".attribut_html(_T('erreur_contenu_suspect'))."'>⚠️</mark> ".$texte; |
|
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | $texte = $collecteurModeles->retablir($texte); |
@@ -743,11 +743,11 @@ discard block |
||
| 743 | 743 | **/ |
| 744 | 744 | function supprime_img($letexte, $message = null) { |
| 745 | 745 | if ($message === null) { |
| 746 | - $message = '(' . _T('img_indisponible') . ')'; |
|
| 746 | + $message = '('._T('img_indisponible').')'; |
|
| 747 | 747 | } |
| 748 | 748 | |
| 749 | 749 | return preg_replace( |
| 750 | - ',<(img|doc|emb)([0-9]+)(\|([^>]*))?' . '\s*/?' . '>,i', |
|
| 750 | + ',<(img|doc|emb)([0-9]+)(\|([^>]*))?'.'\s*/?'.'>,i', |
|
| 751 | 751 | $message, |
| 752 | 752 | $letexte |
| 753 | 753 | ); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @return void |
| 43 | 43 | **/ |
| 44 | 44 | function install_fichier_connexion($nom, $texte) { |
| 45 | - $texte = '<' . "?php\n" |
|
| 45 | + $texte = '<'."?php\n" |
|
| 46 | 46 | . "if (!defined(\"_ECRIRE_INC_VERSION\")) return;\n" |
| 47 | 47 | . $texte; |
| 48 | 48 | |
@@ -114,10 +114,10 @@ discard block |
||
| 114 | 114 | return $regs; |
| 115 | 115 | } else { |
| 116 | 116 | $ar = '\s*\'([^\']*)\''; |
| 117 | - $r = '\s*,' . $ar; |
|
| 117 | + $r = '\s*,'.$ar; |
|
| 118 | 118 | $r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r(?:$r)?)?)?)?#"; |
| 119 | 119 | if (preg_match($r, $s, $regs)) { |
| 120 | - $regs[2] = $regs[1] . (!$regs[2] ? '' : ':' . $regs[2] . ';'); |
|
| 120 | + $regs[2] = $regs[1].(!$regs[2] ? '' : ':'.$regs[2].';'); |
|
| 121 | 121 | array_shift($regs); |
| 122 | 122 | array_shift($regs); |
| 123 | 123 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | // Si on n'a pas la bonne version de PHP, c'est la fin |
| 183 | 183 | if ($err) { |
| 184 | 184 | die("<div class='error'>" |
| 185 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>" |
|
| 185 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>" |
|
| 186 | 186 | . "<li><strong>{$err[0]}</strong></li>\n</ul></div>"); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | if ($err) { |
| 204 | 204 | echo "<div class='error'>" |
| 205 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>"; |
|
| 205 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>"; |
|
| 206 | 206 | foreach ($err as $e) { |
| 207 | 207 | echo "<li><strong>$e</strong></li>\n"; |
| 208 | 208 | } |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | |
| 216 | 216 | |
| 217 | 217 | function info_etape($titre, $complement = '') { |
| 218 | - return '<h2>' . $titre . "</h2>\n" . |
|
| 219 | - ($complement ? '' . $complement . "\n" : ''); |
|
| 218 | + return '<h2>'.$titre."</h2>\n". |
|
| 219 | + ($complement ? ''.$complement."\n" : ''); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -230,18 +230,18 @@ discard block |
||
| 230 | 230 | $code = _T('bouton_suivant'); |
| 231 | 231 | } |
| 232 | 232 | static $suivant = 0; |
| 233 | - $id = 'suivant' . (($suivant > 0) ? strval($suivant) : ''); |
|
| 233 | + $id = 'suivant'.(($suivant > 0) ? strval($suivant) : ''); |
|
| 234 | 234 | $suivant += 1; |
| 235 | 235 | |
| 236 | - return "\n<p class='boutons suivant'><input id='" . $id . "' type='submit'\nvalue=\"" . |
|
| 237 | - $code . |
|
| 236 | + return "\n<p class='boutons suivant'><input id='".$id."' type='submit'\nvalue=\"". |
|
| 237 | + $code. |
|
| 238 | 238 | " >>\" /></p>\n"; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | function info_progression_etape($en_cours, $phase, $dir, $erreur = false) { |
| 242 | 242 | $intitule_etat = []; |
| 243 | 243 | |
| 244 | - $liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$'); |
|
| 244 | + $liste = find_all_in_path($dir, $phase.'(([0-9])+|fin)[.]php$'); |
|
| 245 | 245 | $debut = 1; |
| 246 | 246 | $last = count($liste); |
| 247 | 247 | |
@@ -276,8 +276,8 @@ discard block |
||
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | $aff_etapes .= "<li class='$class'><div class='fond'>"; |
| 279 | - $aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 280 | - $aff_etapes .= '<' . (($debut == $en_cours) ? 'strong' : 'span') . ' class="label_etape">' . $intitule_etat["$phase"][$debut] . '</' . (($debut == $en_cours) ? 'strong' : 'span') . '>'; |
|
| 279 | + $aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 280 | + $aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">'.$intitule_etat["$phase"][$debut].'</'.(($debut == $en_cours) ? 'strong' : 'span').'>'; |
|
| 281 | 281 | $aff_etapes .= '</div></li>'; |
| 282 | 282 | } |
| 283 | 283 | $debut++; |
@@ -289,11 +289,11 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | |
| 291 | 291 | function fieldset($legend, $champs = [], $apres = '', $avant = '') { |
| 292 | - return "<fieldset>\n" . |
|
| 293 | - $avant . |
|
| 294 | - ($legend ? '<legend>' . $legend . "</legend>\n" : '') . |
|
| 295 | - fieldset_champs($champs) . |
|
| 296 | - $apres . |
|
| 292 | + return "<fieldset>\n". |
|
| 293 | + $avant. |
|
| 294 | + ($legend ? '<legend>'.$legend."</legend>\n" : ''). |
|
| 295 | + fieldset_champs($champs). |
|
| 296 | + $apres. |
|
| 297 | 297 | "</fieldset>\n"; |
| 298 | 298 | } |
| 299 | 299 | |
@@ -303,18 +303,18 @@ discard block |
||
| 303 | 303 | $type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', $nom) ? 'password' : 'text'); |
| 304 | 304 | $class = isset($contenu['hidden']) ? '' : "class='formo' size='40' "; |
| 305 | 305 | if (isset($contenu['alternatives'])) { |
| 306 | - $fieldset .= $contenu['label'] . "\n"; |
|
| 306 | + $fieldset .= $contenu['label']."\n"; |
|
| 307 | 307 | foreach ($contenu['alternatives'] as $valeur => $label) { |
| 308 | - $fieldset .= "<input type='radio' name='" . $nom . |
|
| 308 | + $fieldset .= "<input type='radio' name='".$nom. |
|
| 309 | 309 | "' id='$nom-$valeur' value='$valeur'" |
| 310 | 310 | . (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '') |
| 311 | 311 | . "/>\n"; |
| 312 | - $fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n"; |
|
| 312 | + $fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n"; |
|
| 313 | 313 | } |
| 314 | 314 | $fieldset .= "<br />\n"; |
| 315 | 315 | } else { |
| 316 | - $fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n"; |
|
| 317 | - $fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'" |
|
| 316 | + $fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n"; |
|
| 317 | + $fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'" |
|
| 318 | 318 | . (preg_match(',^(pass|login),', $nom) ? " autocomplete='off'" : '') |
| 319 | 319 | . ((isset($contenu['required']) and $contenu['required']) ? " required='required'" : '') |
| 320 | 320 | . " />\n"; |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | function install_select_serveur() { |
| 328 | 328 | $options = []; |
| 329 | - $dir = _DIR_RESTREINT . 'req/'; |
|
| 329 | + $dir = _DIR_RESTREINT.'req/'; |
|
| 330 | 330 | $d = opendir($dir); |
| 331 | 331 | if (!$d) { |
| 332 | 332 | return []; |
@@ -334,17 +334,17 @@ discard block |
||
| 334 | 334 | while (($f = readdir($d)) !== false) { |
| 335 | 335 | if ( |
| 336 | 336 | (preg_match('/^(.*)[.]php$/', $f, $s)) |
| 337 | - and is_readable($f = $dir . $f) |
|
| 337 | + and is_readable($f = $dir.$f) |
|
| 338 | 338 | ) { |
| 339 | 339 | require_once($f); |
| 340 | 340 | $s = $s[1]; |
| 341 | - $v = 'spip_versions_' . $s; |
|
| 341 | + $v = 'spip_versions_'.$s; |
|
| 342 | 342 | if (function_exists($v) and $v()) { |
| 343 | 343 | $titre = _T("install_select_type_$s"); |
| 344 | 344 | // proposer mysql par defaut si dispo |
| 345 | 345 | $checked = ($s == 'mysql' ? " checked='checked'" : ''); |
| 346 | 346 | $options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>" |
| 347 | - . "<label for='$s'>" . ($titre ?: $s) . '</label></li>'; |
|
| 347 | + . "<label for='$s'>".($titre ?: $s).'</label></li>'; |
|
| 348 | 348 | } else { |
| 349 | 349 | spip_log("$s: portage indisponible"); |
| 350 | 350 | } |
@@ -362,8 +362,8 @@ discard block |
||
| 362 | 362 | "\n<input type='hidden' name='etape' value='$etape' />" |
| 363 | 363 | . $hidden |
| 364 | 364 | . (_request('echec') ? |
| 365 | - ('<p><b>' . _T('avis_connexion_echec_1') . |
|
| 366 | - '</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>') |
|
| 365 | + ('<p><b>'._T('avis_connexion_echec_1'). |
|
| 366 | + '</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>') |
|
| 367 | 367 | : '') |
| 368 | 368 | |
| 369 | 369 | . ($jquery ? http_script('', 'jquery.js') : '') |
@@ -401,9 +401,9 @@ discard block |
||
| 401 | 401 | });') |
| 402 | 402 | |
| 403 | 403 | . ($server_db |
| 404 | - ? '<input type="hidden" name="server_db" value="' . $server_db . '" />' |
|
| 404 | + ? '<input type="hidden" name="server_db" value="'.$server_db.'" />' |
|
| 405 | 405 | . (($predef[0]) |
| 406 | - ? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>') |
|
| 406 | + ? ('<h3>'._T('install_serveur_hebergeur').'</h3>') |
|
| 407 | 407 | : '') |
| 408 | 408 | : ('<fieldset><legend>' |
| 409 | 409 | . _T('install_select_type_db') |
@@ -418,9 +418,9 @@ discard block |
||
| 418 | 418 | . "\n</ul>\n</div></fieldset>") |
| 419 | 419 | ) |
| 420 | 420 | . '<div id="install_adresse_base_hebergeur">' |
| 421 | - . '<p>' . _T('texte_connexion_mysql') . '</p>' |
|
| 421 | + . '<p>'._T('texte_connexion_mysql').'</p>' |
|
| 422 | 422 | . ($predef[1] |
| 423 | - ? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>' |
|
| 423 | + ? '<h3>'._T('install_adresse_base_hebergeur').'</h3>' |
|
| 424 | 424 | : fieldset( |
| 425 | 425 | _T('entree_base_donnee_1'), |
| 426 | 426 | [ |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | . '<div id="install_login_base_hebergeur">' |
| 437 | 437 | . ($predef[2] |
| 438 | - ? '<h3>' . _T('install_login_base_hebergeur') . '</h3>' |
|
| 438 | + ? '<h3>'._T('install_login_base_hebergeur').'</h3>' |
|
| 439 | 439 | : fieldset( |
| 440 | 440 | _T('entree_login_connexion_1'), |
| 441 | 441 | [ |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | |
| 451 | 451 | . '<div id="install_pass_base_hebergeur">' |
| 452 | 452 | . ($predef[3] |
| 453 | - ? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>' |
|
| 453 | + ? '<h3>'._T('install_pass_base_hebergeur').'</h3>' |
|
| 454 | 454 | : fieldset( |
| 455 | 455 | _T('entree_mot_passe_1'), |
| 456 | 456 | [ |
@@ -472,20 +472,20 @@ discard block |
||
| 472 | 472 | function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) { |
| 473 | 473 | return ((defined('_INSTALL_HOST_DB')) |
| 474 | 474 | ? '' |
| 475 | - : "\n<input type='hidden' name='adresse_db' value=\"" . spip_htmlspecialchars($adresse_db) . '" />' |
|
| 475 | + : "\n<input type='hidden' name='adresse_db' value=\"".spip_htmlspecialchars($adresse_db).'" />' |
|
| 476 | 476 | ) |
| 477 | 477 | . ((defined('_INSTALL_USER_DB')) |
| 478 | 478 | ? '' |
| 479 | - : "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />' |
|
| 479 | + : "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />' |
|
| 480 | 480 | ) |
| 481 | 481 | . ((defined('_INSTALL_PASS_DB')) |
| 482 | 482 | ? '' |
| 483 | - : "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />' |
|
| 483 | + : "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />' |
|
| 484 | 484 | ) |
| 485 | 485 | |
| 486 | 486 | . ((defined('_INSTALL_SERVER_DB')) |
| 487 | 487 | ? '' |
| 488 | - : "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />' |
|
| 488 | + : "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />' |
|
| 489 | 489 | ); |
| 490 | 490 | } |
| 491 | 491 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $_id_table = reset($_id_table); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $requete['SELECT'][] = 't.' . $_id_table; |
|
| 69 | + $requete['SELECT'][] = 't.'.$_id_table; |
|
| 70 | 70 | $a = []; |
| 71 | 71 | // Recherche fulltext |
| 72 | 72 | foreach ($champs as $champ => $poids) { |
@@ -77,13 +77,13 @@ discard block |
||
| 77 | 77 | $champ = "t.$champ"; |
| 78 | 78 | } |
| 79 | 79 | $requete['SELECT'][] = $champ; |
| 80 | - $a[] = $champ . ' ' . $methode . ' ' . $q; |
|
| 80 | + $a[] = $champ.' '.$methode.' '.$q; |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | if ($a) { |
| 84 | 84 | $requete['WHERE'][] = implode(' OR ', $a); |
| 85 | 85 | } |
| 86 | - $requete['FROM'][] = table_objet_sql($table) . ' AS t'; |
|
| 86 | + $requete['FROM'][] = table_objet_sql($table).' AS t'; |
|
| 87 | 87 | |
| 88 | 88 | $results = []; |
| 89 | 89 | |
@@ -244,8 +244,8 @@ discard block |
||
| 244 | 244 | ); |
| 245 | 245 | } // cas table de liaison generique spip_xxx_yyy |
| 246 | 246 | elseif ( |
| 247 | - ($t = $trouver_table($table_arrivee . '_' . $table_depart, $serveur)) |
|
| 248 | - || ($t = $trouver_table($table_depart . '_' . $table_arrivee, $serveur)) |
|
| 247 | + ($t = $trouver_table($table_arrivee.'_'.$table_depart, $serveur)) |
|
| 248 | + || ($t = $trouver_table($table_depart.'_'.$table_arrivee, $serveur)) |
|
| 249 | 249 | ) { |
| 250 | 250 | $s = sql_select( |
| 251 | 251 | "$cle_depart,$cle_arrivee", |
@@ -284,12 +284,12 @@ discard block |
||
| 284 | 284 | } |
| 285 | 285 | if (isset($joint['champs']) && $joint['champs']) { |
| 286 | 286 | foreach ($joint['champs'] as $c => $val) { |
| 287 | - $results[$id]['champs'][$table_liee . '.' . $c] = $val; |
|
| 287 | + $results[$id]['champs'][$table_liee.'.'.$c] = $val; |
|
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | if (isset($joint['matches']) && $joint['matches']) { |
| 291 | 291 | foreach ($joint['matches'] as $c => $val) { |
| 292 | - $results[$id]['matches'][$table_liee . '.' . $c] = $val; |
|
| 292 | + $results[$id]['matches'][$table_liee.'.'.$c] = $val; |
|
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $result = sql_select( |
| 43 | 43 | 'id_rubrique, id_parent, titre, descriptif, lang', |
| 44 | 44 | 'spip_rubriques', |
| 45 | - 'id_parent=' . (int) $collection, |
|
| 45 | + 'id_parent='.(int) $collection, |
|
| 46 | 46 | '', |
| 47 | 47 | '0+titre,titre', |
| 48 | 48 | $debut == -1 ? '' : "$debut,$limite" |
@@ -73,13 +73,13 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $lib_bouton = (acces_restreint_rubrique($id_rubrique) |
| 75 | 75 | ? http_img_pack('auteur-0minirezo-16.png', '', " width='16' height='16'", _T('image_administrer_rubrique')) |
| 76 | - : '') . |
|
| 77 | - " <a class='titremlien' dir='$lang_dir'" . |
|
| 78 | - ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') . |
|
| 79 | - " href='" . |
|
| 80 | - generer_objet_url($id_rubrique, 'rubrique') . |
|
| 81 | - "'><span class='titre'>" . |
|
| 82 | - $rang . $titre |
|
| 76 | + : ''). |
|
| 77 | + " <a class='titremlien' dir='$lang_dir'". |
|
| 78 | + ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : ''). |
|
| 79 | + " href='". |
|
| 80 | + generer_objet_url($id_rubrique, 'rubrique'). |
|
| 81 | + "'><span class='titre'>". |
|
| 82 | + $rang.$titre |
|
| 83 | 83 | . '</span>' |
| 84 | 84 | . (is_string($logo) ? $logo : '') |
| 85 | 85 | . '</a>'; |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | ; |
| 90 | 90 | |
| 91 | 91 | $res[] = |
| 92 | - debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) . |
|
| 93 | - $les_sous_enfants . |
|
| 92 | + debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre). |
|
| 93 | + $les_sous_enfants. |
|
| 94 | 94 | fin_cadre_sous_rub(); |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * Le contenu du bloc dépliable |
| 110 | 110 | */ |
| 111 | 111 | function sous_enfant_rub($collection2) { |
| 112 | - $nb = sql_countsel('spip_rubriques', 'id_parent=' . (int) $collection2); |
|
| 112 | + $nb = sql_countsel('spip_rubriques', 'id_parent='.(int) $collection2); |
|
| 113 | 113 | |
| 114 | 114 | $retour = ''; |
| 115 | 115 | $pagination = ''; |
@@ -121,23 +121,23 @@ discard block |
||
| 121 | 121 | * Si > 500 on affiche une pagination |
| 122 | 122 | */ |
| 123 | 123 | if ($nb > $limite) { |
| 124 | - $debut = _request('debut_rubrique' . $collection2) ?: $debut; |
|
| 124 | + $debut = _request('debut_rubrique'.$collection2) ?: $debut; |
|
| 125 | 125 | $pagination = chercher_filtre('pagination'); |
| 126 | - $pagination = '<nav class="pagination">' . $pagination( |
|
| 126 | + $pagination = '<nav class="pagination">'.$pagination( |
|
| 127 | 127 | $nb, |
| 128 | - '_rubrique' . $collection2, |
|
| 128 | + '_rubrique'.$collection2, |
|
| 129 | 129 | $debut, |
| 130 | 130 | $limite, |
| 131 | 131 | true, |
| 132 | 132 | 'prive' |
| 133 | - ) . '</nav>'; |
|
| 133 | + ).'</nav>'; |
|
| 134 | 134 | $limite = $debut + $limite; |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | $result = sql_select( |
| 138 | 138 | 'id_rubrique, id_parent, titre, lang', |
| 139 | 139 | 'spip_rubriques', |
| 140 | - 'id_parent=' . (int) $collection2, |
|
| 140 | + 'id_parent='.(int) $collection2, |
|
| 141 | 141 | '', |
| 142 | 142 | '0+titre,titre', |
| 143 | 143 | $debut == -1 ? '' : "$debut,$limite" |
@@ -157,14 +157,14 @@ discard block |
||
| 157 | 157 | changer_typo($row['lang']); |
| 158 | 158 | $lang_dir = lang_dir($row['lang']); |
| 159 | 159 | if (autoriser('voir', 'rubrique', $id_rubrique2)) { |
| 160 | - $retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_objet_url( |
|
| 160 | + $retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_objet_url( |
|
| 161 | 161 | $id_rubrique2, |
| 162 | 162 | 'rubrique' |
| 163 | - ) . "'>" . $rang2 . $titre2 . "</a></li>\n"; |
|
| 163 | + )."'>".$rang2.$titre2."</a></li>\n"; |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - $retour = $pagination . $retour . $pagination; |
|
| 167 | + $retour = $pagination.$retour.$pagination; |
|
| 168 | 168 | |
| 169 | 169 | if (!$retour) { |
| 170 | 170 | return ''; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | return debut_block_depliable($debut > 0, "enfants$collection2") |
| 174 | 174 | . "\n<ul class='liste-items sous-sous-rub'>\n" |
| 175 | 175 | . $retour |
| 176 | - . "</ul>\n" . fin_block() . "\n\n"; |
|
| 176 | + . "</ul>\n".fin_block()."\n\n"; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -192,13 +192,13 @@ discard block |
||
| 192 | 192 | $debut = 0; |
| 193 | 193 | $limite = 500; |
| 194 | 194 | |
| 195 | - $nb = sql_countsel('spip_rubriques', 'id_parent=' . (int) $id_rubrique); |
|
| 195 | + $nb = sql_countsel('spip_rubriques', 'id_parent='.(int) $id_rubrique); |
|
| 196 | 196 | |
| 197 | 197 | if ($nb > $limite) { |
| 198 | - $debut = _request('debut_rubrique' . $id_rubrique) ?: $debut; |
|
| 198 | + $debut = _request('debut_rubrique'.$id_rubrique) ?: $debut; |
|
| 199 | 199 | $pagination = chercher_filtre('pagination'); |
| 200 | - $pagination = '<br class="nettoyeur"><nav class="pagination">' . |
|
| 201 | - $pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') . |
|
| 200 | + $pagination = '<br class="nettoyeur"><nav class="pagination">'. |
|
| 201 | + $pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive'). |
|
| 202 | 202 | '</nav>'; |
| 203 | 203 | } |
| 204 | 204 | |