@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $id_rubrique, |
| 151 | 151 | [ |
| 152 | 152 | 'data' => $set, |
| 153 | - 'nonvide' => ['titre' => _T('titre_nouvelle_rubrique') . ' ' . _T('info_numero_abbreviation') . $id_rubrique] |
|
| 153 | + 'nonvide' => ['titre' => _T('titre_nouvelle_rubrique').' '._T('info_numero_abbreviation').$id_rubrique] |
|
| 154 | 154 | ], |
| 155 | 155 | $c |
| 156 | 156 | ) |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | ) |
| 255 | 255 | ) { |
| 256 | 256 | if ($s['statut'] != 'prepa') { |
| 257 | - spip_log("deplacement de $id_rubrique vers $id_parent refuse a " . $GLOBALS['visiteur_session']['id_auteur'] . ' ' . $GLOBALS['visiteur_session']['statut']); |
|
| 257 | + spip_log("deplacement de $id_rubrique vers $id_parent refuse a ".$GLOBALS['visiteur_session']['id_auteur'].' '.$GLOBALS['visiteur_session']['statut']); |
|
| 258 | 258 | } |
| 259 | 259 | } elseif (editer_rubrique_breves($id_rubrique, $id_parent, $c)) { |
| 260 | 260 | $statut_ancien = $s['statut']; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | function extraire_date($texte): string { |
| 40 | 40 | // format = 2001-08 |
| 41 | 41 | if (preg_match(',([1-2][0-9]{3})[^0-9]*(1[0-2]|0?[1-9]),', $texte, $regs)) { |
| 42 | - return $regs[1] . '-' . sprintf('%02d', $regs[2]) . '-01'; |
|
| 42 | + return $regs[1].'-'.sprintf('%02d', $regs[2]).'-01'; |
|
| 43 | 43 | } |
| 44 | 44 | return ''; |
| 45 | 45 | } |
@@ -70,11 +70,11 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | if (preg_match('#^([12][0-9]{3})([-/]00)?( [-0-9:]+)?$#', $date, $regs)) { |
| 72 | 72 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 73 | - $date = $regs[1] . '-00-00' . $regs[3]; |
|
| 73 | + $date = $regs[1].'-00-00'.$regs[3]; |
|
| 74 | 74 | } else { |
| 75 | 75 | if (preg_match('#^([12][0-9]{3}[-/][01]?[0-9])([-/]00)?( [-0-9:]+)?$#', $date, $regs)) { |
| 76 | 76 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 77 | - $date = preg_replace('@/@', '-', $regs[1]) . '-00' . $regs[3]; |
|
| 77 | + $date = preg_replace('@/@', '-', $regs[1]).'-00'.$regs[3]; |
|
| 78 | 78 | } else { |
| 79 | 79 | $date = date('Y-m-d H:i:s', strtotime($date)); |
| 80 | 80 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $letexte ??= ''; |
| 102 | 102 | if ( |
| 103 | 103 | !$verif_format_date |
| 104 | - or (in_array(strlen($letexte), [10,19]) and |
|
| 104 | + or (in_array(strlen($letexte), [10, 19]) and |
|
| 105 | 105 | preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}(\s[0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $letexte)) |
| 106 | 106 | ) { |
| 107 | 107 | if (strncmp('0000-00-00', $letexte, 10) == 0) { |
@@ -388,17 +388,17 @@ discard block |
||
| 388 | 388 | if ($decal > 3600 * 24 * 30) { |
| 389 | 389 | $mois = floor($decal / (3600 * 24 * 30)); |
| 390 | 390 | if ($mois < 2) { |
| 391 | - $delai = "$mois " . _T('date_un_mois'); |
|
| 391 | + $delai = "$mois "._T('date_un_mois'); |
|
| 392 | 392 | } else { |
| 393 | - $delai = "$mois " . _T('date_mois'); |
|
| 393 | + $delai = "$mois "._T('date_mois'); |
|
| 394 | 394 | } |
| 395 | 395 | } else { |
| 396 | 396 | if ($decal > 3600 * 24 * 7) { |
| 397 | 397 | $semaines = floor($decal / (3600 * 24 * 7)); |
| 398 | 398 | if ($semaines < 2) { |
| 399 | - $delai = "$semaines " . _T('date_une_semaine'); |
|
| 399 | + $delai = "$semaines "._T('date_une_semaine'); |
|
| 400 | 400 | } else { |
| 401 | - $delai = "$semaines " . _T('date_semaines'); |
|
| 401 | + $delai = "$semaines "._T('date_semaines'); |
|
| 402 | 402 | } |
| 403 | 403 | } else { |
| 404 | 404 | if ($decal > 3600 * 24) { |
@@ -406,30 +406,30 @@ discard block |
||
| 406 | 406 | if ($jours < 2) { |
| 407 | 407 | return $il_y_a == 'date_dans' ? _T('date_demain') : _T('date_hier'); |
| 408 | 408 | } else { |
| 409 | - $delai = "$jours " . _T('date_jours'); |
|
| 409 | + $delai = "$jours "._T('date_jours'); |
|
| 410 | 410 | } |
| 411 | 411 | } else { |
| 412 | 412 | if ($decal >= 3600) { |
| 413 | 413 | $heures = floor($decal / 3600); |
| 414 | 414 | if ($heures < 2) { |
| 415 | - $delai = "$heures " . _T('date_une_heure'); |
|
| 415 | + $delai = "$heures "._T('date_une_heure'); |
|
| 416 | 416 | } else { |
| 417 | - $delai = "$heures " . _T('date_heures'); |
|
| 417 | + $delai = "$heures "._T('date_heures'); |
|
| 418 | 418 | } |
| 419 | 419 | } else { |
| 420 | 420 | if ($decal >= 60) { |
| 421 | 421 | $minutes = floor($decal / 60); |
| 422 | 422 | if ($minutes < 2) { |
| 423 | - $delai = "$minutes " . _T('date_une_minute'); |
|
| 423 | + $delai = "$minutes "._T('date_une_minute'); |
|
| 424 | 424 | } else { |
| 425 | - $delai = "$minutes " . _T('date_minutes'); |
|
| 425 | + $delai = "$minutes "._T('date_minutes'); |
|
| 426 | 426 | } |
| 427 | 427 | } else { |
| 428 | 428 | $secondes = ceil($decal); |
| 429 | 429 | if ($secondes < 2) { |
| 430 | - $delai = "$secondes " . _T('date_une_seconde'); |
|
| 430 | + $delai = "$secondes "._T('date_une_seconde'); |
|
| 431 | 431 | } else { |
| 432 | - $delai = "$secondes " . _T('date_secondes'); |
|
| 432 | + $delai = "$secondes "._T('date_secondes'); |
|
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | } |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | $njour = 0; |
| 523 | 523 | } else { |
| 524 | 524 | $njour = intval($jour); |
| 525 | - if ($jourth = _T('date_jnum' . $jour)) { |
|
| 525 | + if ($jourth = _T('date_jnum'.$jour)) { |
|
| 526 | 526 | $jour = $jourth; |
| 527 | 527 | } |
| 528 | 528 | } |
@@ -530,10 +530,10 @@ discard block |
||
| 530 | 530 | $mois = intval($mois); |
| 531 | 531 | if ($mois > 0 and $mois < 13) { |
| 532 | 532 | /* Traiter le cas "abbr" pour les noms de mois */ |
| 533 | - $param = ((isset($options['param']) and $options['param'] === 'abbr') ? '_' . $options['param'] : ''); |
|
| 534 | - $nommois = _T('date_mois_' . $mois . $param); |
|
| 533 | + $param = ((isset($options['param']) and $options['param'] === 'abbr') ? '_'.$options['param'] : ''); |
|
| 534 | + $nommois = _T('date_mois_'.$mois.$param); |
|
| 535 | 535 | if ($jour) { |
| 536 | - $jourmois = _T('date_de_mois_' . $mois, ['j' => $jour, 'nommois' => $nommois]); |
|
| 536 | + $jourmois = _T('date_de_mois_'.$mois, ['j' => $jour, 'nommois' => $nommois]); |
|
| 537 | 537 | } else { |
| 538 | 538 | $jourmois = $nommois; |
| 539 | 539 | } |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | if ($annee < 0) { |
| 546 | - $annee = -$annee . ' ' . _T('date_avant_jc'); |
|
| 546 | + $annee = -$annee.' '._T('date_avant_jc'); |
|
| 547 | 547 | $avjc = true; |
| 548 | 548 | } else { |
| 549 | 549 | $avjc = false; |
@@ -569,11 +569,11 @@ discard block |
||
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | if ($vue == 'saison') { |
| 572 | - return $saison ? _T('date_saison_' . $saison) : ''; |
|
| 572 | + return $saison ? _T('date_saison_'.$saison) : ''; |
|
| 573 | 573 | } else { |
| 574 | 574 | return $saison ? trim(_T( |
| 575 | 575 | 'date_fmt_saison_annee', |
| 576 | - ['saison' => _T('date_saison_' . $saison), 'annee' => $annee] |
|
| 576 | + ['saison' => _T('date_saison_'.$saison), 'annee' => $annee] |
|
| 577 | 577 | )) : ''; |
| 578 | 578 | } |
| 579 | 579 | |
@@ -650,9 +650,9 @@ discard block |
||
| 650 | 650 | } |
| 651 | 651 | $nom = mktime(1, 1, 1, $mois, $njour, $annee); |
| 652 | 652 | $nom = 1 + (int) date('w', $nom); |
| 653 | - $param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : ''); |
|
| 653 | + $param = ((isset($options['param']) and $options['param']) ? '_'.$options['param'] : ''); |
|
| 654 | 654 | |
| 655 | - return _T('date_jour_' . $nom . $param); |
|
| 655 | + return _T('date_jour_'.$nom.$param); |
|
| 656 | 656 | |
| 657 | 657 | case 'mois_annee': |
| 658 | 658 | if ($avjc) { |
@@ -1047,8 +1047,8 @@ discard block |
||
| 1047 | 1047 | |
| 1048 | 1048 | $dtstart = $dtend = $dtabbr = ''; |
| 1049 | 1049 | if (strpos($forme, 'hcal') !== false) { |
| 1050 | - $dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>"; |
|
| 1051 | - $dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>"; |
|
| 1050 | + $dtstart = "<abbr class='dtstart' title='".date_iso($date_debut)."'>"; |
|
| 1051 | + $dtend = "<abbr class='dtend' title='".date_iso($date_fin)."'>"; |
|
| 1052 | 1052 | $dtabbr = '</abbr>'; |
| 1053 | 1053 | } |
| 1054 | 1054 | |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | } |
| 1097 | 1097 | } else { |
| 1098 | 1098 | if ($dtabbr && $dtstart) { |
| 1099 | - $s = $dtstart . spip_ucfirst($s) . $dtabbr; |
|
| 1099 | + $s = $dtstart.spip_ucfirst($s).$dtabbr; |
|
| 1100 | 1100 | } else { |
| 1101 | 1101 | $s = spip_ucfirst($s); |
| 1102 | 1102 | } |
@@ -1119,8 +1119,8 @@ discard block |
||
| 1119 | 1119 | $date_debut = _T('date_fmt_jour_heure', ['jour' => $date_debut, 'heure' => $hd]); |
| 1120 | 1120 | $date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]); |
| 1121 | 1121 | } |
| 1122 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1123 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1122 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1123 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1124 | 1124 | |
| 1125 | 1125 | $s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]); |
| 1126 | 1126 | } else { |
@@ -1137,8 +1137,8 @@ discard block |
||
| 1137 | 1137 | $date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]); |
| 1138 | 1138 | } |
| 1139 | 1139 | |
| 1140 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1141 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1140 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1141 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1142 | 1142 | $s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]); |
| 1143 | 1143 | } |
| 1144 | 1144 | } |
@@ -1242,7 +1242,7 @@ discard block |
||
| 1242 | 1242 | $d = date('Y-m-d'); |
| 1243 | 1243 | } |
| 1244 | 1244 | |
| 1245 | - return substr($d, 0, 4) . substr($d, 5, 2) . substr($d, 8, 2); |
|
| 1245 | + return substr($d, 0, 4).substr($d, 5, 2).substr($d, 8, 2); |
|
| 1246 | 1246 | } |
| 1247 | 1247 | |
| 1248 | 1248 | /** |
@@ -1262,7 +1262,7 @@ discard block |
||
| 1262 | 1262 | $d = date('Y-m-d'); |
| 1263 | 1263 | } |
| 1264 | 1264 | |
| 1265 | - return substr($d, 0, 4) . substr($d, 5, 2); |
|
| 1265 | + return substr($d, 0, 4).substr($d, 5, 2); |
|
| 1266 | 1266 | } |
| 1267 | 1267 | |
| 1268 | 1268 | /** |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * Mot de passe |
| 32 | 32 | **/ |
| 33 | 33 | function creer_pass_aleatoire($longueur = 16, $sel = '') { |
| 34 | - $seed = (int)round(((float)microtime() + 1) * time()); |
|
| 34 | + $seed = (int) round(((float) microtime() + 1) * time()); |
|
| 35 | 35 | |
| 36 | 36 | mt_srand($seed); |
| 37 | 37 | $s = ''; |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | if (!$s) { |
| 43 | 43 | $s = random_int(0, mt_getrandmax()); |
| 44 | 44 | } |
| 45 | - $s = substr(md5(uniqid($s) . $sel), 0, 16); |
|
| 45 | + $s = substr(md5(uniqid($s).$sel), 0, 16); |
|
| 46 | 46 | } |
| 47 | - $r = unpack('Cr', pack('H2', $s . $s)); |
|
| 47 | + $r = unpack('Cr', pack('H2', $s.$s)); |
|
| 48 | 48 | $x = $r['r'] & 63; |
| 49 | 49 | if ($x < 10) { |
| 50 | 50 | $x = chr($x + 48); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | static $seeded; |
| 83 | 83 | |
| 84 | 84 | if (!$seeded) { |
| 85 | - $seed = (int)round(((float)microtime() + 1) * time()); |
|
| 85 | + $seed = (int) round(((float) microtime() + 1) * time()); |
|
| 86 | 86 | mt_srand($seed); |
| 87 | 87 | $seeded = true; |
| 88 | 88 | } |
@@ -168,10 +168,10 @@ discard block |
||
| 168 | 168 | ecrire_meta('low_sec', $low_sec = creer_pass_aleatoire()); |
| 169 | 169 | } |
| 170 | 170 | } else { |
| 171 | - $low_sec = sql_getfetsel('low_sec', 'spip_auteurs', 'id_auteur = ' . intval($id_auteur)); |
|
| 171 | + $low_sec = sql_getfetsel('low_sec', 'spip_auteurs', 'id_auteur = '.intval($id_auteur)); |
|
| 172 | 172 | if (!$low_sec) { |
| 173 | 173 | $low_sec = creer_pass_aleatoire(); |
| 174 | - sql_updateq('spip_auteurs', ['low_sec' => $low_sec], 'id_auteur = ' . intval($id_auteur)); |
|
| 174 | + sql_updateq('spip_auteurs', ['low_sec' => $low_sec], 'id_auteur = '.intval($id_auteur)); |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | function generer_url_api_low_sec(string $script, string $format, string $fond, string $path, string $args, bool $no_entities = false, ?bool $public = null) { |
| 230 | 230 | $id_auteur = $GLOBALS['visiteur_session']['id_auteur'] ?? 0; |
| 231 | 231 | $cle = afficher_low_sec($id_auteur, "$script/$format $fond $args"); |
| 232 | - $path = "$id_auteur/$cle/$format/$fond" . ($path ? "/$path" : ''); |
|
| 232 | + $path = "$id_auteur/$cle/$format/$fond".($path ? "/$path" : ''); |
|
| 233 | 233 | |
| 234 | 234 | return generer_url_api($script, $path, $args, $no_entities = false, $public); |
| 235 | 235 | } |
@@ -253,9 +253,9 @@ discard block |
||
| 253 | 253 | foreach ($args as $val => $var) { |
| 254 | 254 | if ($var) { |
| 255 | 255 | if ($val <> 'statut') { |
| 256 | - $a .= ':' . $val . '-' . $var; |
|
| 256 | + $a .= ':'.$val.'-'.$var; |
|
| 257 | 257 | } |
| 258 | - $b .= $val . '=' . $var . '&'; |
|
| 258 | + $b .= $val.'='.$var.'&'; |
|
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | $a = substr($a, 1); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | * Clé |
| 286 | 286 | **/ |
| 287 | 287 | function afficher_low_sec($id_auteur, $action = '') { |
| 288 | - return substr(md5($action . low_sec($id_auteur)), 0, 8); |
|
| 288 | + return substr(md5($action.low_sec($id_auteur)), 0, 8); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /** |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | if (!$id_auteur = intval($id_auteur)) { |
| 317 | 317 | return; |
| 318 | 318 | } // jamais trop prudent ;) |
| 319 | - sql_updateq('spip_auteurs', ['low_sec' => ''], 'id_auteur = ' . intval($id_auteur)); |
|
| 319 | + sql_updateq('spip_auteurs', ['low_sec' => ''], 'id_auteur = '.intval($id_auteur)); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
@@ -334,8 +334,8 @@ discard block |
||
| 334 | 334 | * - void sinon. |
| 335 | 335 | **/ |
| 336 | 336 | function ecrire_acces() { |
| 337 | - $htaccess = _DIR_RESTREINT . _ACCESS_FILE_NAME; |
|
| 338 | - $htpasswd = _DIR_TMP . _AUTH_USER_FILE; |
|
| 337 | + $htaccess = _DIR_RESTREINT._ACCESS_FILE_NAME; |
|
| 338 | + $htpasswd = _DIR_TMP._AUTH_USER_FILE; |
|
| 339 | 339 | |
| 340 | 340 | // Cette variable de configuration peut etre posee par un plugin |
| 341 | 341 | // par exemple acces_restreint ; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | and !@file_exists($htaccess) |
| 347 | 347 | ) { |
| 348 | 348 | spip_unlink($htpasswd); |
| 349 | - spip_unlink($htpasswd . '-admin'); |
|
| 349 | + spip_unlink($htpasswd.'-admin'); |
|
| 350 | 350 | return; |
| 351 | 351 | } |
| 352 | 352 | |
@@ -374,10 +374,10 @@ discard block |
||
| 374 | 374 | $pwd_all = ''; // login:htpass pour tous |
| 375 | 375 | $pwd_admin = ''; // login:htpass pour les admins |
| 376 | 376 | |
| 377 | - $res = sql_select('login, htpass, statut', 'spip_auteurs', "htpass!='' AND login!='' AND " . sql_in('statut', ['1comite', '0minirezo', 'nouveau'])); |
|
| 377 | + $res = sql_select('login, htpass, statut', 'spip_auteurs', "htpass!='' AND login!='' AND ".sql_in('statut', ['1comite', '0minirezo', 'nouveau'])); |
|
| 378 | 378 | while ($row = sql_fetch($res)) { |
| 379 | 379 | if (strlen($row['login']) and strlen($row['htpass'])) { |
| 380 | - $ligne = $row['login'] . ':' . $row['htpass'] . "\n"; |
|
| 380 | + $ligne = $row['login'].':'.$row['htpass']."\n"; |
|
| 381 | 381 | $pwd_all .= $ligne; |
| 382 | 382 | if ($row['statut'] == '0minirezo') { |
| 383 | 383 | $pwd_admin .= $ligne; |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | * @return boolean |
| 421 | 421 | */ |
| 422 | 422 | function verifier_htaccess($rep, $force = false) { |
| 423 | - $htaccess = rtrim($rep, '/') . '/' . _ACCESS_FILE_NAME; |
|
| 423 | + $htaccess = rtrim($rep, '/').'/'._ACCESS_FILE_NAME; |
|
| 424 | 424 | if (((@file_exists($htaccess)) or defined('_TEST_DIRS')) and !$force) { |
| 425 | 425 | return true; |
| 426 | 426 | } |
@@ -449,17 +449,17 @@ discard block |
||
| 449 | 449 | fputs($ht, $deny); |
| 450 | 450 | fclose($ht); |
| 451 | 451 | @chmod($htaccess, _SPIP_CHMOD & 0666); |
| 452 | - $t = rtrim($rep, '/') . '/.ok'; |
|
| 452 | + $t = rtrim($rep, '/').'/.ok'; |
|
| 453 | 453 | if ($ht = @fopen($t, 'w')) { |
| 454 | 454 | @fclose($ht); |
| 455 | 455 | include_spip('inc/distant'); |
| 456 | 456 | $t = substr($t, strlen(_DIR_RACINE)); |
| 457 | - $t = url_de_base() . $t; |
|
| 457 | + $t = url_de_base().$t; |
|
| 458 | 458 | $ht = recuperer_url($t, ['methode' => 'HEAD', 'taille_max' => 0, 'follow_location' => false]); |
| 459 | 459 | $ht = ($ht['status'] ?? null) === 403; |
| 460 | 460 | } |
| 461 | 461 | } |
| 462 | - spip_log("Creation de $htaccess " . ($ht ? ' reussie' : ' manquee')); |
|
| 462 | + spip_log("Creation de $htaccess ".($ht ? ' reussie' : ' manquee')); |
|
| 463 | 463 | |
| 464 | 464 | return $ht; |
| 465 | 465 | } |
@@ -485,11 +485,11 @@ discard block |
||
| 485 | 485 | $dirs = sql_allfetsel('extension', 'spip_types_documents'); |
| 486 | 486 | $dirs[] = ['extension' => 'distant']; |
| 487 | 487 | foreach ($dirs as $e) { |
| 488 | - if (is_dir($dir = _DIR_IMG . $e['extension'])) { |
|
| 488 | + if (is_dir($dir = _DIR_IMG.$e['extension'])) { |
|
| 489 | 489 | if ($f) { |
| 490 | 490 | verifier_htaccess($dir); |
| 491 | 491 | } else { |
| 492 | - spip_unlink($dir . '/' . _ACCESS_FILE_NAME); |
|
| 492 | + spip_unlink($dir.'/'._ACCESS_FILE_NAME); |
|
| 493 | 493 | } |
| 494 | 494 | } |
| 495 | 495 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | and ( |
| 104 | 104 | $newcompt > $debut or ($newcompt == $debut and $newcompt == $memo['compteur']) |
| 105 | 105 | )); |
| 106 | - $res[] = "<li class='pagination-item'>" . lien_ou_expose($memo['url'], $memo['initiale'], $on ? 'span.pagination-item-label' : '', 'pagination-item-label lien_pagination') . '</li>'; |
|
| 106 | + $res[] = "<li class='pagination-item'>".lien_ou_expose($memo['url'], $memo['initiale'], $on ? 'span.pagination-item-label' : '', 'pagination-item-label lien_pagination').'</li>'; |
|
| 107 | 107 | } |
| 108 | 108 | if ($initiale) { |
| 109 | 109 | $memo = [ |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | if (!$initiale and !$url) { |
| 118 | 118 | if ((is_countable($res) ? count($res) : 0) > 1) { |
| 119 | - $out = "<ul class='pagination-items'>" . implode(' ', $res) . '</ul>'; |
|
| 119 | + $out = "<ul class='pagination-items'>".implode(' ', $res).'</ul>'; |
|
| 120 | 120 | } |
| 121 | 121 | $memo = null; |
| 122 | 122 | $res = []; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | ) { |
| 158 | 158 | return parametre_url(parametre_url(generer_url_ecrire('message_edit', 'new=oui'), 'to', $id_auteur), 'redirect', self()); |
| 159 | 159 | } elseif (strlen($email) and autoriser('voir', 'auteur', $id_auteur)) { |
| 160 | - return 'mailto:' . $email; |
|
| 160 | + return 'mailto:'.$email; |
|
| 161 | 161 | } else { |
| 162 | 162 | return ''; |
| 163 | 163 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | // message d'erreur au retour d'une operation |
| 122 | 122 | if ($erreur) { |
| 123 | - echo "<div class='error'>" . spip_htmlspecialchars($erreur) . '</div>'; |
|
| 123 | + echo "<div class='error'>".spip_htmlspecialchars($erreur).'</div>'; |
|
| 124 | 124 | } |
| 125 | 125 | if ($erreur_activation) { |
| 126 | 126 | echo "<div class='error'>$erreur_activation</div>"; |
@@ -147,11 +147,11 @@ discard block |
||
| 147 | 147 | if ($quoi !== 'actifs') { |
| 148 | 148 | $lpf = liste_plugin_files(); |
| 149 | 149 | if ($lpf) { |
| 150 | - echo '<p>' . _T('texte_presente_plugin') . '</p>'; |
|
| 150 | + echo '<p>'._T('texte_presente_plugin').'</p>'; |
|
| 151 | 151 | } else { |
| 152 | 152 | if (!@is_dir(_DIR_PLUGINS)) { |
| 153 | - echo '<p>' . _T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)]) |
|
| 154 | - . ' — ' . _T('plugin_info_automatique_creer') . '</p>'; |
|
| 153 | + echo '<p>'._T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)]) |
|
| 154 | + . ' — '._T('plugin_info_automatique_creer').'</p>'; |
|
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | $lcpaffiche = $lpf; |
@@ -172,10 +172,10 @@ discard block |
||
| 172 | 172 | if (defined('_DIR_PLUGINS_SUPPL')) { |
| 173 | 173 | $nb += is_countable($lcpas) ? count($lcpas) : 0; |
| 174 | 174 | } |
| 175 | - echo '<h3>' . sinon( |
|
| 175 | + echo '<h3>'.sinon( |
|
| 176 | 176 | singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'), |
| 177 | 177 | _T('plugins_actif_aucun') |
| 178 | - ) . '</h3>'; |
|
| 178 | + ).'</h3>'; |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | if (empty($format)) { |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | if ($corps) { |
| 194 | 194 | $corps .= "\n<div class='boutons' style='display:none;'>" |
| 195 | - . "<input type='submit' class='submit save' value='" . _T('bouton_enregistrer') |
|
| 195 | + . "<input type='submit' class='submit save' value='"._T('bouton_enregistrer') |
|
| 196 | 196 | . "' />" |
| 197 | 197 | . '</div>'; |
| 198 | 198 | } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | . debut_cadre_trait_couleur('', true, '', _T('plugins_liste_dist'), 'liste_plugins_dist') |
| 267 | 267 | . '<p>' |
| 268 | 268 | . _T('plugin_info_plugins_dist_1', ['plugins_dist' => joli_repertoire(_DIR_PLUGINS_DIST)]) |
| 269 | - . '<br />' . _T('plugin_info_plugins_dist_2') |
|
| 269 | + . '<br />'._T('plugin_info_plugins_dist_2') |
|
| 270 | 270 | . '</p>' |
| 271 | 271 | . $liste |
| 272 | 272 | . fin_cadre_trait_couleur() |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $res = debut_cadre_enfonce('', true, '', _T('plugin_librairies_installees')); |
| 290 | 290 | $res .= '<dl>'; |
| 291 | 291 | foreach ($libs as $lib => $rep) { |
| 292 | - $res .= "<dt>$lib</dt><dd>" . joli_repertoire($rep) . "</dd>\n"; |
|
| 292 | + $res .= "<dt>$lib</dt><dd>".joli_repertoire($rep)."</dd>\n"; |
|
| 293 | 293 | } |
| 294 | 294 | $res .= '</dl>'; |
| 295 | 295 | $res .= fin_cadre_enfonce(); |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | $libs = []; |
| 309 | 309 | foreach (array_reverse(creer_chemin()) as $d) { |
| 310 | 310 | if ( |
| 311 | - is_dir($dir = $d . 'lib/') |
|
| 311 | + is_dir($dir = $d.'lib/') |
|
| 312 | 312 | and $t = opendir($dir) |
| 313 | 313 | ) { |
| 314 | 314 | while (($f = readdir($t)) !== false) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // si spip_log() est appelé dans mes_options, toutes les constantes n'ont pas été définies |
| 41 | 41 | $logfile = |
| 42 | - ($logdir ?? (defined('_DIR_LOG') ? _DIR_LOG : _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES)) |
|
| 42 | + ($logdir ?? (defined('_DIR_LOG') ? _DIR_LOG : _DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES)) |
|
| 43 | 43 | . $logname |
| 44 | 44 | . ($logsuf ?? (defined('_FILE_LOG_SUFFIX') ? _FILE_LOG_SUFFIX : '.log')); |
| 45 | 45 | |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | // Si le repertoire défini n'existe pas, poser dans tmp/ |
| 57 | 57 | if (!$test_repertoire[$d]) { |
| 58 | - $logfile = _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES . $logname . '.log'; |
|
| 58 | + $logfile = _DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES.$logname.'.log'; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $rotate = 0; |
| 62 | - $pid = '(pid ' . @getmypid() . ')'; |
|
| 62 | + $pid = '(pid '.@getmypid().')'; |
|
| 63 | 63 | |
| 64 | 64 | // accepter spip_log( Array ) |
| 65 | 65 | if (!is_string($message)) { |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | $fi = substr($fi, strlen(_ROOT_RACINE)); |
| 75 | 75 | } |
| 76 | 76 | $fu = $debug[2]['function'] ?? ''; |
| 77 | - $debugverb = "$fi:L$l:$fu" . '():'; |
|
| 77 | + $debugverb = "$fi:L$l:$fu".'():'; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $m = date('Y-m-d H:i:s') . ' ' . ($GLOBALS['ip'] ?? '') . ' ' . $pid . ' ' |
|
| 80 | + $m = date('Y-m-d H:i:s').' '.($GLOBALS['ip'] ?? '').' '.$pid.' ' |
|
| 81 | 81 | //distinguer les logs prives et publics dans les grep |
| 82 | 82 | . $debugverb |
| 83 | 83 | . (test_espace_prive() ? ':Pri:' : ':Pub:') |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | $rotate-- > 0 |
| 103 | 103 | and function_exists('spip_unlink') |
| 104 | 104 | ) { |
| 105 | - spip_unlink($logfile . '.' . $rotate); |
|
| 105 | + spip_unlink($logfile.'.'.$rotate); |
|
| 106 | 106 | while ($rotate--) { |
| 107 | - @rename($logfile . ($rotate ? '.' . $rotate : ''), $logfile . '.' . ($rotate + 1)); |
|
| 107 | + @rename($logfile.($rotate ? '.'.$rotate : ''), $logfile.'.'.($rotate + 1)); |
|
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | 110 | |
@@ -303,9 +303,9 @@ |
||
| 303 | 303 | // et dans ce cas il faut verifier que l'ecriture en base a bien eu lieu a l'identique si il y a des planes dans la chaine |
| 304 | 304 | // car sinon ca casse le serialize PHP - par exemple si on est en mysql utf8 (non mb4) |
| 305 | 305 | if ($has_planes) { |
| 306 | - $check_store = sql_getfetsel('valeur', 'spip_' . $table, 'nom=' . sql_quote($casier)); |
|
| 306 | + $check_store = sql_getfetsel('valeur', 'spip_'.$table, 'nom='.sql_quote($casier)); |
|
| 307 | 307 | if ($check_store !== $serialized_store) { |
| 308 | - array_walk_recursive($store, function (&$value, $key) { |
|
| 308 | + array_walk_recursive($store, function(&$value, $key) { |
|
| 309 | 309 | if (is_string($value)) { |
| 310 | 310 | $value = utf8_noplanes($value); |
| 311 | 311 | } |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | if ($query) { |
| 48 | - $url .= '?' . $query; |
|
| 48 | + $url .= '?'.$query; |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - return '/' . preg_replace(',^/,S', '', $url); |
|
| 51 | + return '/'.preg_replace(',^/,S', '', $url); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | if (preg_match(';^((?:[a-z]{3,33}:)?//.*?)(/.*)?$;iS', $lien, $r)) { |
| 79 | 79 | $r = array_pad($r, 3, ''); |
| 80 | 80 | |
| 81 | - return $r[1] . resolve_path($r[2]); |
|
| 81 | + return $r[1].resolve_path($r[2]); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | # L'url site spip est un lien absolu aussi |
@@ -99,13 +99,13 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | switch (substr($lien, 0, 1)) { |
| 101 | 101 | case '/': |
| 102 | - return $debut . resolve_path($lien); |
|
| 102 | + return $debut.resolve_path($lien); |
|
| 103 | 103 | case '#': |
| 104 | - return $debut . resolve_path($dir . $mot . $get . $lien); |
|
| 104 | + return $debut.resolve_path($dir.$mot.$get.$lien); |
|
| 105 | 105 | case '': |
| 106 | - return $debut . resolve_path($dir . $mot . $get . $hash); |
|
| 106 | + return $debut.resolve_path($dir.$mot.$get.$hash); |
|
| 107 | 107 | default: |
| 108 | - return $debut . resolve_path($dir . $lien); |
|
| 108 | + return $debut.resolve_path($dir.$lien); |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | return ''; |
| 134 | 134 | } |
| 135 | 135 | if (!$base) { |
| 136 | - $base = url_de_base() . (_DIR_RACINE ? _DIR_RESTREINT_ABS : ''); |
|
| 136 | + $base = url_de_base().(_DIR_RACINE ? _DIR_RESTREINT_ABS : ''); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | return suivre_lien($base, $url); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * @param array $protocoles_autorises |
| 157 | 157 | * @return bool |
| 158 | 158 | */ |
| 159 | -function protocole_verifier($url_absolue, $protocoles_autorises = ['http','https']) { |
|
| 159 | +function protocole_verifier($url_absolue, $protocoles_autorises = ['http', 'https']) { |
|
| 160 | 160 | |
| 161 | 161 | if (preg_match(';^([a-z]{3,7})://;i', $url_absolue, $m)) { |
| 162 | 162 | $protocole = $m[1]; |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | function balise_DOSSIER_SQUELETTE_dist($p) { |
| 360 | 360 | $code = substr(addslashes(dirname($p->descr['sourcefile'])), strlen(_DIR_RACINE)); |
| 361 | - $p->code = "_DIR_RACINE . '$code'" . |
|
| 361 | + $p->code = "_DIR_RACINE . '$code'". |
|
| 362 | 362 | $p->interdire_scripts = false; |
| 363 | 363 | |
| 364 | 364 | return $p; |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | */ |
| 378 | 378 | function balise_SQUELETTE_dist($p) { |
| 379 | 379 | $code = addslashes($p->descr['sourcefile']); |
| 380 | - $p->code = "'$code'" . |
|
| 380 | + $p->code = "'$code'". |
|
| 381 | 381 | $p->interdire_scripts = false; |
| 382 | 382 | |
| 383 | 383 | return $p; |
@@ -429,9 +429,9 @@ discard block |
||
| 429 | 429 | **/ |
| 430 | 430 | function balise_NOM_SITE_dist($p) { |
| 431 | 431 | if (!$p->etoile) { |
| 432 | - $p->code = 'supprimer_numero(calculer_url(' . |
|
| 433 | - champ_sql('url_site', $p) . ',' . |
|
| 434 | - champ_sql('nom_site', $p) . |
|
| 432 | + $p->code = 'supprimer_numero(calculer_url('. |
|
| 433 | + champ_sql('url_site', $p).','. |
|
| 434 | + champ_sql('nom_site', $p). |
|
| 435 | 435 | ", 'titre', \$connect, false))"; |
| 436 | 436 | } else { |
| 437 | 437 | $p->code = champ_sql('nom_site', $p); |
@@ -582,8 +582,8 @@ discard block |
||
| 582 | 582 | * Pile complétée par le code à générer |
| 583 | 583 | **/ |
| 584 | 584 | function balise_POPULARITE_ABSOLUE_dist($p) { |
| 585 | - $p->code = 'ceil(' . |
|
| 586 | - champ_sql('popularite', $p) . |
|
| 585 | + $p->code = 'ceil('. |
|
| 586 | + champ_sql('popularite', $p). |
|
| 587 | 587 | ')'; |
| 588 | 588 | $p->interdire_scripts = false; |
| 589 | 589 | |
@@ -664,7 +664,7 @@ discard block |
||
| 664 | 664 | $p->code = index_pile($p->id_boucle, 'valeur', $p->boucles, $b); |
| 665 | 665 | ; |
| 666 | 666 | if (($v = interprete_argument_balise(1, $p)) !== null) { |
| 667 | - $p->code = 'table_valeur(' . $p->code . ', ' . $v . ')'; |
|
| 667 | + $p->code = 'table_valeur('.$p->code.', '.$v.')'; |
|
| 668 | 668 | } |
| 669 | 669 | $p->interdire_scripts = true; |
| 670 | 670 | |
@@ -804,16 +804,16 @@ discard block |
||
| 804 | 804 | $trouver_table = charger_fonction('trouver_table', 'base'); |
| 805 | 805 | if ($desc = $trouver_table(table_objet_sql($type_objet))) { |
| 806 | 806 | if (isset($desc['field']['descriptif'])) { |
| 807 | - $_ligne .= "'descriptif' => " . champ_sql('descriptif', $p) . ','; |
|
| 807 | + $_ligne .= "'descriptif' => ".champ_sql('descriptif', $p).','; |
|
| 808 | 808 | } |
| 809 | 809 | if (isset($desc['field']['texte'])) { |
| 810 | - $_ligne .= "'texte' => " . champ_sql('texte', $p) . ','; |
|
| 810 | + $_ligne .= "'texte' => ".champ_sql('texte', $p).','; |
|
| 811 | 811 | } |
| 812 | 812 | if (isset($desc['field']['chapo'])) { |
| 813 | - $_ligne .= "'chapo' => " . champ_sql('chapo', $p) . ','; |
|
| 813 | + $_ligne .= "'chapo' => ".champ_sql('chapo', $p).','; |
|
| 814 | 814 | } |
| 815 | 815 | if (isset($desc['introduction_longueur'])) { |
| 816 | - $_introduction_longueur = "'" . $desc['introduction_longueur'] . "'"; |
|
| 816 | + $_introduction_longueur = "'".$desc['introduction_longueur']."'"; |
|
| 817 | 817 | } |
| 818 | 818 | } |
| 819 | 819 | $_ligne .= ')'; |
@@ -909,10 +909,10 @@ discard block |
||
| 909 | 909 | $p->code = sprintf( |
| 910 | 910 | CODE_RECUPERER_FOND, |
| 911 | 911 | "'modeles/lesauteurs'", |
| 912 | - "array('objet'=>'" . $objet . |
|
| 913 | - "','id_objet' => " . champ_sql($id_table_objet, $p) . |
|
| 914 | - ",'$id_table_objet' => " . champ_sql($id_table_objet, $p) . |
|
| 915 | - ($objet == 'article' ? '' : ",'id_article' => " . champ_sql('id_article', $p)) . |
|
| 912 | + "array('objet'=>'".$objet. |
|
| 913 | + "','id_objet' => ".champ_sql($id_table_objet, $p). |
|
| 914 | + ",'$id_table_objet' => ".champ_sql($id_table_objet, $p). |
|
| 915 | + ($objet == 'article' ? '' : ",'id_article' => ".champ_sql('id_article', $p)). |
|
| 916 | 916 | ')', |
| 917 | 917 | "'trim'=>true, 'compil'=>array($c)", |
| 918 | 918 | _q($connect) |
@@ -981,7 +981,7 @@ discard block |
||
| 981 | 981 | $m = trim($m); |
| 982 | 982 | if ($m != "''") { |
| 983 | 983 | if (!preg_match(',\W,', $m)) { |
| 984 | - $m = $boucle->id_table . ".$m"; |
|
| 984 | + $m = $boucle->id_table.".$m"; |
|
| 985 | 985 | } |
| 986 | 986 | |
| 987 | 987 | $m .= ' AS titre_rang'; |
@@ -1142,7 +1142,7 @@ discard block |
||
| 1142 | 1142 | $f_pagination = chercher_filtre('pagination'); |
| 1143 | 1143 | $type = $p->boucles[$b]->modificateur['debut_nom']; |
| 1144 | 1144 | $modif = ($type[0] !== "'") ? "'debut'.$type" |
| 1145 | - : ("'debut" . substr($type, 1)); |
|
| 1145 | + : ("'debut".substr($type, 1)); |
|
| 1146 | 1146 | |
| 1147 | 1147 | $p->code = sprintf( |
| 1148 | 1148 | CODE_PAGINATION, |
@@ -1285,7 +1285,7 @@ discard block |
||
| 1285 | 1285 | $msg = ['zbug_balise_sans_argument', ['balise' => ' CHEMIN']]; |
| 1286 | 1286 | erreur_squelette($msg, $p); |
| 1287 | 1287 | } else { |
| 1288 | - $p->code = 'find_in_path((string)' . $arg . ')'; |
|
| 1288 | + $p->code = 'find_in_path((string)'.$arg.')'; |
|
| 1289 | 1289 | } |
| 1290 | 1290 | |
| 1291 | 1291 | $p->interdire_scripts = false; |
@@ -1320,7 +1320,7 @@ discard block |
||
| 1320 | 1320 | $msg = ['zbug_balise_sans_argument', ['balise' => ' CHEMIN_IMAGE']]; |
| 1321 | 1321 | erreur_squelette($msg, $p); |
| 1322 | 1322 | } else { |
| 1323 | - $p->code = 'chemin_image((string)' . $arg . ')'; |
|
| 1323 | + $p->code = 'chemin_image((string)'.$arg.')'; |
|
| 1324 | 1324 | } |
| 1325 | 1325 | |
| 1326 | 1326 | $p->interdire_scripts = false; |
@@ -1374,7 +1374,7 @@ discard block |
||
| 1374 | 1374 | // cas de #ENV sans argument : on retourne le serialize() du tableau |
| 1375 | 1375 | // une belle fonction [(#ENV|affiche_env)] serait pratique |
| 1376 | 1376 | if ($src) { |
| 1377 | - $p->code = '(is_array($a = (' . $src . ')) ? serialize($a) : "")'; |
|
| 1377 | + $p->code = '(is_array($a = ('.$src.')) ? serialize($a) : "")'; |
|
| 1378 | 1378 | } else { |
| 1379 | 1379 | $p->code = 'serialize($Pile[0]??[])'; |
| 1380 | 1380 | } |
@@ -1427,8 +1427,8 @@ discard block |
||
| 1427 | 1427 | $_sinon = interprete_argument_balise(2, $p); |
| 1428 | 1428 | $_unserialize = sinon(interprete_argument_balise(3, $p), 'false'); |
| 1429 | 1429 | |
| 1430 | - $p->code = '(include_spip(\'inc/config\')?lire_config(' . $arg . ',' . |
|
| 1431 | - ($_sinon && $_sinon != "''" ? $_sinon : 'null') . ',' . $_unserialize . "):'')"; |
|
| 1430 | + $p->code = '(include_spip(\'inc/config\')?lire_config('.$arg.','. |
|
| 1431 | + ($_sinon && $_sinon != "''" ? $_sinon : 'null').','.$_unserialize."):'')"; |
|
| 1432 | 1432 | |
| 1433 | 1433 | return $p; |
| 1434 | 1434 | } |
@@ -1521,7 +1521,7 @@ discard block |
||
| 1521 | 1521 | $err_b_s_a = ['zbug_balise_sans_argument', ['balise' => 'SESSION_SET']]; |
| 1522 | 1522 | erreur_squelette($err_b_s_a, $p); |
| 1523 | 1523 | } else { |
| 1524 | - $p->code = '(include_spip("inc/session") AND session_set(' . $_nom . ',' . $_val . '))'; |
|
| 1524 | + $p->code = '(include_spip("inc/session") AND session_set('.$_nom.','.$_val.'))'; |
|
| 1525 | 1525 | } |
| 1526 | 1526 | |
| 1527 | 1527 | $p->interdire_scripts = false; |
@@ -1569,7 +1569,7 @@ discard block |
||
| 1569 | 1569 | ) |
| 1570 | 1570 | ) { |
| 1571 | 1571 | $p->code = /* $r[1]. */ |
| 1572 | - '(' . $r[2] . ')'; |
|
| 1572 | + '('.$r[2].')'; |
|
| 1573 | 1573 | } else { |
| 1574 | 1574 | $p->code = "eval('return '.$php.';')"; |
| 1575 | 1575 | } |
@@ -1813,9 +1813,9 @@ discard block |
||
| 1813 | 1813 | |
| 1814 | 1814 | // noter la duree du cache dans un entete proprietaire |
| 1815 | 1815 | |
| 1816 | - $code = "'<'.'" . '?php header("X-Spip-Cache: ' |
|
| 1816 | + $code = "'<'.'".'?php header("X-Spip-Cache: ' |
|
| 1817 | 1817 | . $duree |
| 1818 | - . '"); ?' . "'.'>'"; |
|
| 1818 | + . '"); ?'."'.'>'"; |
|
| 1819 | 1819 | |
| 1820 | 1820 | // Remplir le header Cache-Control |
| 1821 | 1821 | // cas #CACHE{0} |
@@ -1836,9 +1836,9 @@ discard block |
||
| 1836 | 1836 | $pa == 'cache-client' |
| 1837 | 1837 | and $duree > 0 |
| 1838 | 1838 | ) { |
| 1839 | - $code .= ".'<'.'" . '?php header("Cache-Control: max-age=' |
|
| 1839 | + $code .= ".'<'.'".'?php header("Cache-Control: max-age=' |
|
| 1840 | 1840 | . $duree |
| 1841 | - . '"); ?' . "'.'>'"; |
|
| 1841 | + . '"); ?'."'.'>'"; |
|
| 1842 | 1842 | // il semble logique, si on cache-client, de ne pas invalider |
| 1843 | 1843 | $pa = 'statique'; |
| 1844 | 1844 | } |
@@ -1847,7 +1847,7 @@ discard block |
||
| 1847 | 1847 | $pa == 'statique' |
| 1848 | 1848 | and $duree > 0 |
| 1849 | 1849 | ) { |
| 1850 | - $code .= ".'<'.'" . '?php header("X-Spip-Statique: oui"); ?' . "'.'>'"; |
|
| 1850 | + $code .= ".'<'.'".'?php header("X-Spip-Statique: oui"); ?'."'.'>'"; |
|
| 1851 | 1851 | } |
| 1852 | 1852 | } |
| 1853 | 1853 | } else { |
@@ -2011,9 +2011,9 @@ discard block |
||
| 2011 | 2011 | if ($p->etoile) { |
| 2012 | 2012 | $_options[] = "'etoile'=>true"; |
| 2013 | 2013 | } |
| 2014 | - $_options[] = "'compil'=>array(" . memoriser_contexte_compil($p) . ')'; |
|
| 2014 | + $_options[] = "'compil'=>array(".memoriser_contexte_compil($p).')'; |
|
| 2015 | 2015 | |
| 2016 | - $_l = 'array(' . join(",\n\t", $_contexte) . ')'; |
|
| 2016 | + $_l = 'array('.join(",\n\t", $_contexte).')'; |
|
| 2017 | 2017 | if ($flag_env) { |
| 2018 | 2018 | $_l = "array_merge(\$Pile[0],$_l)"; |
| 2019 | 2019 | } |
@@ -2023,7 +2023,7 @@ discard block |
||
| 2023 | 2023 | $msg = ['zbug_balise_sans_argument', ['balise' => ' INCLURE']]; |
| 2024 | 2024 | erreur_squelette($msg, $p); |
| 2025 | 2025 | } else { |
| 2026 | - $p->code = 'charge_scripts(' . $_contexte[1] . ',false)'; |
|
| 2026 | + $p->code = 'charge_scripts('.$_contexte[1].',false)'; |
|
| 2027 | 2027 | } |
| 2028 | 2028 | |
| 2029 | 2029 | $p->interdire_scripts = false; // la securite est assuree par recuperer_fond |
@@ -2071,7 +2071,7 @@ discard block |
||
| 2071 | 2071 | unset($_contexte[1]); |
| 2072 | 2072 | |
| 2073 | 2073 | if (preg_match("/^\s*'[^']*'/s", $nom)) { |
| 2074 | - $nom = "'modeles/" . substr($nom, 1); |
|
| 2074 | + $nom = "'modeles/".substr($nom, 1); |
|
| 2075 | 2075 | } else { |
| 2076 | 2076 | $nom = "'modeles/' . $nom"; |
| 2077 | 2077 | } |
@@ -2088,8 +2088,8 @@ discard block |
||
| 2088 | 2088 | $primary = $p->boucles[$p->id_boucle]->primary; |
| 2089 | 2089 | if (!strpos($primary, ',')) { |
| 2090 | 2090 | $id = champ_sql($primary, $p); |
| 2091 | - $_contexte[] = "'$primary'=>" . $id; |
|
| 2092 | - $_contexte[] = "'id'=>" . $id; |
|
| 2091 | + $_contexte[] = "'$primary'=>".$id; |
|
| 2092 | + $_contexte[] = "'id'=>".$id; |
|
| 2093 | 2093 | } |
| 2094 | 2094 | } |
| 2095 | 2095 | $_contexte[] = "'recurs'=>(++\$recurs)"; |
@@ -2101,11 +2101,11 @@ discard block |
||
| 2101 | 2101 | $_options = memoriser_contexte_compil($p); |
| 2102 | 2102 | $_options = "'compil'=>array($_options), 'trim'=>true"; |
| 2103 | 2103 | if (isset($_contexte['ajax'])) { |
| 2104 | - $_options .= ', ' . preg_replace(',=>(.*)$,ims', '=> ($v=(\\1))?$v:true', $_contexte['ajax']); |
|
| 2104 | + $_options .= ', '.preg_replace(',=>(.*)$,ims', '=> ($v=(\\1))?$v:true', $_contexte['ajax']); |
|
| 2105 | 2105 | unset($_contexte['ajax']); |
| 2106 | 2106 | } |
| 2107 | 2107 | |
| 2108 | - $_l = 'array(' . join(",\n\t", $_contexte) . ')'; |
|
| 2108 | + $_l = 'array('.join(",\n\t", $_contexte).')'; |
|
| 2109 | 2109 | if ($flag_env) { |
| 2110 | 2110 | $_l = "array_merge(\$Pile[0],$_l)"; |
| 2111 | 2111 | } |
@@ -2215,12 +2215,12 @@ discard block |
||
| 2215 | 2215 | function balise_DOUBLONS_dist($p) { |
| 2216 | 2216 | if ($type = interprete_argument_balise(1, $p)) { |
| 2217 | 2217 | if ($famille = interprete_argument_balise(2, $p)) { |
| 2218 | - $type .= '.' . $famille; |
|
| 2218 | + $type .= '.'.$famille; |
|
| 2219 | 2219 | } |
| 2220 | - $p->code = '(isset($doublons[' . $type . ']) ? $doublons[' . $type . '] : "")'; |
|
| 2220 | + $p->code = '(isset($doublons['.$type.']) ? $doublons['.$type.'] : "")'; |
|
| 2221 | 2221 | if (!$p->etoile) { |
| 2222 | 2222 | $p->code = 'array_filter(array_map("intval",explode(",",' |
| 2223 | - . $p->code . ')))'; |
|
| 2223 | + . $p->code.')))'; |
|
| 2224 | 2224 | } |
| 2225 | 2225 | } else { |
| 2226 | 2226 | $p->code = '$doublons'; |
@@ -2349,7 +2349,7 @@ discard block |
||
| 2349 | 2349 | $_code[] = "$_key => $_val"; |
| 2350 | 2350 | } |
| 2351 | 2351 | } while ($_key && $_val); |
| 2352 | - $p->code = 'array(' . join(', ', $_code) . ')'; |
|
| 2352 | + $p->code = 'array('.join(', ', $_code).')'; |
|
| 2353 | 2353 | $p->interdire_scripts = false; |
| 2354 | 2354 | |
| 2355 | 2355 | return $p; |
@@ -2376,7 +2376,7 @@ discard block |
||
| 2376 | 2376 | while ($_val = interprete_argument_balise($n++, $p)) { |
| 2377 | 2377 | $_code[] = $_val; |
| 2378 | 2378 | } |
| 2379 | - $p->code = 'array(' . join(', ', $_code) . ')'; |
|
| 2379 | + $p->code = 'array('.join(', ', $_code).')'; |
|
| 2380 | 2380 | $p->interdire_scripts = false; |
| 2381 | 2381 | |
| 2382 | 2382 | return $p; |
@@ -2421,10 +2421,10 @@ discard block |
||
| 2421 | 2421 | $_code[] = $_v; |
| 2422 | 2422 | } |
| 2423 | 2423 | |
| 2424 | - $p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser(' . join( |
|
| 2424 | + $p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser('.join( |
|
| 2425 | 2425 | ', ', |
| 2426 | 2426 | $_code |
| 2427 | - ) . ')?" ":"")'; |
|
| 2427 | + ).')?" ":"")'; |
|
| 2428 | 2428 | $p->interdire_scripts = false; |
| 2429 | 2429 | |
| 2430 | 2430 | return $p; |
@@ -2457,7 +2457,7 @@ discard block |
||
| 2457 | 2457 | $type_info = isset($type_info) ? str_replace('\'', '"', $type_info) : '"est_actif"'; |
| 2458 | 2458 | |
| 2459 | 2459 | $f = chercher_filtre('info_plugin'); |
| 2460 | - $p->code = $f . '(' . $plugin . ', ' . $type_info . ')'; |
|
| 2460 | + $p->code = $f.'('.$plugin.', '.$type_info.')'; |
|
| 2461 | 2461 | |
| 2462 | 2462 | return $p; |
| 2463 | 2463 | } |
@@ -2689,7 +2689,7 @@ discard block |
||
| 2689 | 2689 | } |
| 2690 | 2690 | |
| 2691 | 2691 | // Différentes infos relatives au tri présentes dans les modificateurs |
| 2692 | - $_tri_nom = $boucle->modificateur['tri_nom'] ; // nom du paramètre définissant le tri |
|
| 2692 | + $_tri_nom = $boucle->modificateur['tri_nom']; // nom du paramètre définissant le tri |
|
| 2693 | 2693 | $_tri_champ = $boucle->modificateur['tri_champ']; // champ actuel utilisé le tri |
| 2694 | 2694 | $_tri_sens = $boucle->modificateur['tri_sens']; // sens de tri actuel |
| 2695 | 2695 | $_tri_liste_sens_defaut = $boucle->modificateur['tri_liste_sens_defaut']; // sens par défaut pour chaque champ |
@@ -2784,7 +2784,7 @@ discard block |
||
| 2784 | 2784 | $connect = $p->boucles[$p->id_boucle]->sql_serveur; |
| 2785 | 2785 | } |
| 2786 | 2786 | |
| 2787 | - $p->code = '(objet_test_si_publie(' . $_type . ',intval(' . $_id . '),' . _q($connect) . ")?' ':'')"; |
|
| 2787 | + $p->code = '(objet_test_si_publie('.$_type.',intval('.$_id.'),'._q($connect).")?' ':'')"; |
|
| 2788 | 2788 | $p->interdire_scripts = false; |
| 2789 | 2789 | |
| 2790 | 2790 | return $p; |