@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | include_fichiers_fonctions(); |
| 99 | - foreach (['filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc] as $f) { |
|
| 99 | + foreach (['filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc] as $f) { |
|
| 100 | 100 | trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels |
| 101 | 101 | if (is_callable($f)) { |
| 102 | 102 | return $f; |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | // affichage "GIT [master: abcdef]" |
| 235 | 235 | $commit = $desc['commit_short'] ?? $desc['commit']; |
| 236 | 236 | if ($desc['branch']) { |
| 237 | - $commit = $desc['branch'] . ': ' . $commit; |
|
| 237 | + $commit = $desc['branch'].': '.$commit; |
|
| 238 | 238 | } |
| 239 | 239 | return "{$desc['vcs']} [$commit]"; |
| 240 | 240 | } |
@@ -253,9 +253,9 @@ discard block |
||
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | // version installee par GIT |
| 256 | - if (lire_fichier($dir . '/.git/HEAD', $c)) { |
|
| 256 | + if (lire_fichier($dir.'/.git/HEAD', $c)) { |
|
| 257 | 257 | $currentHead = trim(substr($c, 4)); |
| 258 | - if (lire_fichier($dir . '/.git/' . $currentHead, $hash)) { |
|
| 258 | + if (lire_fichier($dir.'/.git/'.$currentHead, $hash)) { |
|
| 259 | 259 | return [ |
| 260 | 260 | 'vcs' => 'GIT', |
| 261 | 261 | 'branch' => basename($currentHead), |
@@ -282,8 +282,8 @@ discard block |
||
| 282 | 282 | $dir = '.'; |
| 283 | 283 | } |
| 284 | 284 | // version installee par SVN |
| 285 | - if (file_exists($dir . '/.svn/wc.db') && class_exists(\SQLite3::class)) { |
|
| 286 | - $db = new SQLite3($dir . '/.svn/wc.db'); |
|
| 285 | + if (file_exists($dir.'/.svn/wc.db') && class_exists(\SQLite3::class)) { |
|
| 286 | + $db = new SQLite3($dir.'/.svn/wc.db'); |
|
| 287 | 287 | $result = $db->query('SELECT changed_revision FROM nodes WHERE local_relpath = "" LIMIT 1'); |
| 288 | 288 | if ($result) { |
| 289 | 289 | $row = $result->fetchArray(); |
@@ -301,12 +301,12 @@ discard block |
||
| 301 | 301 | |
| 302 | 302 | // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images |
| 303 | 303 | // et laisser passer les fonctions personnelles baptisees image_... |
| 304 | -$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php'; |
|
| 305 | -$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php'; |
|
| 306 | -$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php'; |
|
| 307 | -$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php'; |
|
| 308 | -$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php'; |
|
| 309 | -$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true;//'inc/filtres_images_mini.php'; |
|
| 304 | +$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php'; |
|
| 305 | +$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php'; |
|
| 306 | +$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php'; |
|
| 307 | +$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php'; |
|
| 308 | +$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php'; |
|
| 309 | +$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true; //'inc/filtres_images_mini.php'; |
|
| 310 | 310 | |
| 311 | 311 | $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php'; |
| 312 | 312 | $GLOBALS['spip_matrice']['couleur_hex_to_hsl'] = 'inc/filtres_images_mini.php'; |
@@ -465,8 +465,8 @@ discard block |
||
| 465 | 465 | */ |
| 466 | 466 | function filtre_debug($val, $key = null) { |
| 467 | 467 | $debug = ( |
| 468 | - is_null($key) ? '' : (var_export($key, true) . ' = ') |
|
| 469 | - ) . var_export($val, true); |
|
| 468 | + is_null($key) ? '' : (var_export($key, true).' = ') |
|
| 469 | + ).var_export($val, true); |
|
| 470 | 470 | |
| 471 | 471 | include_spip('inc/autoriser'); |
| 472 | 472 | if (autoriser('webmestre')) { |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | $is_file = false; |
| 523 | 523 | } |
| 524 | 524 | if ($is_file) { |
| 525 | - $is_local_file = function ($path) { |
|
| 525 | + $is_local_file = function($path) { |
|
| 526 | 526 | if (strpos($path, '?') !== false) { |
| 527 | 527 | $path = supprimer_timestamp($path); |
| 528 | 528 | // remove ?24px added by find_in_theme on .svg files |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | if ($mouseover = extraire_attribut($reduit, 'onmouseover')) { |
| 572 | 572 | if (preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match)) { |
| 573 | 573 | $srcover = $match[1]; |
| 574 | - $srcover_filter = $filtre("<img src='" . $match[1] . "' />", ...$args); |
|
| 574 | + $srcover_filter = $filtre("<img src='".$match[1]."' />", ...$args); |
|
| 575 | 575 | $srcover_filter = extraire_attribut($srcover_filter, 'src'); |
| 576 | 576 | $reduit = str_replace($srcover, $srcover_filter, $reduit); |
| 577 | 577 | } |
@@ -973,7 +973,7 @@ discard block |
||
| 973 | 973 | // " -> " et tout ce genre de choses |
| 974 | 974 | $u = $GLOBALS['meta']['pcre_u']; |
| 975 | 975 | $texte = str_replace(' ', ' ', $texte); |
| 976 | - $texte = preg_replace('/\s{2,}/S' . $u, ' ', $texte); |
|
| 976 | + $texte = preg_replace('/\s{2,}/S'.$u, ' ', $texte); |
|
| 977 | 977 | // ne pas echapper les sinqle quotes car certains outils de syndication gerent mal |
| 978 | 978 | $texte = entites_html($texte, false, false); |
| 979 | 979 | // mais bien echapper les double quotes ! |
@@ -1033,7 +1033,7 @@ discard block |
||
| 1033 | 1033 | **/ |
| 1034 | 1034 | function supprimer_numero($texte) { |
| 1035 | 1035 | return preg_replace( |
| 1036 | - ',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S', |
|
| 1036 | + ',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S', |
|
| 1037 | 1037 | '', |
| 1038 | 1038 | $texte |
| 1039 | 1039 | ); |
@@ -1062,7 +1062,7 @@ discard block |
||
| 1062 | 1062 | if ( |
| 1063 | 1063 | $texte and |
| 1064 | 1064 | preg_match( |
| 1065 | - ',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S', |
|
| 1065 | + ',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S', |
|
| 1066 | 1066 | $texte, |
| 1067 | 1067 | $regs |
| 1068 | 1068 | ) |
@@ -1153,8 +1153,8 @@ discard block |
||
| 1153 | 1153 | **/ |
| 1154 | 1154 | function textebrut($texte) { |
| 1155 | 1155 | $u = $GLOBALS['meta']['pcre_u']; |
| 1156 | - $texte = preg_replace('/\s+/S' . $u, ' ', $texte); |
|
| 1157 | - $texte = preg_replace('/<(p|br)( [^>]*)?' . '>/iS', "\n\n", $texte); |
|
| 1156 | + $texte = preg_replace('/\s+/S'.$u, ' ', $texte); |
|
| 1157 | + $texte = preg_replace('/<(p|br)( [^>]*)?'.'>/iS', "\n\n", $texte); |
|
| 1158 | 1158 | $texte = preg_replace("/^\n+/", '', $texte); |
| 1159 | 1159 | $texte = preg_replace("/\n+$/", '', $texte); |
| 1160 | 1160 | $texte = preg_replace("/\n +/", "\n", $texte); |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | ) |
| 1189 | 1189 | ) { |
| 1190 | 1190 | foreach ($liens[0] as $a) { |
| 1191 | - $rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel'); |
|
| 1191 | + $rel = 'noopener noreferrer '.extraire_attribut($a, 'rel'); |
|
| 1192 | 1192 | $ablank = inserer_attribut($a, 'rel', $rel); |
| 1193 | 1193 | $ablank = inserer_attribut($ablank, 'target', '_blank'); |
| 1194 | 1194 | $texte = str_replace($a, $ablank, $texte); |
@@ -1213,7 +1213,7 @@ discard block |
||
| 1213 | 1213 | foreach ($regs[0] as $a) { |
| 1214 | 1214 | $rel = extraire_attribut($a, 'rel') ?? ''; |
| 1215 | 1215 | if (strpos($rel, 'nofollow') === false) { |
| 1216 | - $rel = 'nofollow' . ($rel ? " $rel" : ''); |
|
| 1216 | + $rel = 'nofollow'.($rel ? " $rel" : ''); |
|
| 1217 | 1217 | $anofollow = inserer_attribut($a, 'rel', $rel); |
| 1218 | 1218 | $texte = str_replace($a, $anofollow, $texte); |
| 1219 | 1219 | } |
@@ -1242,7 +1242,7 @@ discard block |
||
| 1242 | 1242 | $u = $GLOBALS['meta']['pcre_u']; |
| 1243 | 1243 | $texte = preg_replace('@</p>@iS', "\n", $texte); |
| 1244 | 1244 | $texte = preg_replace("@<p\b.*>@UiS", '<br />', $texte); |
| 1245 | - $texte = preg_replace('@^\s*<br />@S' . $u, '', $texte); |
|
| 1245 | + $texte = preg_replace('@^\s*<br />@S'.$u, '', $texte); |
|
| 1246 | 1246 | |
| 1247 | 1247 | return $texte; |
| 1248 | 1248 | } |
@@ -1273,7 +1273,7 @@ discard block |
||
| 1273 | 1273 | return $texte; |
| 1274 | 1274 | } |
| 1275 | 1275 | include_spip('inc/texte'); |
| 1276 | - $tag = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $texte) ? |
|
| 1276 | + $tag = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $texte) ? |
|
| 1277 | 1277 | 'div' : 'span'; |
| 1278 | 1278 | |
| 1279 | 1279 | return "<$tag style='word-wrap:break-word;'>$texte</$tag>"; |
@@ -1385,7 +1385,7 @@ discard block |
||
| 1385 | 1385 | } |
| 1386 | 1386 | $u = $GLOBALS['meta']['pcre_u']; |
| 1387 | 1387 | if ($textebrut) { |
| 1388 | - $texte = preg_replace([",\n,", ',\s(?=\s),msS' . $u], [' ', ''], textebrut($texte)); |
|
| 1388 | + $texte = preg_replace([",\n,", ',\s(?=\s),msS'.$u], [' ', ''], textebrut($texte)); |
|
| 1389 | 1389 | } |
| 1390 | 1390 | $texte = texte_backend($texte); |
| 1391 | 1391 | $texte = str_replace(["'", '"'], [''', '"'], $texte); |
@@ -1420,7 +1420,7 @@ discard block |
||
| 1420 | 1420 | # un message pour abs_url |
| 1421 | 1421 | $GLOBALS['mode_abs_url'] = 'url'; |
| 1422 | 1422 | $url = trim($url); |
| 1423 | - $r = ',^(?:' . _PROTOCOLES_STD . '):?/?/?$,iS'; |
|
| 1423 | + $r = ',^(?:'._PROTOCOLES_STD.'):?/?/?$,iS'; |
|
| 1424 | 1424 | |
| 1425 | 1425 | return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url); |
| 1426 | 1426 | } |
@@ -1620,14 +1620,14 @@ discard block |
||
| 1620 | 1620 | if (strpos($texte, '<') !== false) { |
| 1621 | 1621 | include_spip('inc/lien'); |
| 1622 | 1622 | if (defined('_PREG_MODELE')) { |
| 1623 | - $preg_modeles = '@' . _PREG_MODELE . '@imsS'; |
|
| 1623 | + $preg_modeles = '@'._PREG_MODELE.'@imsS'; |
|
| 1624 | 1624 | $texte = echappe_html($texte, '', true, $preg_modeles); |
| 1625 | 1625 | } |
| 1626 | 1626 | } |
| 1627 | 1627 | |
| 1628 | 1628 | $debut = ''; |
| 1629 | 1629 | $suite = $texte; |
| 1630 | - while ($t = strpos('-' . $suite, "\n", 1)) { |
|
| 1630 | + while ($t = strpos('-'.$suite, "\n", 1)) { |
|
| 1631 | 1631 | $debut .= substr($suite, 0, $t - 1); |
| 1632 | 1632 | $suite = substr($suite, $t); |
| 1633 | 1633 | $car = substr($suite, 0, 1); |
@@ -1645,11 +1645,11 @@ discard block |
||
| 1645 | 1645 | $suite = substr($suite, strlen($regs[0])); |
| 1646 | 1646 | } |
| 1647 | 1647 | } |
| 1648 | - $texte = $debut . $suite; |
|
| 1648 | + $texte = $debut.$suite; |
|
| 1649 | 1649 | |
| 1650 | 1650 | $texte = echappe_retour($texte); |
| 1651 | 1651 | |
| 1652 | - return $texte . $fin; |
|
| 1652 | + return $texte.$fin; |
|
| 1653 | 1653 | } |
| 1654 | 1654 | |
| 1655 | 1655 | |
@@ -1711,7 +1711,7 @@ discard block |
||
| 1711 | 1711 | } |
| 1712 | 1712 | |
| 1713 | 1713 | foreach ($regs as $reg) { |
| 1714 | - $cle = ($reg[1] ? $reg[1] . ':' : '') . $reg[2]; |
|
| 1714 | + $cle = ($reg[1] ? $reg[1].':' : '').$reg[2]; |
|
| 1715 | 1715 | $desc = $traduire($cle, $lang, true); |
| 1716 | 1716 | $l = $desc->langue; |
| 1717 | 1717 | // si pas de traduction, on laissera l'écriture de l'idiome entier dans le texte. |
@@ -1825,9 +1825,9 @@ discard block |
||
| 1825 | 1825 | // il ne faut pas echapper en div si propre produit un seul paragraphe |
| 1826 | 1826 | include_spip('inc/texte'); |
| 1827 | 1827 | $trad_propre = preg_replace(',(^<p[^>]*>|</p>$),Uims', '', propre($trad)); |
| 1828 | - $mode = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $trad_propre) ? 'div' : 'span'; |
|
| 1828 | + $mode = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $trad_propre) ? 'div' : 'span'; |
|
| 1829 | 1829 | if ($mode === 'div') { |
| 1830 | - $trad = rtrim($trad) . "\n\n"; |
|
| 1830 | + $trad = rtrim($trad)."\n\n"; |
|
| 1831 | 1831 | } |
| 1832 | 1832 | $trad = code_echappement($trad, 'multi', false, $mode); |
| 1833 | 1833 | $trad = str_replace("'", '"', inserer_attribut($trad, 'lang', $l)); |
@@ -2027,7 +2027,7 @@ discard block |
||
| 2027 | 2027 | if (is_array($balise)) { |
| 2028 | 2028 | array_walk( |
| 2029 | 2029 | $balise, |
| 2030 | - function (&$a, $key, $t) { |
|
| 2030 | + function(&$a, $key, $t) { |
|
| 2031 | 2031 | $a = extraire_attribut($a, $t); |
| 2032 | 2032 | }, |
| 2033 | 2033 | $attribut |
@@ -2124,14 +2124,14 @@ discard block |
||
| 2124 | 2124 | |
| 2125 | 2125 | if ($old !== null) { |
| 2126 | 2126 | // Remplacer l'ancien attribut du meme nom |
| 2127 | - $balise = $r[1] . $insert . $r[5]; |
|
| 2127 | + $balise = $r[1].$insert.$r[5]; |
|
| 2128 | 2128 | } else { |
| 2129 | 2129 | // preferer une balise " />" (comme <img />) |
| 2130 | 2130 | if (preg_match(',/>,', $balise)) { |
| 2131 | - $balise = preg_replace(',\s?/>,S', $insert . ' />', $balise, 1); |
|
| 2131 | + $balise = preg_replace(',\s?/>,S', $insert.' />', $balise, 1); |
|
| 2132 | 2132 | } // sinon une balise <a ...> ... </a> |
| 2133 | 2133 | else { |
| 2134 | - $balise = preg_replace(',\s?>,S', $insert . '>', $balise, 1); |
|
| 2134 | + $balise = preg_replace(',\s?>,S', $insert.'>', $balise, 1); |
|
| 2135 | 2135 | } |
| 2136 | 2136 | } |
| 2137 | 2137 | |
@@ -2186,7 +2186,7 @@ discard block |
||
| 2186 | 2186 | if ( |
| 2187 | 2187 | $class_courante |
| 2188 | 2188 | and strpos($class_courante, (string) $c) !== false |
| 2189 | - and preg_match('/(^|\s)' . preg_quote($c) . '($|\s)/', $class_courante) |
|
| 2189 | + and preg_match('/(^|\s)'.preg_quote($c).'($|\s)/', $class_courante) |
|
| 2190 | 2190 | ) { |
| 2191 | 2191 | $is_class_presente = true; |
| 2192 | 2192 | } |
@@ -2194,12 +2194,12 @@ discard block |
||
| 2194 | 2194 | in_array($operation, ['ajouter', 'commuter']) |
| 2195 | 2195 | and !$is_class_presente |
| 2196 | 2196 | ) { |
| 2197 | - $class_new = ltrim(rtrim($class_new ?? '') . ' ' . $c); |
|
| 2197 | + $class_new = ltrim(rtrim($class_new ?? '').' '.$c); |
|
| 2198 | 2198 | } elseif ( |
| 2199 | 2199 | in_array($operation, ['supprimer', 'commuter']) |
| 2200 | 2200 | and $is_class_presente |
| 2201 | 2201 | ) { |
| 2202 | - $class_new = trim(preg_replace('/(^|\s)' . preg_quote($c) . '($|\s)/', "\\1", $class_new)); |
|
| 2202 | + $class_new = trim(preg_replace('/(^|\s)'.preg_quote($c).'($|\s)/', "\\1", $class_new)); |
|
| 2203 | 2203 | } |
| 2204 | 2204 | } |
| 2205 | 2205 | |
@@ -2262,7 +2262,7 @@ discard block |
||
| 2262 | 2262 | // Quelques fonctions de calcul arithmetique |
| 2263 | 2263 | // |
| 2264 | 2264 | function floatstr($a) { |
| 2265 | - return str_replace(',', '.', (string)floatval($a)); |
|
| 2265 | + return str_replace(',', '.', (string) floatval($a)); |
|
| 2266 | 2266 | } |
| 2267 | 2267 | function strize($f, $a, $b) { |
| 2268 | 2268 | return floatstr($f(floatstr($a), floatstr($b))); |
@@ -2398,13 +2398,13 @@ discard block |
||
| 2398 | 2398 | if (!defined('_TAGS_NOM_AUTEUR')) { |
| 2399 | 2399 | define('_TAGS_NOM_AUTEUR', ''); |
| 2400 | 2400 | } |
| 2401 | - $tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR)); |
|
| 2401 | + $tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR)); |
|
| 2402 | 2402 | foreach ($tags_acceptes as $tag) { |
| 2403 | 2403 | if (strlen($tag)) { |
| 2404 | - $remp1[] = '<' . trim($tag) . '>'; |
|
| 2405 | - $remp1[] = '</' . trim($tag) . '>'; |
|
| 2406 | - $remp2[] = '\x60' . trim($tag) . '\x61'; |
|
| 2407 | - $remp2[] = '\x60/' . trim($tag) . '\x61'; |
|
| 2404 | + $remp1[] = '<'.trim($tag).'>'; |
|
| 2405 | + $remp1[] = '</'.trim($tag).'>'; |
|
| 2406 | + $remp2[] = '\x60'.trim($tag).'\x61'; |
|
| 2407 | + $remp2[] = '\x60/'.trim($tag).'\x61'; |
|
| 2408 | 2408 | } |
| 2409 | 2409 | } |
| 2410 | 2410 | $v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom))); |
@@ -2524,10 +2524,10 @@ discard block |
||
| 2524 | 2524 | $fichier = basename($url); |
| 2525 | 2525 | |
| 2526 | 2526 | return '<a rel="enclosure"' |
| 2527 | - . ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2528 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2529 | - . ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '') |
|
| 2530 | - . '>' . $fichier . '</a>'; |
|
| 2527 | + . ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2528 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2529 | + . ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '') |
|
| 2530 | + . '>'.$fichier.'</a>'; |
|
| 2531 | 2531 | } |
| 2532 | 2532 | |
| 2533 | 2533 | /** |
@@ -2555,9 +2555,9 @@ discard block |
||
| 2555 | 2555 | } # vieux data |
| 2556 | 2556 | $fichier = basename($url); |
| 2557 | 2557 | $enclosures[] = '<enclosure' |
| 2558 | - . ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '') |
|
| 2559 | - . ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '') |
|
| 2560 | - . ($length ? ' length="' . $length . '"' : '') |
|
| 2558 | + . ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '') |
|
| 2559 | + . ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '') |
|
| 2560 | + . ($length ? ' length="'.$length.'"' : '') |
|
| 2561 | 2561 | . ' />'; |
| 2562 | 2562 | } |
| 2563 | 2563 | } |
@@ -2583,7 +2583,7 @@ discard block |
||
| 2583 | 2583 | if (extraire_attribut($e, 'rel') == 'tag') { |
| 2584 | 2584 | $subjects .= '<dc:subject>' |
| 2585 | 2585 | . texte_backend(textebrut($e)) |
| 2586 | - . '</dc:subject>' . "\n"; |
|
| 2586 | + . '</dc:subject>'."\n"; |
|
| 2587 | 2587 | } |
| 2588 | 2588 | } |
| 2589 | 2589 | |
@@ -2619,7 +2619,7 @@ discard block |
||
| 2619 | 2619 | if (is_array($texte)) { |
| 2620 | 2620 | array_walk( |
| 2621 | 2621 | $texte, |
| 2622 | - function (&$a, $key, $t) { |
|
| 2622 | + function(&$a, $key, $t) { |
|
| 2623 | 2623 | $a = extraire_balise($a, $t); |
| 2624 | 2624 | }, |
| 2625 | 2625 | $tag |
@@ -2667,7 +2667,7 @@ discard block |
||
| 2667 | 2667 | if (is_array($texte)) { |
| 2668 | 2668 | array_walk( |
| 2669 | 2669 | $texte, |
| 2670 | - function (&$a, $key, $t) { |
|
| 2670 | + function(&$a, $key, $t) { |
|
| 2671 | 2671 | $a = extraire_balises($a, $t); |
| 2672 | 2672 | }, |
| 2673 | 2673 | $tag |
@@ -2800,7 +2800,7 @@ discard block |
||
| 2800 | 2800 | if ($fond != '404') { |
| 2801 | 2801 | $contexte = array_shift($p); |
| 2802 | 2802 | $contexte['page'] = $fond; |
| 2803 | - $action = preg_replace('/([?]' . preg_quote($fond) . '[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2803 | + $action = preg_replace('/([?]'.preg_quote($fond).'[^&=]*[0-9]+)(&|$)/', '?&', $action); |
|
| 2804 | 2804 | } |
| 2805 | 2805 | } |
| 2806 | 2806 | // defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url |
@@ -2855,9 +2855,9 @@ discard block |
||
| 2855 | 2855 | . '"' |
| 2856 | 2856 | . (is_null($val) |
| 2857 | 2857 | ? '' |
| 2858 | - : ' value="' . entites_html($val) . '"' |
|
| 2858 | + : ' value="'.entites_html($val).'"' |
|
| 2859 | 2859 | ) |
| 2860 | - . ' type="hidden"' . "\n/>"; |
|
| 2860 | + . ' type="hidden"'."\n/>"; |
|
| 2861 | 2861 | } |
| 2862 | 2862 | |
| 2863 | 2863 | return join('', $hidden); |
@@ -2967,7 +2967,7 @@ discard block |
||
| 2967 | 2967 | |
| 2968 | 2968 | return preg_replace_callback( |
| 2969 | 2969 | ",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims", |
| 2970 | - fn($x) => "url('" . suivre_lien($path, $x[1]) . "')", |
|
| 2970 | + fn($x) => "url('".suivre_lien($path, $x[1])."')", |
|
| 2971 | 2971 | $contenu |
| 2972 | 2972 | ); |
| 2973 | 2973 | } |
@@ -3028,14 +3028,14 @@ discard block |
||
| 3028 | 3028 | ) { |
| 3029 | 3029 | $distant = true; |
| 3030 | 3030 | $cssf = parse_url($css); |
| 3031 | - $cssf = $cssf['path'] . ($cssf['query'] ? '?' . $cssf['query'] : ''); |
|
| 3031 | + $cssf = $cssf['path'].($cssf['query'] ? '?'.$cssf['query'] : ''); |
|
| 3032 | 3032 | $cssf = preg_replace(',[?:&=],', '_', $cssf); |
| 3033 | 3033 | } else { |
| 3034 | 3034 | $distant = false; |
| 3035 | 3035 | $cssf = $css; |
| 3036 | 3036 | // 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi |
| 3037 | 3037 | //propose (rien a faire dans ce cas) |
| 3038 | - $f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css); |
|
| 3038 | + $f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css); |
|
| 3039 | 3039 | if (@file_exists($f)) { |
| 3040 | 3040 | return $f; |
| 3041 | 3041 | } |
@@ -3045,7 +3045,7 @@ discard block |
||
| 3045 | 3045 | $dir_var = sous_repertoire(_DIR_VAR, 'cache-css'); |
| 3046 | 3046 | $f = $dir_var |
| 3047 | 3047 | . preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf) |
| 3048 | - . '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css'; |
|
| 3048 | + . '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css'; |
|
| 3049 | 3049 | |
| 3050 | 3050 | // la css peut etre distante (url absolue !) |
| 3051 | 3051 | if ($distant) { |
@@ -3091,8 +3091,8 @@ discard block |
||
| 3091 | 3091 | } // si la css_direction commence par $dir_var on la fait passer pour une absolue |
| 3092 | 3092 | elseif (substr($css_direction, 0, strlen($dir_var)) == $dir_var) { |
| 3093 | 3093 | $css_direction = substr($css_direction, strlen($dir_var)); |
| 3094 | - $src_faux_abs['/@@@@@@/' . $css_direction] = $css_direction; |
|
| 3095 | - $css_direction = '/@@@@@@/' . $css_direction; |
|
| 3094 | + $src_faux_abs['/@@@@@@/'.$css_direction] = $css_direction; |
|
| 3095 | + $css_direction = '/@@@@@@/'.$css_direction; |
|
| 3096 | 3096 | } |
| 3097 | 3097 | $src[] = $regs[0][$k]; |
| 3098 | 3098 | $src_direction_css[] = str_replace($import_css, $css_direction, $regs[0][$k]); |
@@ -3141,7 +3141,7 @@ discard block |
||
| 3141 | 3141 | |
| 3142 | 3142 | $f = basename($css, '.css'); |
| 3143 | 3143 | $f = sous_repertoire(_DIR_VAR, 'cache-css') |
| 3144 | - . preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f) |
|
| 3144 | + . preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f) |
|
| 3145 | 3145 | . '.css'; |
| 3146 | 3146 | |
| 3147 | 3147 | if ((@filemtime($f) > @filemtime($css)) and (_VAR_MODE != 'recalcul')) { |
@@ -3151,7 +3151,7 @@ discard block |
||
| 3151 | 3151 | if ($url_absolue_css == $css) { |
| 3152 | 3152 | if ( |
| 3153 | 3153 | strncmp($GLOBALS['meta']['adresse_site'], $css, $l = strlen($GLOBALS['meta']['adresse_site'])) != 0 |
| 3154 | - or !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu) |
|
| 3154 | + or !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu) |
|
| 3155 | 3155 | ) { |
| 3156 | 3156 | include_spip('inc/distant'); |
| 3157 | 3157 | $contenu = recuperer_url($css); |
@@ -3263,7 +3263,7 @@ discard block |
||
| 3263 | 3263 | $expression = str_replace('\/', '/', $expression); |
| 3264 | 3264 | $expression = str_replace('/', '\/', $expression); |
| 3265 | 3265 | |
| 3266 | - if (preg_match('/' . $expression . '/' . $modif, $texte ?? '', $r)) { |
|
| 3266 | + if (preg_match('/'.$expression.'/'.$modif, $texte ?? '', $r)) { |
|
| 3267 | 3267 | if (isset($r[$capte])) { |
| 3268 | 3268 | return $r[$capte]; |
| 3269 | 3269 | } else { |
@@ -3301,7 +3301,7 @@ discard block |
||
| 3301 | 3301 | $expression = str_replace('\/', '/', $expression); |
| 3302 | 3302 | $expression = str_replace('/', '\/', $expression); |
| 3303 | 3303 | |
| 3304 | - return preg_replace('/' . $expression . '/' . $modif, $replace, $texte); |
|
| 3304 | + return preg_replace('/'.$expression.'/'.$modif, $replace, $texte); |
|
| 3305 | 3305 | } |
| 3306 | 3306 | |
| 3307 | 3307 | |
@@ -3320,7 +3320,7 @@ discard block |
||
| 3320 | 3320 | function traiter_doublons_documents(&$doublons, $letexte) { |
| 3321 | 3321 | |
| 3322 | 3322 | // Verifier dans le texte & les notes (pas beau, helas) |
| 3323 | - $t = $letexte . $GLOBALS['les_notes']; |
|
| 3323 | + $t = $letexte.$GLOBALS['les_notes']; |
|
| 3324 | 3324 | |
| 3325 | 3325 | if ( |
| 3326 | 3326 | strstr($t, 'spip_document_') // evite le preg_match_all si inutile |
@@ -3334,7 +3334,7 @@ discard block |
||
| 3334 | 3334 | if (!isset($doublons['documents'])) { |
| 3335 | 3335 | $doublons['documents'] = ''; |
| 3336 | 3336 | } |
| 3337 | - $doublons['documents'] .= ',' . join(',', $matches[1]); |
|
| 3337 | + $doublons['documents'] .= ','.join(',', $matches[1]); |
|
| 3338 | 3338 | } |
| 3339 | 3339 | |
| 3340 | 3340 | return $letexte; |
@@ -3391,7 +3391,7 @@ discard block |
||
| 3391 | 3391 | if ($env) { |
| 3392 | 3392 | foreach ($env as $i => $j) { |
| 3393 | 3393 | if (is_string($j) and !in_array($i, $ignore_params)) { |
| 3394 | - $texte .= "<param name='" . attribut_html($i) . "'\n\tvalue='" . attribut_html($j) . "' />"; |
|
| 3394 | + $texte .= "<param name='".attribut_html($i)."'\n\tvalue='".attribut_html($j)."' />"; |
|
| 3395 | 3395 | } |
| 3396 | 3396 | } |
| 3397 | 3397 | } |
@@ -3430,7 +3430,7 @@ discard block |
||
| 3430 | 3430 | if ($env) { |
| 3431 | 3431 | foreach ($env as $i => $j) { |
| 3432 | 3432 | if (is_string($j) and !in_array($i, $ignore_params)) { |
| 3433 | - $texte .= attribut_html($i) . "='" . attribut_html($j) . "' "; |
|
| 3433 | + $texte .= attribut_html($i)."='".attribut_html($j)."' "; |
|
| 3434 | 3434 | } |
| 3435 | 3435 | } |
| 3436 | 3436 | } |
@@ -3504,10 +3504,10 @@ discard block |
||
| 3504 | 3504 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 3505 | 3505 | if ( |
| 3506 | 3506 | preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m) |
| 3507 | - and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . '-xx.svg' |
|
| 3507 | + and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])).'-xx.svg' |
|
| 3508 | 3508 | and file_exists($variante_svg_generique) |
| 3509 | 3509 | ) { |
| 3510 | - if ($variante_svg_size = substr($variante_svg_generique, 0, -6) . $m[1] . '.svg' and file_exists($variante_svg_size)) { |
|
| 3510 | + if ($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].'.svg' and file_exists($variante_svg_size)) { |
|
| 3511 | 3511 | $img_file = $variante_svg_size; |
| 3512 | 3512 | } |
| 3513 | 3513 | else { |
@@ -3565,7 +3565,7 @@ discard block |
||
| 3565 | 3565 | return ''; |
| 3566 | 3566 | } |
| 3567 | 3567 | } |
| 3568 | - $atts .= " width='" . $largeur . "' height='" . $hauteur . "'"; |
|
| 3568 | + $atts .= " width='".$largeur."' height='".$hauteur."'"; |
|
| 3569 | 3569 | } |
| 3570 | 3570 | |
| 3571 | 3571 | if (file_exists($img_file)) { |
@@ -3575,14 +3575,14 @@ discard block |
||
| 3575 | 3575 | $alt = ''; |
| 3576 | 3576 | } |
| 3577 | 3577 | elseif ($alt or $alt === '') { |
| 3578 | - $alt = " alt='" . attribut_html($alt) . "'"; |
|
| 3578 | + $alt = " alt='".attribut_html($alt)."'"; |
|
| 3579 | 3579 | } |
| 3580 | 3580 | else { |
| 3581 | - $alt = " alt='" . attribut_html($title) . "'"; |
|
| 3581 | + $alt = " alt='".attribut_html($title)."'"; |
|
| 3582 | 3582 | } |
| 3583 | - return "<img src='" . attribut_html($img_file) . "'$alt" |
|
| 3584 | - . ($title ? ' title="' . attribut_html($title) . '"' : '') |
|
| 3585 | - . ' ' . ltrim($atts) |
|
| 3583 | + return "<img src='".attribut_html($img_file)."'$alt" |
|
| 3584 | + . ($title ? ' title="'.attribut_html($title).'"' : '') |
|
| 3585 | + . ' '.ltrim($atts) |
|
| 3586 | 3586 | . ' />'; |
| 3587 | 3587 | } |
| 3588 | 3588 | |
@@ -3596,10 +3596,10 @@ discard block |
||
| 3596 | 3596 | */ |
| 3597 | 3597 | function http_style_background($img, $att = '', $size = null) { |
| 3598 | 3598 | if ($size and is_numeric($size)) { |
| 3599 | - $size = trim($size) . 'px'; |
|
| 3599 | + $size = trim($size).'px'; |
|
| 3600 | 3600 | } |
| 3601 | - return " style='background" . |
|
| 3602 | - ($att ? '' : '-image') . ': url("' . chemin_image($img) . '")' . ($att ? (' ' . $att) : '') . ';' |
|
| 3601 | + return " style='background". |
|
| 3602 | + ($att ? '' : '-image').': url("'.chemin_image($img).'")'.($att ? (' '.$att) : '').';' |
|
| 3603 | 3603 | . ($size ? "background-size:{$size};" : '') |
| 3604 | 3604 | . "'"; |
| 3605 | 3605 | } |
@@ -3714,7 +3714,7 @@ discard block |
||
| 3714 | 3714 | $img = http_img_pack( |
| 3715 | 3715 | $img, |
| 3716 | 3716 | $alt, |
| 3717 | - $class ? " class='" . attribut_html($class) . "'" : '', |
|
| 3717 | + $class ? " class='".attribut_html($class)."'" : '', |
|
| 3718 | 3718 | '', |
| 3719 | 3719 | ['chemin_image' => false, 'utiliser_suffixe_size' => false] |
| 3720 | 3720 | ); |
@@ -3799,7 +3799,7 @@ discard block |
||
| 3799 | 3799 | $balise_svg_source = $balise_svg; |
| 3800 | 3800 | |
| 3801 | 3801 | // entete XML à supprimer |
| 3802 | - $svg = preg_replace(',^\s*<\?xml[^>]*\?' . '>,', '', $svg); |
|
| 3802 | + $svg = preg_replace(',^\s*<\?xml[^>]*\?'.'>,', '', $svg); |
|
| 3803 | 3803 | |
| 3804 | 3804 | // IE est toujours mon ami |
| 3805 | 3805 | $balise_svg = inserer_attribut($balise_svg, 'focusable', 'false'); |
@@ -3817,9 +3817,9 @@ discard block |
||
| 3817 | 3817 | // regler le alt |
| 3818 | 3818 | if ($alt) { |
| 3819 | 3819 | $balise_svg = inserer_attribut($balise_svg, 'role', 'img'); |
| 3820 | - $id = 'img-svg-title-' . substr(md5("$img_file:$svg:$alt"), 0, 4); |
|
| 3820 | + $id = 'img-svg-title-'.substr(md5("$img_file:$svg:$alt"), 0, 4); |
|
| 3821 | 3821 | $balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id); |
| 3822 | - $title = "<title id=\"$id\">" . entites_html($alt) . "</title>\n"; |
|
| 3822 | + $title = "<title id=\"$id\">".entites_html($alt)."</title>\n"; |
|
| 3823 | 3823 | $balise_svg .= $title; |
| 3824 | 3824 | } |
| 3825 | 3825 | else { |
@@ -3867,7 +3867,7 @@ discard block |
||
| 3867 | 3867 | if (is_array($tableau)) { |
| 3868 | 3868 | foreach ($tableau as $k => $v) { |
| 3869 | 3869 | $res = recuperer_fond( |
| 3870 | - 'modeles/' . $modele, |
|
| 3870 | + 'modeles/'.$modele, |
|
| 3871 | 3871 | array_merge(['cle' => $k], (is_array($v) ? $v : ['valeur' => $v])) |
| 3872 | 3872 | ); |
| 3873 | 3873 | $texte .= $res; |
@@ -4052,7 +4052,7 @@ discard block |
||
| 4052 | 4052 | } |
| 4053 | 4053 | |
| 4054 | 4054 | $c = serialize($c); |
| 4055 | - $cle = calculer_cle_action($form . $c); |
|
| 4055 | + $cle = calculer_cle_action($form.$c); |
|
| 4056 | 4056 | $c = "$cle:$c"; |
| 4057 | 4057 | |
| 4058 | 4058 | // on ne stocke pas les contextes dans des fichiers en cache |
@@ -4110,15 +4110,15 @@ discard block |
||
| 4110 | 4110 | } |
| 4111 | 4111 | // toujours encoder l'url source dans le bloc ajax |
| 4112 | 4112 | $r = self(); |
| 4113 | - $r = ' data-origin="' . $r . '"'; |
|
| 4113 | + $r = ' data-origin="'.$r.'"'; |
|
| 4114 | 4114 | $class = 'ajaxbloc'; |
| 4115 | 4115 | if ($ajaxid and is_string($ajaxid)) { |
| 4116 | 4116 | // ajaxid est normalement conforme a un nom de classe css |
| 4117 | 4117 | // on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution |
| 4118 | - $class .= ' ajax-id-' . entites_html($ajaxid); |
|
| 4118 | + $class .= ' ajax-id-'.entites_html($ajaxid); |
|
| 4119 | 4119 | } |
| 4120 | 4120 | |
| 4121 | - return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 4121 | + return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n"; |
|
| 4122 | 4122 | } |
| 4123 | 4123 | |
| 4124 | 4124 | /** |
@@ -4162,7 +4162,7 @@ discard block |
||
| 4162 | 4162 | $cle = substr($c, 0, $p); |
| 4163 | 4163 | $c = substr($c, $p + 1); |
| 4164 | 4164 | |
| 4165 | - if ($cle == calculer_cle_action($form . $c)) { |
|
| 4165 | + if ($cle == calculer_cle_action($form.$c)) { |
|
| 4166 | 4166 | $env = @unserialize($c); |
| 4167 | 4167 | return $env; |
| 4168 | 4168 | } |
@@ -4283,13 +4283,13 @@ discard block |
||
| 4283 | 4283 | } |
| 4284 | 4284 | } |
| 4285 | 4285 | } |
| 4286 | - $att .= 'class="' . ($class ? attribut_html($class) . ' ' : '') . (defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on') . '"'; |
|
| 4286 | + $att .= 'class="'.($class ? attribut_html($class).' ' : '').(defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on').'"'; |
|
| 4287 | 4287 | } else { |
| 4288 | 4288 | $bal = 'a'; |
| 4289 | 4289 | $att = "href='$url'" |
| 4290 | - . ($title ? " title='" . attribut_html($title) . "'" : '') |
|
| 4291 | - . ($class ? " class='" . attribut_html($class) . "'" : '') |
|
| 4292 | - . ($rel ? " rel='" . attribut_html($rel) . "'" : '') |
|
| 4290 | + . ($title ? " title='".attribut_html($title)."'" : '') |
|
| 4291 | + . ($class ? " class='".attribut_html($class)."'" : '') |
|
| 4292 | + . ($rel ? " rel='".attribut_html($rel)."'" : '') |
|
| 4293 | 4293 | . $evt; |
| 4294 | 4294 | } |
| 4295 | 4295 | if ($libelle === null) { |
@@ -4428,7 +4428,7 @@ discard block |
||
| 4428 | 4428 | |
| 4429 | 4429 | // Icône |
| 4430 | 4430 | $icone = http_img_pack($fond, $alt, "width='$size' height='$size'"); |
| 4431 | - $icone = '<span class="icone-image' . ($fonction ? " icone-fonction icone-fonction-$fonction" : '') . "\">$icone</span>"; |
|
| 4431 | + $icone = '<span class="icone-image'.($fonction ? " icone-fonction icone-fonction-$fonction" : '')."\">$icone</span>"; |
|
| 4432 | 4432 | |
| 4433 | 4433 | // Markup final |
| 4434 | 4434 | if ($type == 'lien') { |
@@ -4703,20 +4703,20 @@ discard block |
||
| 4703 | 4703 | $class_form = 'ajax'; |
| 4704 | 4704 | $class = str_replace('ajax', '', $class); |
| 4705 | 4705 | } |
| 4706 | - $class_btn = 'submit ' . trim($class); |
|
| 4706 | + $class_btn = 'submit '.trim($class); |
|
| 4707 | 4707 | |
| 4708 | 4708 | if ($confirm) { |
| 4709 | - $confirm = 'confirm("' . attribut_html($confirm) . '")'; |
|
| 4709 | + $confirm = 'confirm("'.attribut_html($confirm).'")'; |
|
| 4710 | 4710 | if ($callback) { |
| 4711 | 4711 | $callback = "$confirm?($callback):false"; |
| 4712 | 4712 | } else { |
| 4713 | 4713 | $callback = $confirm; |
| 4714 | 4714 | } |
| 4715 | 4715 | } |
| 4716 | - $onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : ''; |
|
| 4716 | + $onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : ''; |
|
| 4717 | 4717 | $title = $title ? " title='$title'" : ''; |
| 4718 | 4718 | |
| 4719 | - return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>" . form_hidden($url) |
|
| 4719 | + return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>".form_hidden($url) |
|
| 4720 | 4720 | . "<button type='submit' class='$class_btn'$title$onclick>$libelle</button></div></form>"; |
| 4721 | 4721 | } |
| 4722 | 4722 | |
@@ -4781,14 +4781,14 @@ discard block |
||
| 4781 | 4781 | $champ_titre = ''; |
| 4782 | 4782 | if ($demande_titre) { |
| 4783 | 4783 | // si pas de titre declare mais champ titre, il sera peuple par le select * |
| 4784 | - $champ_titre = (!empty($desc['titre'])) ? ', ' . $desc['titre'] : ''; |
|
| 4784 | + $champ_titre = (!empty($desc['titre'])) ? ', '.$desc['titre'] : ''; |
|
| 4785 | 4785 | } |
| 4786 | 4786 | include_spip('base/abstract_sql'); |
| 4787 | 4787 | include_spip('base/connect_sql'); |
| 4788 | 4788 | $objets[$type_objet][$id_objet] = sql_fetsel( |
| 4789 | - '*' . $champ_titre, |
|
| 4789 | + '*'.$champ_titre, |
|
| 4790 | 4790 | $desc['table_sql'], |
| 4791 | - id_table_objet($type_objet) . ' = ' . intval($id_objet) |
|
| 4791 | + id_table_objet($type_objet).' = '.intval($id_objet) |
|
| 4792 | 4792 | ); |
| 4793 | 4793 | |
| 4794 | 4794 | // Toujours noter la longueur d'introduction, même si pas demandé cette fois-ci |
@@ -4881,8 +4881,7 @@ discard block |
||
| 4881 | 4881 | if (isset($ligne_sql['chapo'])) { |
| 4882 | 4882 | $chapo = $ligne_sql['chapo']; |
| 4883 | 4883 | $texte = strlen($descriptif) ? |
| 4884 | - '' : |
|
| 4885 | - "$chapo \n\n $texte"; |
|
| 4884 | + '' : "$chapo \n\n $texte"; |
|
| 4886 | 4885 | } |
| 4887 | 4886 | |
| 4888 | 4887 | // Longueur en paramètre, sinon celle renseignée dans la description de l'objet, sinon valeur en dur |
@@ -4957,7 +4956,7 @@ discard block |
||
| 4957 | 4956 | return $texte; |
| 4958 | 4957 | } |
| 4959 | 4958 | |
| 4960 | - $traitement = str_replace('%s', "'" . texte_script($texte) . "'", $traitement); |
|
| 4959 | + $traitement = str_replace('%s', "'".texte_script($texte)."'", $traitement); |
|
| 4961 | 4960 | |
| 4962 | 4961 | // signaler qu'on est dans l'espace prive pour les filtres qui se servent de ce flag |
| 4963 | 4962 | if (test_espace_prive()) { |
@@ -4996,7 +4995,7 @@ discard block |
||
| 4996 | 4995 | } |
| 4997 | 4996 | $url = generer_objet_url($id_objet, $objet, '', '', null, '', $connect); |
| 4998 | 4997 | |
| 4999 | - return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . '</a>'; |
|
| 4998 | + return "<a href='$url' class='$objet'>".couper($titre, $longueur).'</a>'; |
|
| 5000 | 4999 | } |
| 5001 | 5000 | |
| 5002 | 5001 | /** |
@@ -5022,10 +5021,10 @@ discard block |
||
| 5022 | 5021 | function wrap($texte, $wrap) { |
| 5023 | 5022 | $balises = extraire_balises($wrap); |
| 5024 | 5023 | if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) { |
| 5025 | - $texte = $wrap . $texte; |
|
| 5024 | + $texte = $wrap.$texte; |
|
| 5026 | 5025 | $regs = array_reverse($regs[1]); |
| 5027 | - $wrap = '</' . implode('></', $regs) . '>'; |
|
| 5028 | - $texte = $texte . $wrap; |
|
| 5026 | + $wrap = '</'.implode('></', $regs).'>'; |
|
| 5027 | + $texte = $texte.$wrap; |
|
| 5029 | 5028 | } |
| 5030 | 5029 | |
| 5031 | 5030 | return $texte; |
@@ -5056,7 +5055,7 @@ discard block |
||
| 5056 | 5055 | |
| 5057 | 5056 | // caster $u en array si besoin |
| 5058 | 5057 | if (is_object($u)) { |
| 5059 | - $u = (array)$u; |
|
| 5058 | + $u = (array) $u; |
|
| 5060 | 5059 | } |
| 5061 | 5060 | |
| 5062 | 5061 | if (is_array($u)) { |
@@ -5078,7 +5077,7 @@ discard block |
||
| 5078 | 5077 | // sinon on passe a la ligne et on indente |
| 5079 | 5078 | $i_str = str_pad('', $indent, ' '); |
| 5080 | 5079 | foreach ($u as $k => $v) { |
| 5081 | - $out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2); |
|
| 5080 | + $out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2); |
|
| 5082 | 5081 | } |
| 5083 | 5082 | |
| 5084 | 5083 | return $out; |
@@ -5132,7 +5131,7 @@ discard block |
||
| 5132 | 5131 | * @return string |
| 5133 | 5132 | */ |
| 5134 | 5133 | function objet_icone($objet, $taille = 24, $class = '') { |
| 5135 | - $icone = objet_info($objet, 'icone_objet') . '-' . $taille . '.png'; |
|
| 5134 | + $icone = objet_info($objet, 'icone_objet').'-'.$taille.'.png'; |
|
| 5136 | 5135 | $icone = chemin_image($icone); |
| 5137 | 5136 | $balise_img = charger_filtre('balise_img'); |
| 5138 | 5137 | |
@@ -5158,7 +5157,7 @@ discard block |
||
| 5158 | 5157 | */ |
| 5159 | 5158 | function objet_T($objet, $chaine, $args = [], $options = []) { |
| 5160 | 5159 | $chaine = explode(':', $chaine); |
| 5161 | - if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, ['force' => false]))) { |
|
| 5160 | + if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, ['force' => false]))) { |
|
| 5162 | 5161 | return $t; |
| 5163 | 5162 | } |
| 5164 | 5163 | $chaine = implode(':', $chaine); |
@@ -5224,7 +5223,7 @@ discard block |
||
| 5224 | 5223 | $cache = recuperer_fond($fond, $contexte, $options, $connect); |
| 5225 | 5224 | |
| 5226 | 5225 | // calculer le nom de la css |
| 5227 | - $dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension); |
|
| 5226 | + $dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension); |
|
| 5228 | 5227 | $nom_safe = preg_replace(',\W,', '_', str_replace('.', '_', $fond)); |
| 5229 | 5228 | $contexte_implicite = calculer_contexte_implicite(); |
| 5230 | 5229 | |
@@ -5232,14 +5231,14 @@ discard block |
||
| 5232 | 5231 | // mais on peut hasher selon le contenu a la demande, si plusieurs contextes produisent un meme contenu |
| 5233 | 5232 | // reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine |
| 5234 | 5233 | if (isset($options['hash_on_content']) and $options['hash_on_content']) { |
| 5235 | - $hash = md5($contexte_implicite['host'] . '::' . $cache); |
|
| 5234 | + $hash = md5($contexte_implicite['host'].'::'.$cache); |
|
| 5236 | 5235 | } |
| 5237 | 5236 | else { |
| 5238 | 5237 | unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js |
| 5239 | 5238 | ksort($contexte); |
| 5240 | - $hash = md5($fond . json_encode($contexte_implicite, JSON_THROW_ON_ERROR) . json_encode($contexte, JSON_THROW_ON_ERROR) . $connect); |
|
| 5239 | + $hash = md5($fond.json_encode($contexte_implicite, JSON_THROW_ON_ERROR).json_encode($contexte, JSON_THROW_ON_ERROR).$connect); |
|
| 5241 | 5240 | } |
| 5242 | - $filename = $dir_var . $extension . "dyn-$nom_safe-" . substr($hash, 0, 8) . ".$extension"; |
|
| 5241 | + $filename = $dir_var.$extension."dyn-$nom_safe-".substr($hash, 0, 8).".$extension"; |
|
| 5243 | 5242 | |
| 5244 | 5243 | // mettre a jour le fichier si il n'existe pas |
| 5245 | 5244 | // ou trop ancien |
@@ -5247,8 +5246,8 @@ discard block |
||
| 5247 | 5246 | // et recopie sur le fichier cible uniquement si il change |
| 5248 | 5247 | if ( |
| 5249 | 5248 | !file_exists($filename) |
| 5250 | - or !file_exists($filename . '.last') |
|
| 5251 | - or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename . '.last') < $cache['lastmodified']) |
|
| 5249 | + or !file_exists($filename.'.last') |
|
| 5250 | + or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename.'.last') < $cache['lastmodified']) |
|
| 5252 | 5251 | or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul') |
| 5253 | 5252 | ) { |
| 5254 | 5253 | $contenu = $cache['texte']; |
@@ -5272,10 +5271,10 @@ discard block |
||
| 5272 | 5271 | } |
| 5273 | 5272 | // pas de date dans le commentaire car sinon ca invalide le md5 et force la maj |
| 5274 | 5273 | // mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non |
| 5275 | - $comment .= "}\n md5:" . md5($contenu) . " */\n"; |
|
| 5274 | + $comment .= "}\n md5:".md5($contenu)." */\n"; |
|
| 5276 | 5275 | } |
| 5277 | 5276 | // et ecrire le fichier si il change |
| 5278 | - ecrire_fichier_calcule_si_modifie($filename, $comment . $contenu, false, true); |
|
| 5277 | + ecrire_fichier_calcule_si_modifie($filename, $comment.$contenu, false, true); |
|
| 5279 | 5278 | } |
| 5280 | 5279 | |
| 5281 | 5280 | return timestamp($filename); |
@@ -5508,7 +5507,7 @@ discard block |
||
| 5508 | 5507 | if ($e > 0 and strlen($mid) > 8) { |
| 5509 | 5508 | $mid = '***...***'; |
| 5510 | 5509 | } |
| 5511 | - return substr($passe, 0, $e) . $mid . ($e > 0 ? substr($passe, -$e) : ''); |
|
| 5510 | + return substr($passe, 0, $e).$mid.($e > 0 ? substr($passe, -$e) : ''); |
|
| 5512 | 5511 | } |
| 5513 | 5512 | |
| 5514 | 5513 | |
@@ -5570,7 +5569,7 @@ discard block |
||
| 5570 | 5569 | case 'id': |
| 5571 | 5570 | case 'anchor': |
| 5572 | 5571 | if (preg_match(',^\d,', $texte)) { |
| 5573 | - $texte = substr($type, 0, 1) . $texte; |
|
| 5572 | + $texte = substr($type, 0, 1).$texte; |
|
| 5574 | 5573 | } |
| 5575 | 5574 | } |
| 5576 | 5575 | |
@@ -5580,9 +5579,9 @@ discard block |
||
| 5580 | 5579 | |
| 5581 | 5580 | if (strlen($texte) < $longueur_mini and $longueur_mini < $longueur_maxi) { |
| 5582 | 5581 | if (preg_match(',^\d,', $texte)) { |
| 5583 | - $texte = ($type ? substr($type, 0, 1) : 's') . $texte; |
|
| 5582 | + $texte = ($type ? substr($type, 0, 1) : 's').$texte; |
|
| 5584 | 5583 | } |
| 5585 | - $texte .= $separateur . md5($original); |
|
| 5584 | + $texte .= $separateur.md5($original); |
|
| 5586 | 5585 | $texte = substr($texte, 0, $longueur_mini); |
| 5587 | 5586 | } |
| 5588 | 5587 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | '(<([a-z_-]{3,})' # <modele |
| 27 | 27 | . '\s*([0-9]*)\s*' # id |
| 28 | 28 | . '([|](?:<[^<>]*>|[^>])*?)?' # |arguments (y compris des tags <...>) |
| 29 | - . '\s*/?' . '>)' # fin du modele > |
|
| 29 | + . '\s*/?'.'>)' # fin du modele > |
|
| 30 | 30 | ); |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $pos = 0; |
| 44 | 44 | while ( |
| 45 | 45 | ($next = strpos($texte, '<', $pos)) !== false |
| 46 | - and preg_match('@' . _PREG_MODELE . '@isS', $texte, $regs, PREG_OFFSET_CAPTURE, $next) |
|
| 46 | + and preg_match('@'._PREG_MODELE.'@isS', $texte, $regs, PREG_OFFSET_CAPTURE, $next) |
|
| 47 | 47 | ) { |
| 48 | 48 | |
| 49 | 49 | $a = $regs[0][1]; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | $offset_pos = 0; |
| 123 | 123 | foreach ($modeles as $m) { |
| 124 | - $rempl = $markid . base64_encode($m['modele']) . '|@'; |
|
| 124 | + $rempl = $markid.base64_encode($m['modele']).'|@'; |
|
| 125 | 125 | $texte = substr_replace($texte, $rempl, $m['pos'] + $offset_pos, $m['length']); |
| 126 | 126 | $offset_pos += strlen($rempl) - $m['length']; |
| 127 | 127 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $n = intval(sql_errno()); |
| 62 | - spip_log("Erreur base de donnees $n " . sql_error()); |
|
| 62 | + spip_log("Erreur base de donnees $n ".sql_error()); |
|
| 63 | 63 | |
| 64 | 64 | return $n ?: 1; |
| 65 | 65 | } |
@@ -110,19 +110,19 @@ discard block |
||
| 110 | 110 | // erreur SQL a afficher |
| 111 | 111 | $raison = minipres( |
| 112 | 112 | _T('info_travaux_titre'), |
| 113 | - _T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>' |
|
| 113 | + _T('titre_probleme_technique').'<p><tt>'.sql_errno().' '.sql_error().'</tt></p>' |
|
| 114 | 114 | ); |
| 115 | 115 | } elseif (@$raison['statut']) { |
| 116 | 116 | // un simple visiteur n'a pas acces a l'espace prive |
| 117 | - spip_log('connexion refusee a ' . @$raison['id_auteur']); |
|
| 117 | + spip_log('connexion refusee a '.@$raison['id_auteur']); |
|
| 118 | 118 | $est_connecte = (!empty($GLOBALS['visiteur_session']['login']) and !empty($GLOBALS['visiteur_session']['statut'])); // idem test balise #URL_LOGOUT |
| 119 | 119 | $raison = minipres( |
| 120 | 120 | _T('avis_erreur_connexion'), |
| 121 | 121 | _T('avis_erreur_visiteur') |
| 122 | 122 | // Lien vers le site public |
| 123 | - . '<br /><a href="' . url_de_base() . '">' . _T('login_retour_public') . '</a>' |
|
| 123 | + . '<br /><a href="'.url_de_base().'">'._T('login_retour_public').'</a>' |
|
| 124 | 124 | // Si la personne est connectée, lien de déconnexion ramenant vers la page de login |
| 125 | - . ($est_connecte ? ' | <a href="' . generer_url_public('', 'action=logout&logout=prive') . '">' . _T('icone_deconnecter') . '</a>' : '') |
|
| 125 | + . ($est_connecte ? ' | <a href="'.generer_url_public('', 'action=logout&logout=prive').'">'._T('icone_deconnecter').'</a>' : '') |
|
| 126 | 126 | ); |
| 127 | 127 | } else { |
| 128 | 128 | // auteur en fin de droits ... |
@@ -212,8 +212,7 @@ discard block |
||
| 212 | 212 | $where = (is_numeric($id_auteur) |
| 213 | 213 | /*AND $id_auteur>0*/ // reprise lors des restaurations |
| 214 | 214 | ) ? |
| 215 | - "id_auteur=$id_auteur" : |
|
| 216 | - (!strlen($GLOBALS['connect_login']) ? '' : 'login=' . sql_quote($GLOBALS['connect_login'], '', 'text')); |
|
| 215 | + "id_auteur=$id_auteur" : (!strlen($GLOBALS['connect_login']) ? '' : 'login='.sql_quote($GLOBALS['connect_login'], '', 'text')); |
|
| 217 | 216 | |
| 218 | 217 | if (!$where) { |
| 219 | 218 | return ''; |
@@ -255,7 +254,7 @@ discard block |
||
| 255 | 254 | $GLOBALS['connect_login'] = $row['login']; |
| 256 | 255 | $GLOBALS['connect_statut'] = $row['statut']; |
| 257 | 256 | |
| 258 | - $GLOBALS['visiteur_session'] = array_merge((array)$GLOBALS['visiteur_session'], $row); |
|
| 257 | + $GLOBALS['visiteur_session'] = array_merge((array) $GLOBALS['visiteur_session'], $row); |
|
| 259 | 258 | |
| 260 | 259 | // au cas ou : ne pas memoriser les champs sensibles |
| 261 | 260 | unset($GLOBALS['visiteur_session']['pass']); |
@@ -327,7 +326,7 @@ discard block |
||
| 327 | 326 | * @return string |
| 328 | 327 | */ |
| 329 | 328 | function auth_a_loger() { |
| 330 | - $redirect = generer_url_public('login', 'url=' . rawurlencode(self('&', true)), true); |
|
| 329 | + $redirect = generer_url_public('login', 'url='.rawurlencode(self('&', true)), true); |
|
| 331 | 330 | |
| 332 | 331 | // un echec au "bonjour" (login initial) quand le statut est |
| 333 | 332 | // inconnu signale sans doute un probleme de cookies |
@@ -363,7 +362,7 @@ discard block |
||
| 363 | 362 | $date ??= date('Y-m-d H:i:s'); |
| 364 | 363 | |
| 365 | 364 | if (abs(strtotime($date) - $connect_quand) >= 60) { |
| 366 | - sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur=' . intval($row['id_auteur'])); |
|
| 365 | + sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur='.intval($row['id_auteur'])); |
|
| 367 | 366 | $row['en_ligne'] = $date; |
| 368 | 367 | } |
| 369 | 368 | |
@@ -472,7 +471,7 @@ discard block |
||
| 472 | 471 | if ( |
| 473 | 472 | !$login |
| 474 | 473 | or !$login_base = auth_retrouver_login($login, $serveur) |
| 475 | - or !$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur) |
|
| 474 | + or !$row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur) |
|
| 476 | 475 | ) { |
| 477 | 476 | // generer de fausses infos, mais credibles, pour eviter une attaque |
| 478 | 477 | // https://core.spip.net/issues/1758 + https://core.spip.net/issues/3691 |
@@ -582,7 +581,7 @@ discard block |
||
| 582 | 581 | sql_updateq( |
| 583 | 582 | 'spip_auteurs', |
| 584 | 583 | ['prefs' => serialize($p)], |
| 585 | - 'id_auteur=' . intval($auteur['id_auteur']) |
|
| 584 | + 'id_auteur='.intval($auteur['id_auteur']) |
|
| 586 | 585 | ); |
| 587 | 586 | |
| 588 | 587 | // bloquer ici le visiteur qui tente d'abuser de ses droits |
@@ -746,7 +745,7 @@ discard block |
||
| 746 | 745 | return false; |
| 747 | 746 | } |
| 748 | 747 | |
| 749 | - $row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur); |
|
| 748 | + $row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur); |
|
| 750 | 749 | |
| 751 | 750 | if (!$row) { |
| 752 | 751 | if ( |
@@ -802,11 +801,11 @@ discard block |
||
| 802 | 801 | $retour = $retour ?: _T('icone_retour'); |
| 803 | 802 | $corps .= "<p>$raison</p>[<a href='$public'>$retour</a>] "; |
| 804 | 803 | if ($url) { |
| 805 | - $corps .= "[<a href='" . generer_url_action('cookie', "essai_auth_http=oui&$url") . "'>$re</a>]"; |
|
| 804 | + $corps .= "[<a href='".generer_url_action('cookie', "essai_auth_http=oui&$url")."'>$re</a>]"; |
|
| 806 | 805 | } |
| 807 | 806 | |
| 808 | 807 | if ($lien) { |
| 809 | - $corps .= " [<a href='$ecrire'>" . _T('login_espace_prive') . '</a>]'; |
|
| 808 | + $corps .= " [<a href='$ecrire'>"._T('login_espace_prive').'</a>]'; |
|
| 810 | 809 | } |
| 811 | 810 | include_spip('inc/minipres'); |
| 812 | 811 | echo minipres($pb, $corps); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | // L'éditabilité :) est définie par un test permanent (par exemple "associermots") ET le 4ème argument |
| 107 | 107 | include_spip('inc/autoriser'); |
| 108 | - $editable = ($editable and autoriser('associer' . $table_source, $objet, $id_objet) |
|
| 108 | + $editable = ($editable and autoriser('associer'.$table_source, $objet, $id_objet) |
|
| 109 | 109 | and autoriser('modifier', $objet, $id_objet)); |
| 110 | 110 | |
| 111 | 111 | if ( |
@@ -119,15 +119,15 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | // squelettes de vue et de d'association |
| 121 | 121 | // ils sont différents si des rôles sont définis. |
| 122 | - $skel_vue = $table_source . '_lies'; |
|
| 123 | - $skel_ajout = $table_source . '_associer'; |
|
| 122 | + $skel_vue = $table_source.'_lies'; |
|
| 123 | + $skel_ajout = $table_source.'_associer'; |
|
| 124 | 124 | |
| 125 | 125 | // description des roles |
| 126 | 126 | include_spip('inc/roles'); |
| 127 | 127 | if ($roles = roles_presents($objet_source, $objet)) { |
| 128 | 128 | // on demande de nouveaux squelettes en conséquence |
| 129 | - $skel_vue = $table_source . '_roles_lies'; |
|
| 130 | - $skel_ajout = $table_source . '_roles_associer'; |
|
| 129 | + $skel_vue = $table_source.'_roles_lies'; |
|
| 130 | + $skel_ajout = $table_source.'_roles_associer'; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $oups = ''; |
@@ -226,12 +226,12 @@ discard block |
||
| 226 | 226 | include_spip('inc/autoriser'); |
| 227 | 227 | if (autoriser('modifier', $objet, $id_objet)) { |
| 228 | 228 | // recuperer le oups du coup d'avant pour le propager à charger() si on ne fait rien par exemple |
| 229 | - lien_gerer__oups('editer_liens','request'); |
|
| 229 | + lien_gerer__oups('editer_liens', 'request'); |
|
| 230 | 230 | |
| 231 | 231 | // annuler les suppressions du coup d'avant ? |
| 232 | 232 | if ( |
| 233 | 233 | _request('annuler_oups') |
| 234 | - and $oups = lien_gerer__oups('editer_liens','get') |
|
| 234 | + and $oups = lien_gerer__oups('editer_liens', 'get') |
|
| 235 | 235 | ) { |
| 236 | 236 | if ($oups_objets = charger_fonction("editer_liens_oups_{$table_source}_{$objet}_{$objet_lien}", 'action', true)) { |
| 237 | 237 | $oups_objets($oups); |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | # oups ne persiste que pour la derniere action, si suppression |
| 250 | - lien_gerer__oups('editer_liens','reset'); |
|
| 250 | + lien_gerer__oups('editer_liens', 'reset'); |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | $supprimer = _request('supprimer_lien'); |
@@ -310,9 +310,9 @@ discard block |
||
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | if (!empty($oups)) { |
| 313 | - lien_gerer__oups('editer_liens','set', $oups); |
|
| 313 | + lien_gerer__oups('editer_liens', 'set', $oups); |
|
| 314 | 314 | } else { |
| 315 | - lien_gerer__oups('editer_liens','reset'); |
|
| 315 | + lien_gerer__oups('editer_liens', 'reset'); |
|
| 316 | 316 | } |
| 317 | 317 | } |
| 318 | 318 | |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | # une suppression suivie d'un ajout dans le meme hit est un remplacement |
| 343 | 343 | # non annulable ! |
| 344 | 344 | if ($ajout_ok) { |
| 345 | - lien_gerer__oups('editer_liens','reset'); |
|
| 345 | + lien_gerer__oups('editer_liens', 'reset'); |
|
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | objet_qualifier_liens([$objet2 => $idl], [$objet1 => $ids], $qualif); |
| 360 | 360 | } |
| 361 | 361 | set_request('id_lien_ajoute', $ids); |
| 362 | - lien_gerer__oups('editer_liens','reset'); |
|
| 362 | + lien_gerer__oups('editer_liens', 'reset'); |
|
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 365 | } |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | function lien_retrouver_qualif($objet_lien, $lien) { |
| 425 | 425 | // un role est défini dans la liaison |
| 426 | 426 | $defs = explode('-', $lien); |
| 427 | - [$objet1, , $objet2, , $role] = array_pad($defs, 5, null); |
|
| 427 | + [$objet1,, $objet2,, $role] = array_pad($defs, 5, null); |
|
| 428 | 428 | if ($objet_lien == $objet1) { |
| 429 | 429 | $colonne_role = roles_colonne($objet1, $objet2); |
| 430 | 430 | } else { |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | do { |
| 606 | 606 | $t = array_shift($trace); |
| 607 | 607 | $function = $t['function'] ?? ''; |
| 608 | - if (strpos($function, 'formulaires_'. $form) === 0) { |
|
| 608 | + if (strpos($function, 'formulaires_'.$form) === 0) { |
|
| 609 | 609 | if (isset($t['args'])) { |
| 610 | 610 | $args = json_encode($t['args']); |
| 611 | 611 | } |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | $GLOBALS['maj'][2021_02_18_00] = [ |
| 26 | - ['sql_alter', "TABLE spip_auteurs CHANGE imessage imessage VARCHAR(3) DEFAULT '' NOT NULL" ], |
|
| 27 | - ['sql_updateq', 'spip_auteurs', ['imessage' => 'oui'], "imessage != 'non' OR imessage IS NULL" ], |
|
| 26 | + ['sql_alter', "TABLE spip_auteurs CHANGE imessage imessage VARCHAR(3) DEFAULT '' NOT NULL"], |
|
| 27 | + ['sql_updateq', 'spip_auteurs', ['imessage' => 'oui'], "imessage != 'non' OR imessage IS NULL"], |
|
| 28 | 28 | ]; |
| 29 | 29 | |
| 30 | 30 | $GLOBALS['maj'][2022_02_23_02] = [ |
| 31 | - ['sql_alter', "TABLE spip_auteurs ADD backup_cles mediumtext DEFAULT '' NOT NULL" ], |
|
| 32 | - ['sql_delete', 'spip_meta', "nom='secret_du_site'" ], |
|
| 31 | + ['sql_alter', "TABLE spip_auteurs ADD backup_cles mediumtext DEFAULT '' NOT NULL"], |
|
| 32 | + ['sql_delete', 'spip_meta', "nom='secret_du_site'"], |
|
| 33 | 33 | ]; |
| 34 | 34 | |
| 35 | 35 | $GLOBALS['maj'][2022_02_23_03] = [ |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | spip_log('supprimer sessions auteur', 'maj'); |
| 49 | 49 | if ($dir = opendir(_DIR_SESSIONS)) { |
| 50 | 50 | while (($f = readdir($dir)) !== false) { |
| 51 | - spip_unlink(_DIR_SESSIONS . $f); |
|
| 51 | + spip_unlink(_DIR_SESSIONS.$f); |
|
| 52 | 52 | if (time() >= _TIME_OUT) { |
| 53 | 53 | return; |
| 54 | 54 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $rejouer = (_SESSION_REJOUER === true) ? rejouer_session() : _SESSION_REJOUER; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | - return $rejouer . (defined('_TESTER_NOSCRIPT') ? _TESTER_NOSCRIPT : ''); |
|
| 192 | + return $rejouer.(defined('_TESTER_NOSCRIPT') ? _TESTER_NOSCRIPT : ''); |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
@@ -235,9 +235,9 @@ discard block |
||
| 235 | 235 | // |
| 236 | 236 | if ($vcs = version_vcs_courante(_DIR_RACINE, true)) { |
| 237 | 237 | if ($vcs['vcs'] === 'GIT') { |
| 238 | - $url = 'https://git.spip.net/spip/spip/commit/' . $vcs['commit']; |
|
| 238 | + $url = 'https://git.spip.net/spip/spip/commit/'.$vcs['commit']; |
|
| 239 | 239 | } elseif ($vcs['vcs'] === 'SVN') { |
| 240 | - $url = 'https://core.spip.net/projects/spip/repository/revisions/' . $vcs['commit']; |
|
| 240 | + $url = 'https://core.spip.net/projects/spip/repository/revisions/'.$vcs['commit']; |
|
| 241 | 241 | } else { |
| 242 | 242 | $url = ''; |
| 243 | 243 | } |
@@ -247,21 +247,21 @@ discard block |
||
| 247 | 247 | $commit = "<a href=\"$url\" target=\"_blank\" rel=\"noopener noreferrer\">$commit</a>"; |
| 248 | 248 | } |
| 249 | 249 | if ($vcs['branch']) { |
| 250 | - $commit = $vcs['branch'] . ': ' . $commit; |
|
| 250 | + $commit = $vcs['branch'].': '.$commit; |
|
| 251 | 251 | } |
| 252 | 252 | $version .= " {$vcs['vcs']} [$commit]"; |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | // et la version de l'ecran de securite |
| 256 | 256 | $secu = defined('_ECRAN_SECURITE') |
| 257 | - ? '<br />' . _T('ecran_securite', ['version' => _ECRAN_SECURITE]) |
|
| 257 | + ? '<br />'._T('ecran_securite', ['version' => _ECRAN_SECURITE]) |
|
| 258 | 258 | : ''; |
| 259 | 259 | |
| 260 | 260 | return _T( |
| 261 | 261 | 'info_copyright', |
| 262 | 262 | [ |
| 263 | 263 | 'spip' => "<b>SPIP $version</b> ", |
| 264 | - 'lien_gpl' => '<a href="https://www.gnu.org/licenses/gpl-3.0.html" class="aide popin">' . _T('info_copyright_gpl') . '</a>' |
|
| 264 | + 'lien_gpl' => '<a href="https://www.gnu.org/licenses/gpl-3.0.html" class="aide popin">'._T('info_copyright_gpl').'</a>' |
|
| 265 | 265 | ] |
| 266 | 266 | ) |
| 267 | 267 | . $secu; |
@@ -288,8 +288,8 @@ discard block |
||
| 288 | 288 | $onfocus = ''; |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - $form = '<input type="text" size="10" value="' . $recherche_aff . '" name="recherche" class="recherche" accesskey="r"' . $onfocus . ' />'; |
|
| 292 | - $form .= "<input type='image' src='" . chemin_image('rechercher-20.png') . "' name='submit' class='submit' alt='" . _T('info_rechercher') . "' />"; |
|
| 291 | + $form = '<input type="text" size="10" value="'.$recherche_aff.'" name="recherche" class="recherche" accesskey="r"'.$onfocus.' />'; |
|
| 292 | + $form .= "<input type='image' src='".chemin_image('rechercher-20.png')."' name='submit' class='submit' alt='"._T('info_rechercher')."' />"; |
|
| 293 | 293 | |
| 294 | - return "<div class='spip_recherche'>" . generer_form_ecrire($page, $form . $complement, " method='get'") . '</div>'; |
|
| 294 | + return "<div class='spip_recherche'>".generer_form_ecrire($page, $form.$complement, " method='get'").'</div>'; |
|
| 295 | 295 | } |