@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $n = 0; |
| 46 | 46 | $time = $GLOBALS['meta']['cache_mark'] ?? 0; |
| 47 | 47 | for ($i = 0; $i < 256; $i++) { |
| 48 | - $dir = _DIR_CACHE . sprintf('%02s', dechex($i)); |
|
| 48 | + $dir = _DIR_CACHE.sprintf('%02s', dechex($i)); |
|
| 49 | 49 | if (@is_dir($dir) and is_readable($dir) and $d = opendir($dir)) { |
| 50 | 50 | while (($f = readdir($d)) !== false) { |
| 51 | 51 | if (preg_match(',^[[0-9a-f]+\.cache$,S', $f) and $a = stat("$dir/$f")) { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // stocker la date_modif_$objet (ne sert a rien pour le moment) |
| 104 | 104 | if (isset($objet)) { |
| 105 | - ecrire_meta('derniere_modif_' . $objet, time()); |
|
| 105 | + ecrire_meta('derniere_modif_'.$objet, time()); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | // si $derniere_modif_invalide est un array('article', 'rubrique') |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | // sur certains sites on veut absolument garder certains caches référencés dans un CDN |
| 147 | 147 | // on peut donc inhiber la purge de ces répertoires pour eviter tout probleme |
| 148 | - if (file_exists(rtrim($dir, '/') . '/inhib_purger_repertoire.txt')) { |
|
| 148 | + if (file_exists(rtrim($dir, '/').'/inhib_purger_repertoire.txt')) { |
|
| 149 | 149 | return 0; |
| 150 | 150 | } |
| 151 | 151 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | ) |
| 209 | 209 | ) { |
| 210 | 210 | // supprimer le fichier (de facon propre) |
| 211 | - supprimer_fichier(_DIR_CACHE . $cache); |
|
| 211 | + supprimer_fichier(_DIR_CACHE.$cache); |
|
| 212 | 212 | } else { |
| 213 | 213 | spip_log("Nom de fichier cache incorrect : $cache"); |
| 214 | 214 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - if (find_in_path($charset . '.php', 'charsets/', true)) { |
|
| 76 | + if (find_in_path($charset.'.php', 'charsets/', true)) { |
|
| 77 | 77 | return $charset; |
| 78 | 78 | } else { |
| 79 | 79 | spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'"); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | static $pcre_ok = 0; |
| 161 | 161 | |
| 162 | 162 | if (!$pcre_ok) { |
| 163 | - $s = ' ' . chr(195) . chr(169) . 't' . chr(195) . chr(169) . ' '; |
|
| 163 | + $s = ' '.chr(195).chr(169).'t'.chr(195).chr(169).' '; |
|
| 164 | 164 | if (preg_match(',\W...\W,u', $s)) { |
| 165 | 165 | $pcre_ok = 1; |
| 166 | 166 | } else { |
@@ -261,38 +261,38 @@ discard block |
||
| 261 | 261 | |
| 262 | 262 | if (!isset($trans[$charset][$charset_cible])) { |
| 263 | 263 | $trans[$charset][$charset_cible] = [ |
| 264 | - $p . chr(128) => '€', |
|
| 265 | - $p . chr(129) => ' ', # pas affecte |
|
| 266 | - $p . chr(130) => '‚', |
|
| 267 | - $p . chr(131) => 'ƒ', |
|
| 268 | - $p . chr(132) => '„', |
|
| 269 | - $p . chr(133) => '…', |
|
| 270 | - $p . chr(134) => '†', |
|
| 271 | - $p . chr(135) => '‡', |
|
| 272 | - $p . chr(136) => 'ˆ', |
|
| 273 | - $p . chr(137) => '‰', |
|
| 274 | - $p . chr(138) => 'Š', |
|
| 275 | - $p . chr(139) => '‹', |
|
| 276 | - $p . chr(140) => 'Œ', |
|
| 277 | - $p . chr(141) => ' ', # pas affecte |
|
| 278 | - $p . chr(142) => 'Ž', |
|
| 279 | - $p . chr(143) => ' ', # pas affecte |
|
| 280 | - $p . chr(144) => ' ', # pas affecte |
|
| 281 | - $p . chr(145) => '‘', |
|
| 282 | - $p . chr(146) => '’', |
|
| 283 | - $p . chr(147) => '“', |
|
| 284 | - $p . chr(148) => '”', |
|
| 285 | - $p . chr(149) => '•', |
|
| 286 | - $p . chr(150) => '–', |
|
| 287 | - $p . chr(151) => '—', |
|
| 288 | - $p . chr(152) => '˜', |
|
| 289 | - $p . chr(153) => '™', |
|
| 290 | - $p . chr(154) => 'š', |
|
| 291 | - $p . chr(155) => '›', |
|
| 292 | - $p . chr(156) => 'œ', |
|
| 293 | - $p . chr(157) => ' ', # pas affecte |
|
| 294 | - $p . chr(158) => 'ž', |
|
| 295 | - $p . chr(159) => 'Ÿ', |
|
| 264 | + $p.chr(128) => '€', |
|
| 265 | + $p.chr(129) => ' ', # pas affecte |
|
| 266 | + $p.chr(130) => '‚', |
|
| 267 | + $p.chr(131) => 'ƒ', |
|
| 268 | + $p.chr(132) => '„', |
|
| 269 | + $p.chr(133) => '…', |
|
| 270 | + $p.chr(134) => '†', |
|
| 271 | + $p.chr(135) => '‡', |
|
| 272 | + $p.chr(136) => 'ˆ', |
|
| 273 | + $p.chr(137) => '‰', |
|
| 274 | + $p.chr(138) => 'Š', |
|
| 275 | + $p.chr(139) => '‹', |
|
| 276 | + $p.chr(140) => 'Œ', |
|
| 277 | + $p.chr(141) => ' ', # pas affecte |
|
| 278 | + $p.chr(142) => 'Ž', |
|
| 279 | + $p.chr(143) => ' ', # pas affecte |
|
| 280 | + $p.chr(144) => ' ', # pas affecte |
|
| 281 | + $p.chr(145) => '‘', |
|
| 282 | + $p.chr(146) => '’', |
|
| 283 | + $p.chr(147) => '“', |
|
| 284 | + $p.chr(148) => '”', |
|
| 285 | + $p.chr(149) => '•', |
|
| 286 | + $p.chr(150) => '–', |
|
| 287 | + $p.chr(151) => '—', |
|
| 288 | + $p.chr(152) => '˜', |
|
| 289 | + $p.chr(153) => '™', |
|
| 290 | + $p.chr(154) => 'š', |
|
| 291 | + $p.chr(155) => '›', |
|
| 292 | + $p.chr(156) => 'œ', |
|
| 293 | + $p.chr(157) => ' ', # pas affecte |
|
| 294 | + $p.chr(158) => 'ž', |
|
| 295 | + $p.chr(159) => 'Ÿ', |
|
| 296 | 296 | ]; |
| 297 | 297 | if ($charset_cible != 'unicode') { |
| 298 | 298 | foreach ($trans[$charset][$charset_cible] as $k => $c) { |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | and is_array($GLOBALS['CHARSET'][$cset]) |
| 434 | 434 | ) { |
| 435 | 435 | foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) { |
| 436 | - $trans[$charset][chr($key)] = '&#' . $val . ';'; |
|
| 436 | + $trans[$charset][chr($key)] = '&#'.$val.';'; |
|
| 437 | 437 | } |
| 438 | 438 | } |
| 439 | 439 | } |
@@ -500,11 +500,11 @@ discard block |
||
| 500 | 500 | $h = dechex($e); |
| 501 | 501 | if ($s = isset($CHARSET_REVERSE[$charset][$e])) { |
| 502 | 502 | $s = $CHARSET_REVERSE[$charset][$e]; |
| 503 | - $t['&#' . $e . ';'] = $t['�' . $e . ';'] = $t['�' . $e . ';'] = chr($s); |
|
| 504 | - $t['&#x' . $h . ';'] = $t['�' . $h . ';'] = $t['�' . $h . ';'] = chr($s); |
|
| 503 | + $t['&#'.$e.';'] = $t['�'.$e.';'] = $t['�'.$e.';'] = chr($s); |
|
| 504 | + $t['&#x'.$h.';'] = $t['�'.$h.';'] = $t['�'.$h.';'] = chr($s); |
|
| 505 | 505 | } else { |
| 506 | - $t['&#' . $e . ';'] = $t['�' . $e . ';'] = $t['�' . $e . ';'] = chr($e); |
|
| 507 | - $t['&#x' . $h . ';'] = $t['�' . $h . ';'] = $t['�' . $h . ';'] = chr($e); |
|
| 506 | + $t['&#'.$e.';'] = $t['�'.$e.';'] = $t['�'.$e.';'] = chr($e); |
|
| 507 | + $t['&#x'.$h.';'] = $t['�'.$h.';'] = $t['�'.$h.';'] = chr($e); |
|
| 508 | 508 | } |
| 509 | 509 | } |
| 510 | 510 | } |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | and is_array($GLOBALS['CHARSET'][$cset]) |
| 552 | 552 | ) { |
| 553 | 553 | foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) { |
| 554 | - $trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';'); |
|
| 554 | + $trans[$charset][chr($key)] = unicode2charset('&#'.$val.';'); |
|
| 555 | 555 | } |
| 556 | 556 | } |
| 557 | 557 | } |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | } |
| 659 | 659 | $thisPos++; |
| 660 | 660 | } |
| 661 | - $encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';'; |
|
| 661 | + $encodedLetter = '&#'.preg_replace('/^0+/', '', $decimalCode).';'; |
|
| 662 | 662 | $encodedString .= $encodedLetter; |
| 663 | 663 | } |
| 664 | 664 | } |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | } // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html |
| 702 | 702 | else { |
| 703 | 703 | if ($word != 65279) { |
| 704 | - $texte .= '&#' . $word . ';'; |
|
| 704 | + $texte .= '&#'.$word.';'; |
|
| 705 | 705 | } |
| 706 | 706 | } |
| 707 | 707 | } |
@@ -729,13 +729,13 @@ discard block |
||
| 729 | 729 | return chr($num); |
| 730 | 730 | } |
| 731 | 731 | if ($num < 2048) { |
| 732 | - return chr(($num >> 6) + 192) . chr(($num & 63) + 128); |
|
| 732 | + return chr(($num >> 6) + 192).chr(($num & 63) + 128); |
|
| 733 | 733 | } |
| 734 | 734 | if ($num < 65536) { |
| 735 | - return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); |
|
| 735 | + return chr(($num >> 12) + 224).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128); |
|
| 736 | 736 | } |
| 737 | 737 | if ($num < 1_114_112) { |
| 738 | - return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); |
|
| 738 | + return chr(($num >> 18) + 240).chr((($num >> 12) & 63) + 128).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128); |
|
| 739 | 739 | } |
| 740 | 740 | |
| 741 | 741 | return ''; |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | while (preg_match(',�*([0-9]+);,S', $texte, $regs) and !isset($vu[$regs[1]])) { |
| 803 | 803 | $num = $regs[1]; |
| 804 | 804 | $vu[$num] = true; |
| 805 | - $s = '\u' . sprintf('%04x', $num); |
|
| 805 | + $s = '\u'.sprintf('%04x', $num); |
|
| 806 | 806 | $texte = str_replace($regs[0], $s, $texte); |
| 807 | 807 | } |
| 808 | 808 | |
@@ -819,7 +819,7 @@ discard block |
||
| 819 | 819 | **/ |
| 820 | 820 | function javascript_to_unicode($texte) { |
| 821 | 821 | while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) { |
| 822 | - $texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte); |
|
| 822 | + $texte = str_replace($regs[0], '&#'.hexdec($regs[1]).';', $texte); |
|
| 823 | 823 | } |
| 824 | 824 | |
| 825 | 825 | return $texte; |
@@ -864,7 +864,7 @@ discard block |
||
| 864 | 864 | return $texte; |
| 865 | 865 | } |
| 866 | 866 | |
| 867 | - $table_translit = 'translit' . $complexe; |
|
| 867 | + $table_translit = 'translit'.$complexe; |
|
| 868 | 868 | |
| 869 | 869 | // 2. Translitterer grace a la table predefinie |
| 870 | 870 | if (!isset($trans[$complexe])) { |
@@ -955,7 +955,7 @@ discard block |
||
| 955 | 955 | * true s'il a un BOM |
| 956 | 956 | **/ |
| 957 | 957 | function bom_utf8($texte) { |
| 958 | - return (substr($texte, 0, 3) == chr(0xEF) . chr(0xBB) . chr(0xBF)); |
|
| 958 | + return (substr($texte, 0, 3) == chr(0xEF).chr(0xBB).chr(0xBF)); |
|
| 959 | 959 | } |
| 960 | 960 | |
| 961 | 961 | /** |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | // on prend n fois la longueur desiree, pour etre surs d'avoir tout |
| 1152 | 1152 | // (un caractere utf-8 prenant au maximum n bytes) |
| 1153 | 1153 | $n = 0; |
| 1154 | - while (preg_match(',[\x80-\xBF]{' . (++$n) . '},', $c)) { |
|
| 1154 | + while (preg_match(',[\x80-\xBF]{'.(++$n).'},', $c)) { |
|
| 1155 | 1155 | ; |
| 1156 | 1156 | } |
| 1157 | 1157 | $c = substr($c, 0, $n * $length); |
@@ -1185,7 +1185,7 @@ discard block |
||
| 1185 | 1185 | |
| 1186 | 1186 | $lettre1 = mb_strtoupper(spip_substr($c, 0, 1)); |
| 1187 | 1187 | |
| 1188 | - return $lettre1 . spip_substr($c, 1); |
|
| 1188 | + return $lettre1.spip_substr($c, 1); |
|
| 1189 | 1189 | } |
| 1190 | 1190 | |
| 1191 | 1191 | /** |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | $res = sql_select( |
| 36 | 36 | 'rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant', |
| 37 | 37 | 'spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)', |
| 38 | - 'rub1.id_parent = ' . sql_quote($id_rubrique) . ' |
|
| 39 | - AND rub1.id_rubrique!=' . sql_quote($exclu) . ' |
|
| 40 | - AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=' . sql_quote($exclu) . ')', |
|
| 38 | + 'rub1.id_parent = '.sql_quote($id_rubrique).' |
|
| 39 | + AND rub1.id_rubrique!=' . sql_quote($exclu).' |
|
| 40 | + AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=' . sql_quote($exclu).')', |
|
| 41 | 41 | '', |
| 42 | 42 | '0+rub1.titre,rub1.titre' |
| 43 | 43 | ); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | if ($row['langue_choisie'] != 'oui') { |
| 51 | 51 | $t .= ' <small title="' |
| 52 | 52 | . traduire_nom_langue($row['lang']) |
| 53 | - . '">[' . $row['lang'] . ']</small>'; |
|
| 53 | + . '">['.$row['lang'].']</small>'; |
|
| 54 | 54 | } |
| 55 | 55 | $ordre[$row['id_rubrique']] = $t; |
| 56 | 56 | } |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | $next = $list[$col] ?? 0; |
| 60 | 60 | if ($ordre) { |
| 61 | - $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=" . ($col + 1)); |
|
| 61 | + $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=".($col + 1)); |
|
| 62 | 62 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 63 | - $args = "'$idom',this,$col,'" . $GLOBALS['spip_lang_left'] . "','$info',event"; |
|
| 63 | + $args = "'$idom',this,$col,'".$GLOBALS['spip_lang_left']."','$info',event"; |
|
| 64 | 64 | |
| 65 | 65 | foreach ($ordre as $id => $titrebrut) { |
| 66 | 66 | $titre = supprimer_numero($titrebrut); |
| 67 | 67 | |
| 68 | - $classe1 = 'petit-item ' . ($id_rubrique ? 'petite-rubrique' : 'petit-secteur'); |
|
| 68 | + $classe1 = 'petit-item '.($id_rubrique ? 'petite-rubrique' : 'petit-secteur'); |
|
| 69 | 69 | if (isset($rub[$id]['enfants'])) { |
| 70 | 70 | $classe2 = " class='rub-ouverte'"; |
| 71 | 71 | $url = "\nhref='$rec&id=$id'"; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $url = "\nhref='javascript:void(0)'"; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - $js_func = $do . '_selection_titre'; |
|
| 77 | + $js_func = $do.'_selection_titre'; |
|
| 78 | 78 | $click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn " |
| 79 | 79 | . (!is_array($list) ? ' false' |
| 80 | 80 | : "aff_selection_provisoire($id,$args)") |
@@ -101,17 +101,17 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - $idom2 = $idom . '_col_' . ($col + 1); |
|
| 104 | + $idom2 = $idom.'_col_'.($col + 1); |
|
| 105 | 105 | $left = ($col * 250); |
| 106 | 106 | |
| 107 | 107 | return http_img_pack( |
| 108 | 108 | 'loader.svg', |
| 109 | 109 | '', |
| 110 | - "class='loader' style='visibility: hidden; position: absolute; " . $GLOBALS['spip_lang_left'] . ': ' |
|
| 110 | + "class='loader' style='visibility: hidden; position: absolute; ".$GLOBALS['spip_lang_left'].': ' |
|
| 111 | 111 | . ($left - 30) |
| 112 | 112 | . "px; top: 2px; z-index: 2;' id='img_$idom2'" |
| 113 | 113 | ) |
| 114 | - . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; " . $GLOBALS['spip_lang_left'] . ': ' |
|
| 114 | + . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; ".$GLOBALS['spip_lang_left'].': ' |
|
| 115 | 115 | . ($left - 250) |
| 116 | 116 | . "px;'>" |
| 117 | 117 | . $ret |
@@ -105,12 +105,12 @@ discard block |
||
| 105 | 105 | foreach (['script', 'iframe'] as $tag) { |
| 106 | 106 | if ( |
| 107 | 107 | stripos($t, (string) "<$tag") !== false |
| 108 | - and preg_match_all(',<' . $tag . '.*?($|</' . $tag . '.),isS', $t, $r, PREG_SET_ORDER) |
|
| 108 | + and preg_match_all(',<'.$tag.'.*?($|</'.$tag.'.),isS', $t, $r, PREG_SET_ORDER) |
|
| 109 | 109 | ) { |
| 110 | 110 | foreach ($r as $regs) { |
| 111 | 111 | $t = str_replace( |
| 112 | 112 | $regs[0], |
| 113 | - "<code$class>" . nl2br(spip_htmlspecialchars($regs[0])) . '</code>', |
|
| 113 | + "<code$class>".nl2br(spip_htmlspecialchars($regs[0])).'</code>', |
|
| 114 | 114 | $t |
| 115 | 115 | ); |
| 116 | 116 | } |
@@ -163,10 +163,10 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | // echapper les tags asp/php |
| 166 | - $t = str_replace('<' . '%', '<%', $arg); |
|
| 166 | + $t = str_replace('<'.'%', '<%', $arg); |
|
| 167 | 167 | |
| 168 | 168 | // echapper le php |
| 169 | - $t = str_replace('<' . '?', '<?', $t); |
|
| 169 | + $t = str_replace('<'.'?', '<?', $t); |
|
| 170 | 170 | |
| 171 | 171 | // echapper le < script language=php > |
| 172 | 172 | $t = preg_replace(',<(script\b[^>]+\blanguage\b[^\w>]+php\b),UimsS', '<\1', $t); |
@@ -188,10 +188,10 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | // Reinserer les echappements des modeles |
| 190 | 190 | if (defined('_PROTEGE_JS_MODELES')) { |
| 191 | - $t = echappe_retour($t, 'javascript' . _PROTEGE_JS_MODELES); |
|
| 191 | + $t = echappe_retour($t, 'javascript'._PROTEGE_JS_MODELES); |
|
| 192 | 192 | } |
| 193 | 193 | if (defined('_PROTEGE_PHP_MODELES')) { |
| 194 | - $t = echappe_retour($t, 'php' . _PROTEGE_PHP_MODELES); |
|
| 194 | + $t = echappe_retour($t, 'php'._PROTEGE_PHP_MODELES); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | return $dejavu[$mode_filtre][$arg] = $t; |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | define('_TYPO_PROTEGER', "!':;?~%-"); |
| 290 | 290 | define('_TYPO_PROTECTEUR', "\x1\x2\x3\x4\x5\x6\x7\x8"); |
| 291 | 291 | |
| 292 | -define('_TYPO_BALISE', ',</?[a-z!][^<>]*[' . preg_quote(_TYPO_PROTEGER) . '][^<>]*>,imsS'); |
|
| 292 | +define('_TYPO_BALISE', ',</?[a-z!][^<>]*['.preg_quote(_TYPO_PROTEGER).'][^<>]*>,imsS'); |
|
| 293 | 293 | |
| 294 | 294 | /** |
| 295 | 295 | * Corrige la typographie |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | $_texte = ($_texte ?: "''"); |
| 52 | 52 | $_titre = ($_titre ? ", $_titre" : ', null'); |
| 53 | 53 | $_class = ($_class ? ", $_class" : ', null'); |
| 54 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 54 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 56 | 56 | |
| 57 | 57 | $f = chercher_filtre('message_alerte'); |
| 58 | 58 | $p->code = "$f($_texte$_titre$_class$_role$_id)"; |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | $_class = interprete_argument_balise(2, $p); |
| 91 | 91 | $_role = interprete_argument_balise(3, $p); |
| 92 | 92 | $_id = interprete_argument_balise(4, $p); |
| 93 | - $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 93 | + $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 94 | 94 | $_class = ($_class ? ", $_class" : ', null'); |
| 95 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 95 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 97 | 97 | |
| 98 | 98 | $f = chercher_filtre('message_alerte_ouvrir'); |
| 99 | 99 | $p->code = "$f($_titre$_class$_role$_id)"; |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | $message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir'); |
| 164 | 164 | $message_alerte_fermer = chercher_filtre('message_alerte_fermer'); |
| 165 | 165 | $message = |
| 166 | - $message_alerte_ouvrir($titre, $class, $role, $id) . |
|
| 167 | - $texte . |
|
| 166 | + $message_alerte_ouvrir($titre, $class, $role, $id). |
|
| 167 | + $texte. |
|
| 168 | 168 | $message_alerte_fermer(); |
| 169 | 169 | |
| 170 | 170 | return $message; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | ]; |
| 214 | 214 | $type = array_intersect(explode(' ', $class), $types); |
| 215 | 215 | $type = reset($type); |
| 216 | - $class = trim(str_replace($types, '', $class) . " $type"); |
|
| 216 | + $class = trim(str_replace($types, '', $class)." $type"); |
|
| 217 | 217 | |
| 218 | 218 | // Classes |
| 219 | 219 | $class_racine = 'msg-alert'; |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | // Attributs |
| 240 | 240 | $attr_role = ($role ? "role=\"$role\"" : ''); |
| 241 | - $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 241 | + $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 242 | 242 | $attr_data = ($type ? "data-alert=\"$type\"" : ''); |
| 243 | 243 | |
| 244 | 244 | $message = |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | ) { |
| 39 | 39 | // Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé |
| 40 | 40 | include_spip('inc/autoriser'); |
| 41 | - if (!autoriser('configurer', '_' . substr($form, 11))) { |
|
| 41 | + if (!autoriser('configurer', '_'.substr($form, 11))) { |
|
| 42 | 42 | return false; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | and !charger_fonction('traiter', "formulaires/$form/", true) // sans fonction traiter() |
| 73 | 73 | ) { |
| 74 | 74 | $trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']); |
| 75 | - $flux['data'] = ['message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true]; |
|
| 75 | + $flux['data'] = ['message_ok' => _T('config_info_enregistree').$trace, 'editable' => true]; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | return $flux; |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $prefixe = $valeurs['_meta_prefixe']; |
| 147 | 147 | } |
| 148 | 148 | if (isset($valeurs['_meta_stockage'])) { |
| 149 | - $stockage = $valeurs['_meta_stockage'] . '::'; |
|
| 149 | + $stockage = $valeurs['_meta_stockage'].'::'; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | // si on indique juste une table, il faut vider les autres proprietes |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | // sinon cas analyse du squelette |
| 173 | 173 | if ( |
| 174 | - $f = find_in_path($form . '.' . _EXTENSION_SQUELETTES, 'formulaires/') |
|
| 174 | + $f = find_in_path($form.'.'._EXTENSION_SQUELETTES, 'formulaires/') |
|
| 175 | 175 | and lire_fichier($f, $contenu) |
| 176 | 176 | ) { |
| 177 | 177 | for ($i = 0; $i < 2; $i++) { |
@@ -228,14 +228,14 @@ discard block |
||
| 228 | 228 | lire_metas($table); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | - $prefixe = ($prefixe ? $prefixe . '_' : ''); |
|
| 231 | + $prefixe = ($prefixe ? $prefixe.'_' : ''); |
|
| 232 | 232 | $table = ($table) ? "/$table/" : ''; |
| 233 | - $casier = ($casier) ? rtrim($casier, '/') . '/' : ''; // slash final, sinon rien |
|
| 233 | + $casier = ($casier) ? rtrim($casier, '/').'/' : ''; // slash final, sinon rien |
|
| 234 | 234 | |
| 235 | 235 | foreach ($store as $k => $v) { |
| 236 | 236 | ecrire_config("$stockage$table$prefixe$casier$k", $v); |
| 237 | 237 | if (_request('var_mode') == 'configurer' and autoriser('webmestre')) { |
| 238 | - $trace .= "<br />table $table : " . $prefixe . $k . " = $v;"; |
|
| 238 | + $trace .= "<br />table $table : ".$prefixe.$k." = $v;"; |
|
| 239 | 239 | } |
| 240 | 240 | } |
| 241 | 241 | |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | [$table, $casier, $prefixe, $stockage] = cvtconf_definir_configurer_conteneur($form, $valeurs); |
| 253 | 253 | |
| 254 | 254 | $table = ($table) ? "/$table/" : ''; |
| 255 | - $prefixe = ($prefixe ? $prefixe . '_' : ''); |
|
| 255 | + $prefixe = ($prefixe ? $prefixe.'_' : ''); |
|
| 256 | 256 | if ($casier) { |
| 257 | 257 | $meta = lire_config("$stockage$table$prefixe$casier"); |
| 258 | 258 | $prefixe = ''; |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | |
| 264 | 264 | foreach ($valeurs as $k => $v) { |
| 265 | 265 | if (substr($k, 0, 1) !== '_') { |
| 266 | - $valeurs[$k] = ($meta[$prefixe . $k] ?? null); |
|
| 266 | + $valeurs[$k] = ($meta[$prefixe.$k] ?? null); |
|
| 267 | 267 | } |
| 268 | 268 | } |
| 269 | 269 | } |
@@ -73,16 +73,16 @@ discard block |
||
| 73 | 73 | protected $_lcount = 19; |
| 74 | 74 | protected $_vcount = 21; |
| 75 | 75 | protected $_tcount = 28; |
| 76 | - protected $_ncount = 588; // _vcount * _tcount |
|
| 76 | + protected $_ncount = 588; // _vcount * _tcount |
|
| 77 | 77 | protected $_scount = 11172; // _lcount * _tcount * _vcount |
| 78 | 78 | protected $_error = false; |
| 79 | 79 | protected static $_mb_string_overload = null; |
| 80 | 80 | // See {@link set_paramter()} for details of how to change the following |
| 81 | 81 | // settings from within your script / application |
| 82 | - protected $_api_encoding = 'utf8'; // Default input charset is UTF-8 |
|
| 83 | - protected $_allow_overlong = false; // Overlong UTF-8 encodings are forbidden |
|
| 84 | - protected $_strict_mode = false; // Behave strict or not |
|
| 85 | - protected $_idn_version = 2003; // Can be either 2003 (old, default) or 2008 |
|
| 82 | + protected $_api_encoding = 'utf8'; // Default input charset is UTF-8 |
|
| 83 | + protected $_allow_overlong = false; // Overlong UTF-8 encodings are forbidden |
|
| 84 | + protected $_strict_mode = false; // Behave strict or not |
|
| 85 | + protected $_idn_version = 2003; // Can be either 2003 (old, default) or 2008 |
|
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | 88 | * the constructor |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $this->_api_encoding = $v; |
| 141 | 141 | break; |
| 142 | 142 | default: |
| 143 | - $this->_error('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k); |
|
| 143 | + $this->_error('Set Parameter: Unknown parameter '.$v.' for option '.$k); |
|
| 144 | 144 | return false; |
| 145 | 145 | } |
| 146 | 146 | break; |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | if (in_array($v, array('2003', '2008'))) { |
| 155 | 155 | $this->_idn_version = $v; |
| 156 | 156 | } else { |
| 157 | - $this->_error('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k); |
|
| 157 | + $this->_error('Set Parameter: Unknown parameter '.$v.' for option '.$k); |
|
| 158 | 158 | } |
| 159 | 159 | break; |
| 160 | 160 | case 'encode_german_sz': // Deprecated |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | break; |
| 167 | 167 | default: |
| 168 | - $this->_error('Set Parameter: Unknown option ' . $k); |
|
| 168 | + $this->_error('Set Parameter: Unknown option '.$k); |
|
| 169 | 169 | return false; |
| 170 | 170 | } |
| 171 | 171 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | case 'ucs4_array': |
| 189 | 189 | break; |
| 190 | 190 | default: |
| 191 | - $this->_error('Unknown encoding ' . $one_time_encoding); |
|
| 191 | + $this->_error('Unknown encoding '.$one_time_encoding); |
|
| 192 | 192 | return false; |
| 193 | 193 | } |
| 194 | 194 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | [$email_pref, $input] = explode('@', $input, 2); |
| 207 | 207 | $arr = explode('.', $input); |
| 208 | 208 | foreach ($arr as $k => $v) { |
| 209 | - if (preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $v)) { |
|
| 209 | + if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) { |
|
| 210 | 210 | $conv = $this->_decode($v); |
| 211 | 211 | if ($conv) { |
| 212 | 212 | $arr[$k] = $conv; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $input = join('.', $arr); |
| 217 | 217 | $arr = explode('.', $email_pref); |
| 218 | 218 | foreach ($arr as $k => $v) { |
| 219 | - if (preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $v)) { |
|
| 219 | + if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) { |
|
| 220 | 220 | $conv = $this->_decode($v); |
| 221 | 221 | if ($conv) { |
| 222 | 222 | $arr[$k] = $conv; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | $email_pref = join('.', $arr); |
| 227 | - $return = $email_pref . '@' . $input; |
|
| 227 | + $return = $email_pref.'@'.$input; |
|
| 228 | 228 | } elseif (preg_match('![:\./]!', $input)) { // Or a complete domain name (with or without paths / parameters) |
| 229 | 229 | // No no in strict mode |
| 230 | 230 | if ($this->_strict_mode) { |
@@ -241,13 +241,13 @@ discard block |
||
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | $parsed['host'] = join('.', $arr); |
| 244 | - $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'] . (strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')). |
|
| 245 | - (empty($parsed['user']) ? '' : $parsed['user'] . (empty($parsed['pass']) ? '' : ':' . $parsed['pass']) . '@'). |
|
| 244 | + $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'].(strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')). |
|
| 245 | + (empty($parsed['user']) ? '' : $parsed['user'].(empty($parsed['pass']) ? '' : ':'.$parsed['pass']).'@'). |
|
| 246 | 246 | $parsed['host']. |
| 247 | - (empty($parsed['port']) ? '' : ':' . $parsed['port']). |
|
| 247 | + (empty($parsed['port']) ? '' : ':'.$parsed['port']). |
|
| 248 | 248 | (empty($parsed['path']) ? '' : $parsed['path']). |
| 249 | - (empty($parsed['query']) ? '' : '?' . $parsed['query']). |
|
| 250 | - (empty($parsed['fragment']) ? '' : '#' . $parsed['fragment']); |
|
| 249 | + (empty($parsed['query']) ? '' : '?'.$parsed['query']). |
|
| 250 | + (empty($parsed['fragment']) ? '' : '#'.$parsed['fragment']); |
|
| 251 | 251 | } else { // parse_url seems to have failed, try without it |
| 252 | 252 | $arr = explode('.', $input); |
| 253 | 253 | foreach ($arr as $k => $v) { |
@@ -265,8 +265,8 @@ discard block |
||
| 265 | 265 | // The output is UTF-8 by default, other output formats need conversion here |
| 266 | 266 | // If one time encoding is given, use this, else the objects property |
| 267 | 267 | switch ($one_time_encoding ?: $this->_api_encoding) { |
| 268 | - case 'utf8': return $return; // break; |
|
| 269 | - case 'ucs4_string': return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); // break; |
|
| 268 | + case 'utf8' : return $return; // break; |
|
| 269 | + case 'ucs4_string': return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); // break; |
|
| 270 | 270 | case 'ucs4_array': return $this->_utf8_to_ucs4($return); // break; |
| 271 | 271 | default: $this->_error('Unsupported output format'); return false; |
| 272 | 272 | } |
@@ -283,15 +283,14 @@ discard block |
||
| 283 | 283 | // Forcing conversion of input to UCS4 array |
| 284 | 284 | // If one time encoding is given, use this, else the objects property |
| 285 | 285 | switch ($one_time_encoding ?: $this->_api_encoding) { |
| 286 | - case 'utf8': |
|
| 287 | - $decoded = $this->_utf8_to_ucs4($decoded); |
|
| 286 | + case 'utf8' : $decoded = $this->_utf8_to_ucs4($decoded); |
|
| 288 | 287 | break; |
| 289 | 288 | case 'ucs4_string': |
| 290 | 289 | $decoded = $this->_ucs4_string_to_ucs4($decoded); |
| 291 | 290 | case 'ucs4_array': |
| 292 | 291 | break; |
| 293 | 292 | default: |
| 294 | - $this->_error('Unsupported input format: ' . ($one_time_encoding ?: $this->_api_encoding)); |
|
| 293 | + $this->_error('Unsupported input format: '.($one_time_encoding ?: $this->_api_encoding)); |
|
| 295 | 294 | return false; |
| 296 | 295 | } |
| 297 | 296 | |
@@ -380,13 +379,13 @@ discard block |
||
| 380 | 379 | } |
| 381 | 380 | } |
| 382 | 381 | $parsed['host'] = join('.', $arr); |
| 383 | - $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'] . (strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')). |
|
| 384 | - (empty($parsed['user']) ? '' : $parsed['user'] . (empty($parsed['pass']) ? '' : ':' . $parsed['pass']) . '@'). |
|
| 382 | + $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'].(strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')). |
|
| 383 | + (empty($parsed['user']) ? '' : $parsed['user'].(empty($parsed['pass']) ? '' : ':'.$parsed['pass']).'@'). |
|
| 385 | 384 | $parsed['host']. |
| 386 | - (empty($parsed['port']) ? '' : ':' . $parsed['port']). |
|
| 385 | + (empty($parsed['port']) ? '' : ':'.$parsed['port']). |
|
| 387 | 386 | (empty($parsed['path']) ? '' : $parsed['path']). |
| 388 | - (empty($parsed['query']) ? '' : '?' . $parsed['query']). |
|
| 389 | - (empty($parsed['fragment']) ? '' : '#' . $parsed['fragment']); |
|
| 387 | + (empty($parsed['query']) ? '' : '?'.$parsed['query']). |
|
| 388 | + (empty($parsed['fragment']) ? '' : '#'.$parsed['fragment']); |
|
| 390 | 389 | return $return; |
| 391 | 390 | } |
| 392 | 391 | |
@@ -409,11 +408,11 @@ discard block |
||
| 409 | 408 | { |
| 410 | 409 | $decoded = array(); |
| 411 | 410 | // find the Punycode prefix |
| 412 | - if (!preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $encoded)) { |
|
| 411 | + if (!preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $encoded)) { |
|
| 413 | 412 | $this->_error('This is not a punycode string'); |
| 414 | 413 | return false; |
| 415 | 414 | } |
| 416 | - $encode_test = preg_replace('!^' . preg_quote($this->_punycode_prefix, '!') . '!', '', $encoded); |
|
| 415 | + $encode_test = preg_replace('!^'.preg_quote($this->_punycode_prefix, '!').'!', '', $encoded); |
|
| 417 | 416 | // If nothing left after removing the prefix, it is hopeless |
| 418 | 417 | if (!$encode_test) { |
| 419 | 418 | $this->_error('The given encoded string was empty'); |
@@ -439,8 +438,7 @@ discard block |
||
| 439 | 438 | for ($old_idx = $idx, $w = 1, $k = $this->_base; 1; $k += $this->_base) { |
| 440 | 439 | $digit = $this->_decode_digit($encoded[$enco_idx++]); |
| 441 | 440 | $idx += $digit * $w; |
| 442 | - $t = ($k <= $bias) ? $this->_tmin : |
|
| 443 | - (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias)); |
|
| 441 | + $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias)); |
|
| 444 | 442 | if ($digit < $t) { |
| 445 | 443 | break; |
| 446 | 444 | } |
@@ -513,7 +511,7 @@ discard block |
||
| 513 | 511 | return $encoded; // All codepoints were basic ones |
| 514 | 512 | } |
| 515 | 513 | // Start with the prefix; copy it to output |
| 516 | - $encoded = $this->_punycode_prefix . $encoded; |
|
| 514 | + $encoded = $this->_punycode_prefix.$encoded; |
|
| 517 | 515 | // If we have basic code points in output, add an hyphen to the end |
| 518 | 516 | if ($codecount) { |
| 519 | 517 | $encoded .= '-'; |
@@ -540,8 +538,7 @@ discard block |
||
| 540 | 538 | $delta++; |
| 541 | 539 | } elseif ($decoded[$i] == $cur_code) { |
| 542 | 540 | for ($q = $delta, $k = $this->_base; 1; $k += $this->_base) { |
| 543 | - $t = ($k <= $bias) ? $this->_tmin : |
|
| 544 | - (($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias); |
|
| 541 | + $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias); |
|
| 545 | 542 | if ($q < $t) { |
| 546 | 543 | break; |
| 547 | 544 | } |
@@ -628,12 +625,12 @@ discard block |
||
| 628 | 625 | } |
| 629 | 626 | // Try to find prohibited input |
| 630 | 627 | if (in_array($v, self::$NP['prohibit']) || in_array($v, self::$NP['general_prohibited'])) { |
| 631 | - $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v)); |
|
| 628 | + $this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v)); |
|
| 632 | 629 | return false; |
| 633 | 630 | } |
| 634 | 631 | foreach (self::$NP['prohibit_ranges'] as $range) { |
| 635 | 632 | if ($range[0] <= $v && $v <= $range[1]) { |
| 636 | - $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v)); |
|
| 633 | + $this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v)); |
|
| 637 | 634 | return false; |
| 638 | 635 | } |
| 639 | 636 | } |
@@ -871,7 +868,7 @@ discard block |
||
| 871 | 868 | $output[$out_len] = $v; |
| 872 | 869 | ++$out_len; |
| 873 | 870 | if ('add' == $mode) { |
| 874 | - $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k); |
|
| 871 | + $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte '.$k); |
|
| 875 | 872 | return false; |
| 876 | 873 | } |
| 877 | 874 | continue; |
@@ -896,7 +893,7 @@ discard block |
||
| 896 | 893 | $next_byte = 4; |
| 897 | 894 | $v = ($v - 252) << 30; |
| 898 | 895 | } else { |
| 899 | - $this->_error('This might be UTF-8, but I don\'t understand it at byte ' . $k); |
|
| 896 | + $this->_error('This might be UTF-8, but I don\'t understand it at byte '.$k); |
|
| 900 | 897 | return false; |
| 901 | 898 | } |
| 902 | 899 | if ('add' == $mode) { |
@@ -909,7 +906,7 @@ discard block |
||
| 909 | 906 | if (!$this->_allow_overlong && $test == 'range') { |
| 910 | 907 | $test = 'none'; |
| 911 | 908 | if (($v < 0xA0 && $start_byte == 0xE0) || ($v < 0x90 && $start_byte == 0xF0) || ($v > 0x8F && $start_byte == 0xF4)) { |
| 912 | - $this->_error('Bogus UTF-8 character detected (out of legal range) at byte ' . $k); |
|
| 909 | + $this->_error('Bogus UTF-8 character detected (out of legal range) at byte '.$k); |
|
| 913 | 910 | return false; |
| 914 | 911 | } |
| 915 | 912 | } |
@@ -918,7 +915,7 @@ discard block |
||
| 918 | 915 | $output[($out_len - 1)] += $v; |
| 919 | 916 | --$next_byte; |
| 920 | 917 | } else { |
| 921 | - $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k); |
|
| 918 | + $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte '.$k); |
|
| 922 | 919 | return false; |
| 923 | 920 | } |
| 924 | 921 | if ($next_byte < 0) { |
@@ -942,13 +939,13 @@ discard block |
||
| 942 | 939 | if ($v < 128) { // 7bit are transferred literally |
| 943 | 940 | $output .= chr($v); |
| 944 | 941 | } elseif ($v < (1 << 11)) { // 2 bytes |
| 945 | - $output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63)); |
|
| 942 | + $output .= chr(192 + ($v >> 6)).chr(128 + ($v & 63)); |
|
| 946 | 943 | } elseif ($v < (1 << 16)) { // 3 bytes |
| 947 | - $output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); |
|
| 944 | + $output .= chr(224 + ($v >> 12)).chr(128 + (($v >> 6) & 63)).chr(128 + ($v & 63)); |
|
| 948 | 945 | } elseif ($v < (1 << 21)) { // 4 bytes |
| 949 | - $output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); |
|
| 946 | + $output .= chr(240 + ($v >> 18)).chr(128 + (($v >> 12) & 63)).chr(128 + (($v >> 6) & 63)).chr(128 + ($v & 63)); |
|
| 950 | 947 | } else { |
| 951 | - $this->_error('Conversion from UCS-4 to UTF-8 failed: malformed input at byte ' . $k); |
|
| 948 | + $this->_error('Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k); |
|
| 952 | 949 | return false; |
| 953 | 950 | } |
| 954 | 951 | } |
@@ -967,7 +964,7 @@ discard block |
||
| 967 | 964 | // Take array values and split output to 4 bytes per value |
| 968 | 965 | // The bit mask is 255, which reads &11111111 |
| 969 | 966 | foreach ($input as $v) { |
| 970 | - $output .= chr(($v >> 24) & 255) . chr(($v >> 16) & 255) . chr(($v >> 8) & 255) . chr($v & 255); |
|
| 967 | + $output .= chr(($v >> 24) & 255).chr(($v >> 16) & 255).chr(($v >> 8) & 255).chr($v & 255); |
|
| 971 | 968 | } |
| 972 | 969 | return $output; |
| 973 | 970 | } |
@@ -997,7 +994,7 @@ discard block |
||
| 997 | 994 | $out_len++; |
| 998 | 995 | $output[$out_len] = 0; |
| 999 | 996 | } |
| 1000 | - $output[$out_len] += ord($input[$i]) << (8 * (3 - ($i % 4) ) ); |
|
| 997 | + $output[$out_len] += ord($input[$i]) << (8 * (3 - ($i % 4))); |
|
| 1001 | 998 | } |
| 1002 | 999 | return $output; |
| 1003 | 1000 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | /** l'adresse du repertoire de telechargement et de decompactage des plugins */ |
| 24 | 24 | if (!defined('_DIR_PLUGINS_AUTO')) { |
| 25 | - define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/'); |
|
| 25 | + define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins. |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | if ($dir) { |
| 374 | 374 | $dir .= '/'; |
| 375 | 375 | } |
| 376 | - $dir .= 'procure:' . $procure['nom']; |
|
| 376 | + $dir .= 'procure:'.$procure['nom']; |
|
| 377 | 377 | |
| 378 | 378 | $procure['etat'] = '?'; |
| 379 | 379 | $procure['dir_type'] = $resume['dir_type']; |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | $plug = $resume['dir']; |
| 558 | 558 | $k = $infos[$dir_type][$plug]; |
| 559 | 559 | |
| 560 | - $plug = constant($dir_type) . $plug; |
|
| 560 | + $plug = constant($dir_type).$plug; |
|
| 561 | 561 | if (!isset($msg[$p])) { |
| 562 | 562 | if (isset($resume['erreur']) and $resume['erreur']) { |
| 563 | 563 | $msg[$p] = [$resume['erreur']]; |
@@ -600,10 +600,10 @@ discard block |
||
| 600 | 600 | $list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation']; |
| 601 | 601 | } elseif (!$raw) { |
| 602 | 602 | foreach ($list as $plug => $msg) { |
| 603 | - $list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug]) |
|
| 604 | - . '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>'; |
|
| 603 | + $list[$plug] = '<li>'._T('plugin_impossible_activer', ['plugin' => $plug]) |
|
| 604 | + . '<ul><li>'.implode('</li><li>', $msg).'</li></ul></li>'; |
|
| 605 | 605 | } |
| 606 | - $list = '<ul>' . join("\n", $list) . '</ul>'; |
|
| 606 | + $list = '<ul>'.join("\n", $list).'</ul>'; |
|
| 607 | 607 | } |
| 608 | 608 | if ($raz) { |
| 609 | 609 | effacer_meta('plugin_erreur_activation'); |
@@ -717,13 +717,13 @@ discard block |
||
| 717 | 717 | if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) { |
| 718 | 718 | return _T("plugin_${balise}_${type}", [ |
| 719 | 719 | 'plugin' => $nom, |
| 720 | - 'version' => ' ≥ ' . $minimum |
|
| 720 | + 'version' => ' ≥ '.$minimum |
|
| 721 | 721 | ]); |
| 722 | 722 | } |
| 723 | 723 | if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) { |
| 724 | 724 | return _T("plugin_${balise}_${type}", [ |
| 725 | 725 | 'plugin' => $nom, |
| 726 | - 'version' => ' > ' . $minimum |
|
| 726 | + 'version' => ' > '.$minimum |
|
| 727 | 727 | ]); |
| 728 | 728 | } |
| 729 | 729 | } |
@@ -732,13 +732,13 @@ discard block |
||
| 732 | 732 | if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) { |
| 733 | 733 | return _T("plugin_${balise}_${type}", [ |
| 734 | 734 | 'plugin' => $nom, |
| 735 | - 'version' => ' ≤ ' . $maximum |
|
| 735 | + 'version' => ' ≤ '.$maximum |
|
| 736 | 736 | ]); |
| 737 | 737 | } |
| 738 | 738 | if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) { |
| 739 | 739 | return _T("plugin_${balise}_plugin", [ |
| 740 | 740 | 'plugin' => $nom, |
| 741 | - 'version' => ' < ' . $maximum |
|
| 741 | + 'version' => ' < '.$maximum |
|
| 742 | 742 | ]); |
| 743 | 743 | } |
| 744 | 744 | } |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | include_spip('inc/charger_plugin'); |
| 758 | 758 | $url = '<br />' . bouton_telechargement_plugin($url, 'lib'); |
| 759 | 759 | }*/ |
| 760 | - return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>"; |
|
| 760 | + return _T('plugin_necessite_lib', ['lib' => $lib])." <a href='$url'>$url</a>"; |
|
| 761 | 761 | } |
| 762 | 762 | |
| 763 | 763 | |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | foreach ($plugin_valides as $p => $resume) { |
| 858 | 858 | // Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP |
| 859 | 859 | if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') { |
| 860 | - $header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : ''); |
|
| 860 | + $header[] = $p.($resume['version'] ? '('.$resume['version'].')' : ''); |
|
| 861 | 861 | } |
| 862 | 862 | if ($resume['dir']) { |
| 863 | 863 | foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) { |
@@ -882,11 +882,11 @@ discard block |
||
| 882 | 882 | $header = strtolower(implode(',', $header)); |
| 883 | 883 | if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) { |
| 884 | 884 | ecrire_fichier( |
| 885 | - _DIR_VAR . 'config.txt', |
|
| 886 | - (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header |
|
| 885 | + _DIR_VAR.'config.txt', |
|
| 886 | + (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP').' '.$GLOBALS['spip_version_affichee'].' @ www.spip.net + '.$header |
|
| 887 | 887 | ); |
| 888 | 888 | } else { |
| 889 | - @unlink(_DIR_VAR . 'config.txt'); |
|
| 889 | + @unlink(_DIR_VAR.'config.txt'); |
|
| 890 | 890 | } |
| 891 | 891 | // generer charger_plugins_chemin.php |
| 892 | 892 | plugins_precompile_chemin($plugin_valides, $ordre); |
@@ -940,7 +940,7 @@ discard block |
||
| 940 | 940 | // definir le plugin, donc le path avant l'include du fichier options |
| 941 | 941 | // permet de faire des include_spip pour attraper un inc_ du plugin |
| 942 | 942 | |
| 943 | - $dir = $dir_type . ".'" . $plug . "/'"; |
|
| 943 | + $dir = $dir_type.".'".$plug."/'"; |
|
| 944 | 944 | |
| 945 | 945 | $prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix'])); |
| 946 | 946 | if ( |
@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | if (!$info['chemin']) { |
| 952 | 952 | $chemins['public'][] = "_DIR_PLUGIN_$prefix"; |
| 953 | 953 | $chemins['prive'][] = "_DIR_PLUGIN_$prefix"; |
| 954 | - if (is_dir(constant($dir_type) . $plug . '/squelettes/')) { |
|
| 954 | + if (is_dir(constant($dir_type).$plug.'/squelettes/')) { |
|
| 955 | 955 | $chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'"; |
| 956 | 956 | } |
| 957 | 957 | } |
@@ -972,13 +972,13 @@ discard block |
||
| 972 | 972 | $dir = ''; |
| 973 | 973 | } |
| 974 | 974 | if (strlen($dir)) { |
| 975 | - $dir = rtrim($dir, '/') . '/'; |
|
| 975 | + $dir = rtrim($dir, '/').'/'; |
|
| 976 | 976 | } |
| 977 | 977 | if (!isset($chemin['type']) or $chemin['type'] == 'public') { |
| 978 | - $chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ''); |
|
| 978 | + $chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ''); |
|
| 979 | 979 | } |
| 980 | 980 | if (!isset($chemin['type']) or $chemin['type'] == 'prive') { |
| 981 | - $chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ''); |
|
| 981 | + $chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ''); |
|
| 982 | 982 | } |
| 983 | 983 | } |
| 984 | 984 | } |
@@ -987,11 +987,11 @@ discard block |
||
| 987 | 987 | } |
| 988 | 988 | } |
| 989 | 989 | if (count($chemins['public']) or count($chemins['prive'])) { |
| 990 | - $contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode( |
|
| 990 | + $contenu .= 'if (_DIR_RESTREINT) _chemin(['.implode( |
|
| 991 | 991 | ',', |
| 992 | 992 | array_reverse($chemins['public']) |
| 993 | - ) . "]);\n" |
|
| 994 | - . 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n"; |
|
| 993 | + )."]);\n" |
|
| 994 | + . 'else _chemin(['.implode(',', array_reverse($chemins['prive']))."]);\n"; |
|
| 995 | 995 | } |
| 996 | 996 | |
| 997 | 997 | ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu); |
@@ -1040,7 +1040,7 @@ discard block |
||
| 1040 | 1040 | and strpos($dir, ':') === false // exclure le cas des procure: |
| 1041 | 1041 | and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml |
| 1042 | 1042 | ) { |
| 1043 | - if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) { |
|
| 1043 | + if (is_readable("$dir$plug/".($file = $info['prefix'].'_'.$charge.'.php'))) { |
|
| 1044 | 1044 | $info[$charge] = [$file]; |
| 1045 | 1045 | } |
| 1046 | 1046 | } |
@@ -1057,7 +1057,7 @@ discard block |
||
| 1057 | 1057 | ) { |
| 1058 | 1058 | unset($info[$charge][$k]); |
| 1059 | 1059 | } else { |
| 1060 | - $_file = $root_dir_type . ".'$plug/$file'"; |
|
| 1060 | + $_file = $root_dir_type.".'$plug/$file'"; |
|
| 1061 | 1061 | $contenu[$charge] .= "include_once_check($_file);\n"; |
| 1062 | 1062 | } |
| 1063 | 1063 | } |
@@ -1067,7 +1067,7 @@ discard block |
||
| 1067 | 1067 | } |
| 1068 | 1068 | } |
| 1069 | 1069 | |
| 1070 | - $contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options']; |
|
| 1070 | + $contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options']; |
|
| 1071 | 1071 | $contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons) |
| 1072 | 1072 | . plugin_ongletbouton('onglets_plugins', $onglets); |
| 1073 | 1073 | |
@@ -1102,12 +1102,12 @@ discard block |
||
| 1102 | 1102 | define("_UPDATED_$nom", $val); |
| 1103 | 1103 | define("_UPDATED_md5_$nom", $md5); |
| 1104 | 1104 | } |
| 1105 | - $val = "unserialize('" . str_replace("'", "\'", $val) . "')"; |
|
| 1105 | + $val = "unserialize('".str_replace("'", "\'", $val)."')"; |
|
| 1106 | 1106 | |
| 1107 | 1107 | return |
| 1108 | 1108 | "if (!function_exists('$nom')) {\n" |
| 1109 | 1109 | . "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n" |
| 1110 | - . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n" |
|
| 1110 | + . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n" |
|
| 1111 | 1111 | . "}\n"; |
| 1112 | 1112 | } |
| 1113 | 1113 | |
@@ -1130,7 +1130,7 @@ discard block |
||
| 1130 | 1130 | if (@is_readable(_CACHE_PLUGINS_OPT)) { |
| 1131 | 1131 | include_once(_CACHE_PLUGINS_OPT); |
| 1132 | 1132 | } else { |
| 1133 | - spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT); |
|
| 1133 | + spip_log('pipelines desactives: impossible de produire '._CACHE_PLUGINS_OPT); |
|
| 1134 | 1134 | } |
| 1135 | 1135 | } |
| 1136 | 1136 | |
@@ -1167,7 +1167,7 @@ discard block |
||
| 1167 | 1167 | $dir_type = $plugin_valides[$p]['dir_type']; |
| 1168 | 1168 | $root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type); |
| 1169 | 1169 | $plug = $plugin_valides[$p]['dir']; |
| 1170 | - $prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_'); |
|
| 1170 | + $prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'].'_'); |
|
| 1171 | 1171 | if (isset($info['pipeline']) and is_array($info['pipeline'])) { |
| 1172 | 1172 | foreach ($info['pipeline'] as $pipe) { |
| 1173 | 1173 | $nom = $pipe['nom']; |
@@ -1201,7 +1201,7 @@ discard block |
||
| 1201 | 1201 | } |
| 1202 | 1202 | if (isset($pipe['inclure'])) { |
| 1203 | 1203 | $GLOBALS['spip_matrice']["$prefix$action"] = |
| 1204 | - "$root_dir_type:$plug/" . $pipe['inclure']; |
|
| 1204 | + "$root_dir_type:$plug/".$pipe['inclure']; |
|
| 1205 | 1205 | } |
| 1206 | 1206 | } |
| 1207 | 1207 | } |
@@ -1211,7 +1211,7 @@ discard block |
||
| 1211 | 1211 | $prepend_code['taches_generales_cron'] = ''; |
| 1212 | 1212 | } |
| 1213 | 1213 | foreach ($info['genie'] as $genie) { |
| 1214 | - $nom = $prefix . $genie['nom']; |
|
| 1214 | + $nom = $prefix.$genie['nom']; |
|
| 1215 | 1215 | $periode = max(60, intval($genie['periode'])); |
| 1216 | 1216 | if (charger_fonction($nom, 'genie', true)) { |
| 1217 | 1217 | $prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n"; |
@@ -1229,13 +1229,13 @@ discard block |
||
| 1229 | 1229 | } |
| 1230 | 1230 | foreach ($info['style'] as $style) { |
| 1231 | 1231 | if (isset($style['path']) and $style['path']) { |
| 1232 | - $code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) "; |
|
| 1232 | + $code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) "; |
|
| 1233 | 1233 | } else { |
| 1234 | - $code = "if (\$f='" . addslashes($style['url']) . "') "; |
|
| 1234 | + $code = "if (\$f='".addslashes($style['url'])."') "; |
|
| 1235 | 1235 | } |
| 1236 | 1236 | $code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\""; |
| 1237 | 1237 | if (isset($style['media']) and strlen($style['media'])) { |
| 1238 | - $code .= ' media="' . addslashes($style['media']) . '"'; |
|
| 1238 | + $code .= ' media="'.addslashes($style['media']).'"'; |
|
| 1239 | 1239 | } |
| 1240 | 1240 | $code .= "/>';\n"; |
| 1241 | 1241 | if ($style['type'] != 'prive') { |
@@ -1255,9 +1255,9 @@ discard block |
||
| 1255 | 1255 | if (isset($info['script']) and is_countable($info['script']) ? count($info['script']) : 0) { |
| 1256 | 1256 | foreach ($info['script'] as $script) { |
| 1257 | 1257 | if (isset($script['path']) and $script['path']) { |
| 1258 | - $code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) "; |
|
| 1258 | + $code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) "; |
|
| 1259 | 1259 | } else { |
| 1260 | - $code = "if (\$f='" . addslashes($script['url']) . "') "; |
|
| 1260 | + $code = "if (\$f='".addslashes($script['url'])."') "; |
|
| 1261 | 1261 | } |
| 1262 | 1262 | $code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n"; |
| 1263 | 1263 | if ($script['type'] != 'prive') { |
@@ -1320,10 +1320,10 @@ discard block |
||
| 1320 | 1320 | unset($GLOBALS['spip_pipeline']['all']); |
| 1321 | 1321 | $all_pipes = trim(array_shift($a)); |
| 1322 | 1322 | if ($all_pipes) { |
| 1323 | - $all_pipes = '|' . ltrim($all_pipes, '|'); |
|
| 1323 | + $all_pipes = '|'.ltrim($all_pipes, '|'); |
|
| 1324 | 1324 | } |
| 1325 | 1325 | if (count($a)) { |
| 1326 | - $all_pipes_end = '||' . array_shift($a); |
|
| 1326 | + $all_pipes_end = '||'.array_shift($a); |
|
| 1327 | 1327 | } |
| 1328 | 1328 | } |
| 1329 | 1329 | $content = ''; |
@@ -1340,7 +1340,7 @@ discard block |
||
| 1340 | 1340 | // Eclater le pipeline en filtres et appliquer chaque filtre |
| 1341 | 1341 | foreach ($pipe as $fonc) { |
| 1342 | 1342 | $fonc = trim($fonc); |
| 1343 | - $s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n"; |
|
| 1343 | + $s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n"; |
|
| 1344 | 1344 | if (isset($GLOBALS['spip_matrice'][$fonc])) { |
| 1345 | 1345 | $file = $GLOBALS['spip_matrice'][$fonc]; |
| 1346 | 1346 | $file = "'$file'"; |
@@ -1351,7 +1351,7 @@ discard block |
||
| 1351 | 1351 | if (defined($root_dir)) { |
| 1352 | 1352 | $dir = $root_dir; |
| 1353 | 1353 | } |
| 1354 | - $file = str_replace($regs[0], "'." . $dir . ".'", $file); |
|
| 1354 | + $file = str_replace($regs[0], "'.".$dir.".'", $file); |
|
| 1355 | 1355 | $file = str_replace("''.", '', $file); |
| 1356 | 1356 | $file = str_replace(constant($dir), '', $file); |
| 1357 | 1357 | } |
@@ -1364,7 +1364,7 @@ discard block |
||
| 1364 | 1364 | $content .= "// Pipeline $action \n" |
| 1365 | 1365 | . "function execute_pipeline_$action(&\$val){\n" |
| 1366 | 1366 | . $s_inc |
| 1367 | - . ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '') |
|
| 1367 | + . ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '') |
|
| 1368 | 1368 | . $s_call |
| 1369 | 1369 | . "return \$val;\n}\n"; |
| 1370 | 1370 | } |
@@ -1420,9 +1420,9 @@ discard block |
||
| 1420 | 1420 | $result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec')); |
| 1421 | 1421 | if (_IS_CLI) { |
| 1422 | 1422 | include_spip('inc/filtres'); |
| 1423 | - $trace = ltrim(textebrut($trace) . "\n" . $result); |
|
| 1424 | - $trace = ' ' . str_replace("\n", "\n ", $trace); |
|
| 1425 | - echo "\n" . ($ok ? 'OK ' : '/!\ ') . textebrut($titre) . "\n", |
|
| 1423 | + $trace = ltrim(textebrut($trace)."\n".$result); |
|
| 1424 | + $trace = ' '.str_replace("\n", "\n ", $trace); |
|
| 1425 | + echo "\n".($ok ? 'OK ' : '/!\ ').textebrut($titre)."\n", |
|
| 1426 | 1426 | $trace, |
| 1427 | 1427 | "\n"; |
| 1428 | 1428 | } |
@@ -1457,15 +1457,15 @@ discard block |
||
| 1457 | 1457 | $GLOBALS['fichier_php_compile_recent'] = 0; |
| 1458 | 1458 | } |
| 1459 | 1459 | |
| 1460 | - $contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>'; |
|
| 1460 | + $contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>'; |
|
| 1461 | 1461 | // si un fichier existe deja on verifie que son contenu change avant de l'ecraser |
| 1462 | 1462 | // si pas de modif on ne touche pas au fichier initial |
| 1463 | 1463 | if (file_exists($nom)) { |
| 1464 | 1464 | if (substr($nom, -4) == '.php') { |
| 1465 | - $fichier_tmp = substr($nom, 0, -4) . '.tmp.php'; |
|
| 1465 | + $fichier_tmp = substr($nom, 0, -4).'.tmp.php'; |
|
| 1466 | 1466 | } |
| 1467 | 1467 | else { |
| 1468 | - $fichier_tmp = $nom . '.tmp'; |
|
| 1468 | + $fichier_tmp = $nom.'.tmp'; |
|
| 1469 | 1469 | } |
| 1470 | 1470 | file_put_contents($fichier_tmp, $contenu); |
| 1471 | 1471 | if (md5_file($nom) == md5_file($fichier_tmp)) { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $_id = $e['id_table_objet']; |
| 51 | 51 | if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) { |
| 52 | 52 | $table = $e['table_objet_sql']; |
| 53 | - $row = sql_fetsel('*', $table, "$_id=" . intval($id)); |
|
| 53 | + $row = sql_fetsel('*', $table, "$_id=".intval($id)); |
|
| 54 | 54 | if (isset($row['id_rubrique'])) { |
| 55 | 55 | $contexte['id_rubrique'] = $row['id_rubrique']; |
| 56 | 56 | if (isset($row['id_secteur'])) { |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | $boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position) |
| 118 | 118 | + [ |
| 119 | 119 | $id => new Bouton( |
| 120 | - ($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 121 | - $infos['titre'], // titre |
|
| 120 | + ($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 121 | + $infos['titre'], // titre |
|
| 122 | 122 | (isset($infos['action']) and $infos['action']) ? $infos['action'] : null, |
| 123 | 123 | (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null |
| 124 | 124 | ) |
@@ -135,8 +135,8 @@ discard block |
||
| 135 | 135 | $boutons_admin = array_slice($boutons_admin, 0, $position) |
| 136 | 136 | + [ |
| 137 | 137 | $id => new Bouton( |
| 138 | - ($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 139 | - $infos['titre'], // titre |
|
| 138 | + ($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 139 | + $infos['titre'], // titre |
|
| 140 | 140 | (isset($infos['action']) and $infos['action']) ? $infos['action'] : null, |
| 141 | 141 | (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null |
| 142 | 142 | ) |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $libelles = $isfavoris = $favoris = []; |
| 182 | 182 | foreach ($menu->sousmenu as $key => $item) { |
| 183 | 183 | $libelles[$key] = strtolower(translitteration(_T($item->libelle))); |
| 184 | - $isfavoris[$key] = (bool)$item->favori; |
|
| 184 | + $isfavoris[$key] = (bool) $item->favori; |
|
| 185 | 185 | $favoris[$key] = $item->favori; |
| 186 | 186 | } |
| 187 | 187 | if ($avec_favoris) { |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $url = str_replace('&', '&', $url); |
| 224 | 224 | while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) { |
| 225 | 225 | if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) { |
| 226 | - $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique'])); |
|
| 226 | + $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($contexte['id_rubrique'])); |
|
| 227 | 227 | } |
| 228 | 228 | $val = _request($matches[2], $contexte); |
| 229 | 229 | $url = parametre_url($url, $matches[1], $val ?: '', '&'); |