Completed
Push — master ( e997e0...cc9c6b )
by cam
01:07
created
ecrire/public/fonctions.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		$texte = $intro;
87 87
 	} else {
88 88
 		if (
89
-			strpos("\n" . $texte, "\n|") === false
89
+			strpos("\n".$texte, "\n|") === false
90 90
 			and strlen($texte) > 2.5 * $longueur
91 91
 		) {
92 92
 			if (strpos($texte, '<multi') !== false) {
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 	if ($pas < 1) {
171 171
 		return '';
172 172
 	}
173
-	$ancre = 'pagination' . $nom; // #pagination_articles
174
-	$debut = 'debut' . $nom; // 'debut_articles'
173
+	$ancre = 'pagination'.$nom; // #pagination_articles
174
+	$debut = 'debut'.$nom; // 'debut_articles'
175 175
 
176 176
 	// n'afficher l'ancre qu'une fois
177 177
 	if (!isset($ancres[$ancre])) {
178
-		$bloc_ancre = $ancres[$ancre] = "<a id='" . $ancre . "' class='pagination_ancre'></a>";
178
+		$bloc_ancre = $ancres[$ancre] = "<a id='".$ancre."' class='pagination_ancre'></a>";
179 179
 	} else {
180 180
 		$bloc_ancre = '';
181 181
 	}
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
 
208 208
 	if ($modele) {
209 209
 		$pagination['type_pagination'] = $modele;
210
-		if (trouver_fond('pagination_' . $modele, 'modeles')) {
211
-			$modele = '_' . $modele;
210
+		if (trouver_fond('pagination_'.$modele, 'modeles')) {
211
+			$modele = '_'.$modele;
212 212
 		}
213 213
 		else {
214 214
 			$modele = '';
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 function lister_objets_avec_logos($type) {
294 294
 
295 295
 	$objet = objet_type($type);
296
-	$ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode=' . sql_quote('logoon') . ' AND L.objet=' . sql_quote($objet));
296
+	$ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode='.sql_quote('logoon').' AND L.objet='.sql_quote($objet));
297 297
 	if ($ids) {
298 298
 		$ids = array_column($ids, 'id_objet');
299 299
 		return implode(',', $ids);
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 
487 487
 	// Classes : on indique le sens de tri et l'item exposé
488 488
 	if (!$is_sens_fixe) {
489
-		$classe .= ' item-tri item-tri_' . ($tri_sens_actuel === 1 ? 'asc' : 'desc');
489
+		$classe .= ' item-tri item-tri_'.($tri_sens_actuel === 1 ? 'asc' : 'desc');
490 490
 	}
491 491
 	if ($champ_ou_sens === $tri_champ) {
492 492
 		$classe .= ' item-tri_actif';
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
  */
526 526
 function tri_champ_order($t, $from = null, $senstri = '') {
527 527
 	if (strncmp($t, 'multi ', 6) == 0) {
528
-		return 'multi' . $senstri;
528
+		return 'multi'.$senstri;
529 529
 	}
530 530
 
531 531
 	$champ = $t;
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 		case 'sinum ':
560 560
 			return "CASE( 0+$champ ) WHEN 0 THEN 1 ELSE 0 END{$senstri}";
561 561
 		default:
562
-			return $champ . $senstri;
562
+			return $champ.$senstri;
563 563
 	}
564 564
 }
565 565
 
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
  * @param ...$dummy
654 654
  * @return string
655 655
  */
656
-function filtre_styles_inline_page_login_pass_dist(&$Pile,...$dummy) {
656
+function filtre_styles_inline_page_login_pass_dist(&$Pile, ...$dummy) {
657 657
 	$styles = '';
658 658
 	include_spip('inc/config');
659 659
 	if ($couleur = lire_config('couleur_login')) {
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 		$l = couleur_hex_to_hsl($couleur, 'l');
663 663
 		$styles .= ":root {--spip-login-color-theme--hs: {$hs};--spip-login-color-theme--l: {$l};}\n";
664 664
 	}
665
-	$logo_bg = _DIR_IMG . "spip_fond_login.jpg";
665
+	$logo_bg = _DIR_IMG."spip_fond_login.jpg";
666 666
 	if (file_exists($logo_bg)) {
667 667
 		include_spip('inc/filtres_images_mini');
668 668
 		$logo_mini = image_reduire($logo_bg, 64, 64);
Please login to merge, or discard this patch.
ecrire/inc/install.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
  * @return void
43 43
  **/
44 44
 function install_fichier_connexion($nom, $texte) {
45
-	$texte = '<' . "?php\n"
45
+	$texte = '<'."?php\n"
46 46
 		. "if (!defined(\"_ECRIRE_INC_VERSION\")) return;\n"
47 47
 		. $texte;
48 48
 
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 		return $regs;
115 115
 	} else {
116 116
 		$ar = '\s*\'([^\']*)\'';
117
-		$r = '\s*,' . $ar;
117
+		$r = '\s*,'.$ar;
118 118
 		$r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r(?:$r)?)?)?)?#";
119 119
 		if (preg_match($r, $s, $regs)) {
120
-			$regs[2] = $regs[1] . (!$regs[2] ? '' : ':' . $regs[2] . ';');
120
+			$regs[2] = $regs[1].(!$regs[2] ? '' : ':'.$regs[2].';');
121 121
 			array_shift($regs);
122 122
 			array_shift($regs);
123 123
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	// Si on n'a pas la bonne version de PHP, c'est la fin
183 183
 	if ($err) {
184 184
 		die("<div class='error'>"
185
-			. '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>"
185
+			. '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>"
186 186
 			. "<li><strong>{$err[0]}</strong></li>\n</ul></div>");
187 187
 	}
188 188
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
 	if ($err) {
204 204
 		echo "<div class='error'>"
205
-			. '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>";
205
+			. '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>";
206 206
 		foreach ($err as $e) {
207 207
 			echo "<li><strong>$e</strong></li>\n";
208 208
 		}
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
 
216 216
 
217 217
 function info_etape($titre, $complement = '') {
218
-	return '<h2>' . $titre . "</h2>\n" .
219
-	($complement ? '' . $complement . "\n" : '');
218
+	return '<h2>'.$titre."</h2>\n".
219
+	($complement ? ''.$complement."\n" : '');
220 220
 }
221 221
 
222 222
 /**
@@ -230,18 +230,18 @@  discard block
 block discarded – undo
230 230
 		$code = _T('bouton_suivant');
231 231
 	}
232 232
 	static $suivant = 0;
233
-	$id = 'suivant' . (($suivant > 0) ? strval($suivant) : '');
233
+	$id = 'suivant'.(($suivant > 0) ? strval($suivant) : '');
234 234
 	$suivant += 1;
235 235
 
236
-	return "\n<p class='boutons suivant'><input id='" . $id . "' type='submit'\nvalue=\"" .
237
-	$code .
236
+	return "\n<p class='boutons suivant'><input id='".$id."' type='submit'\nvalue=\"".
237
+	$code.
238 238
 	" >>\" /></p>\n";
239 239
 }
240 240
 
241 241
 function info_progression_etape($en_cours, $phase, $dir, $erreur = false) {
242 242
 	$intitule_etat = [];
243 243
 
244
-	$liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$');
244
+	$liste = find_all_in_path($dir, $phase.'(([0-9])+|fin)[.]php$');
245 245
 	$debut = 1;
246 246
 	$last = count($liste);
247 247
 
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
 			}
277 277
 
278 278
 			$aff_etapes .= "<li class='$class'><div class='fond'>";
279
-			$aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em>&nbsp;: </em>";
280
-			$aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">' . $intitule_etat["$phase"][$debut] . '</'.(($debut == $en_cours) ? 'strong' : 'span').'>';
279
+			$aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em>&nbsp;: </em>";
280
+			$aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">'.$intitule_etat["$phase"][$debut].'</'.(($debut == $en_cours) ? 'strong' : 'span').'>';
281 281
 			$aff_etapes .= '</div></li>';
282 282
 		}
283 283
 		$debut++;
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
 
290 290
 
291 291
 function fieldset($legend, $champs = [], $apres = '', $avant = '') {
292
-	return "<fieldset>\n" .
293
-	$avant .
294
-	($legend ? '<legend>' . $legend . "</legend>\n" : '') .
295
-	fieldset_champs($champs) .
296
-	$apres .
292
+	return "<fieldset>\n".
293
+	$avant.
294
+	($legend ? '<legend>'.$legend."</legend>\n" : '').
295
+	fieldset_champs($champs).
296
+	$apres.
297 297
 	"</fieldset>\n";
298 298
 }
299 299
 
@@ -303,18 +303,18 @@  discard block
 block discarded – undo
303 303
 		$type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', $nom) ? 'password' : 'text');
304 304
 		$class = isset($contenu['hidden']) ? '' : "class='formo' size='40' ";
305 305
 		if (isset($contenu['alternatives'])) {
306
-			$fieldset .= $contenu['label'] . "\n";
306
+			$fieldset .= $contenu['label']."\n";
307 307
 			foreach ($contenu['alternatives'] as $valeur => $label) {
308
-				$fieldset .= "<input type='radio' name='" . $nom .
308
+				$fieldset .= "<input type='radio' name='".$nom.
309 309
 					"' id='$nom-$valeur' value='$valeur'"
310 310
 					. (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '')
311 311
 					. "/>\n";
312
-				$fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n";
312
+				$fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n";
313 313
 			}
314 314
 			$fieldset .= "<br />\n";
315 315
 		} else {
316
-			$fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n";
317
-			$fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'"
316
+			$fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n";
317
+			$fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'"
318 318
 				. (preg_match(',^(pass|login),', $nom) ? " autocomplete='off'" : '')
319 319
 				. ((isset($contenu['required']) and $contenu['required']) ? " required='required'" : '')
320 320
 				. " />\n";
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
 function install_select_serveur() {
328 328
 	$options = [];
329
-	$dir = _DIR_RESTREINT . 'req/';
329
+	$dir = _DIR_RESTREINT.'req/';
330 330
 	$d = opendir($dir);
331 331
 	if (!$d) {
332 332
 		return [];
@@ -334,17 +334,17 @@  discard block
 block discarded – undo
334 334
 	while (($f = readdir($d)) !== false) {
335 335
 		if (
336 336
 			(preg_match('/^(.*)[.]php$/', $f, $s))
337
-			and is_readable($f = $dir . $f)
337
+			and is_readable($f = $dir.$f)
338 338
 		) {
339 339
 			require_once($f);
340 340
 			$s = $s[1];
341
-			$v = 'spip_versions_' . $s;
341
+			$v = 'spip_versions_'.$s;
342 342
 			if (function_exists($v) and $v()) {
343 343
 				$titre = _T("install_select_type_$s");
344 344
 				// proposer mysql par defaut si dispo
345 345
 				$checked = ($s == 'mysql' ? " checked='checked'" : '');
346 346
 				$options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>"
347
-					. "<label for='$s'>" . ($titre ?: $s) . '</label></li>';
347
+					. "<label for='$s'>".($titre ?: $s).'</label></li>';
348 348
 			} else {
349 349
 				spip_log("$s: portage indisponible");
350 350
 			}
@@ -362,8 +362,8 @@  discard block
 block discarded – undo
362 362
 		"\n<input type='hidden' name='etape' value='$etape' />"
363 363
 		. $hidden
364 364
 		. (_request('echec') ?
365
-			('<p><b>' . _T('avis_connexion_echec_1') .
366
-				'</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>')
365
+			('<p><b>'._T('avis_connexion_echec_1').
366
+				'</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>')
367 367
 			: '')
368 368
 
369 369
 		. ($jquery ? http_script('', 'jquery.js') : '')
@@ -401,9 +401,9 @@  discard block
 block discarded – undo
401 401
 		});')
402 402
 
403 403
 		. ($server_db
404
-			? '<input type="hidden" name="server_db" value="' . $server_db . '" />'
404
+			? '<input type="hidden" name="server_db" value="'.$server_db.'" />'
405 405
 			. (($predef[0])
406
-				? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>')
406
+				? ('<h3>'._T('install_serveur_hebergeur').'</h3>')
407 407
 				: '')
408 408
 			: ('<fieldset><legend>'
409 409
 				. _T('install_select_type_db')
@@ -418,9 +418,9 @@  discard block
 block discarded – undo
418 418
 				. "\n</ul>\n</div></fieldset>")
419 419
 		)
420 420
 		. '<div id="install_adresse_base_hebergeur">'
421
-		. '<p>' . _T('texte_connexion_mysql') . '</p>'
421
+		. '<p>'._T('texte_connexion_mysql').'</p>'
422 422
 		. ($predef[1]
423
-			? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>'
423
+			? '<h3>'._T('install_adresse_base_hebergeur').'</h3>'
424 424
 			: fieldset(
425 425
 				_T('entree_base_donnee_1'),
426 426
 				[
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 
436 436
 		. '<div id="install_login_base_hebergeur">'
437 437
 		. ($predef[2]
438
-			? '<h3>' . _T('install_login_base_hebergeur') . '</h3>'
438
+			? '<h3>'._T('install_login_base_hebergeur').'</h3>'
439 439
 			: fieldset(
440 440
 				_T('entree_login_connexion_1'),
441 441
 				[
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 
451 451
 		. '<div id="install_pass_base_hebergeur">'
452 452
 		. ($predef[3]
453
-			? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>'
453
+			? '<h3>'._T('install_pass_base_hebergeur').'</h3>'
454 454
 			: fieldset(
455 455
 				_T('entree_mot_passe_1'),
456 456
 				[
@@ -472,20 +472,20 @@  discard block
 block discarded – undo
472 472
 function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) {
473 473
 	return ((defined('_INSTALL_HOST_DB'))
474 474
 		? ''
475
-		: "\n<input type='hidden' name='adresse_db'  value=\"" . spip_htmlspecialchars($adresse_db) . '" />'
475
+		: "\n<input type='hidden' name='adresse_db'  value=\"".spip_htmlspecialchars($adresse_db).'" />'
476 476
 	)
477 477
 	. ((defined('_INSTALL_USER_DB'))
478 478
 		? ''
479
-		: "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />'
479
+		: "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />'
480 480
 	)
481 481
 	. ((defined('_INSTALL_PASS_DB'))
482 482
 		? ''
483
-		: "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />'
483
+		: "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />'
484 484
 	)
485 485
 
486 486
 	. ((defined('_INSTALL_SERVER_DB'))
487 487
 		? ''
488
-		: "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />'
488
+		: "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />'
489 489
 	);
490 490
 }
491 491
 
Please login to merge, or discard this patch.
ecrire/src/Afficher/Minipage/AbstractPage.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
 
64 64
 		$page_title = (isset($options['page_title']) ? $options['page_title'] : $GLOBALS['meta']['nom_site']);
65 65
 		$doctype = (isset($options['doctype']) ? $options['doctype'] : "<!DOCTYPE html>");
66
-		$doctype = trim($doctype) . "\n";
66
+		$doctype = trim($doctype)."\n";
67 67
 		$charset = (isset($options['charset']) ? $options['charset'] : "utf-8");
68 68
 		$all_inline = (isset($options['all_inline']) ? $options['all_inline'] : true);
69 69
 		$onLoad = (isset($options['onLoad']) ? $options['onLoad'] : '');
70 70
 		if ($onLoad) {
71
-			$onLoad = ' onload="' . attribut_html($onLoad) . '"';
71
+			$onLoad = ' onload="'.attribut_html($onLoad).'"';
72 72
 		}
73 73
 
74 74
 		# envoyer le charset
75 75
 		if (!headers_sent()) {
76
-			header('Content-Type: text/html; charset=' . $charset);
76
+			header('Content-Type: text/html; charset='.$charset);
77 77
 		}
78 78
 
79 79
 		$css = '';
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 			. "--minipage-color-theme--s: $s;"
95 95
 			. "--minipage-color-theme--l: $l;}";
96 96
 		$vars = file_get_contents(find_in_theme('minipage.vars.css'));
97
-		$inline .= "\n" . trim($vars);
97
+		$inline .= "\n".trim($vars);
98 98
 		if (function_exists('minifier')) {
99 99
 			$inline = minifier($inline, 'css');
100 100
 		}
@@ -121,31 +121,31 @@  discard block
 block discarded – undo
121 121
 			}
122 122
 			$css = "$inline\n$css";
123 123
 			if (!empty($options['css'])) {
124
-				$css .= "\n" . $options['css'];
124
+				$css .= "\n".$options['css'];
125 125
 			}
126 126
 			$css = "<style type='text/css'>$css</style>";
127 127
 		} else {
128 128
 			$css = "<style type='text/css'>$inline</style>";
129 129
 			foreach ($files as $name) {
130 130
 				$file = timestamp(direction_css($name));
131
-				$css .= "<link rel='stylesheet' href='" . attribut_html($file) . "' type='text/css' />\n";
131
+				$css .= "<link rel='stylesheet' href='".attribut_html($file)."' type='text/css' />\n";
132 132
 			}
133 133
 			if (!empty($options['css'])) {
134
-				$css .= "<style type='text/css'>" . $options['css'] . "</style>";
134
+				$css .= "<style type='text/css'>".$options['css']."</style>";
135 135
 			}
136 136
 		}
137 137
 
138
-		return $doctype .
139
-			html_lang_attributes() .
140
-			"<head>\n" .
141
-			'<title>' .
142
-			textebrut($page_title) .
143
-			"</title>\n" .
144
-			"<meta name=\"viewport\" content=\"width=device-width\" />\n" .
145
-			$css .
146
-			(empty($options['head']) ? "" : $options['head']) .
147
-			"</head>\n" .
148
-			"<body{$onLoad} class=\"minipage" . ($this::TYPE ? ' minipage--' . $this::TYPE : '') . "\">\n" .
138
+		return $doctype.
139
+			html_lang_attributes().
140
+			"<head>\n".
141
+			'<title>'.
142
+			textebrut($page_title).
143
+			"</title>\n".
144
+			"<meta name=\"viewport\" content=\"width=device-width\" />\n".
145
+			$css.
146
+			(empty($options['head']) ? "" : $options['head']).
147
+			"</head>\n".
148
+			"<body{$onLoad} class=\"minipage".($this::TYPE ? ' minipage--'.$this::TYPE : '')."\">\n".
149 149
 			"\t<div class=\"minipage-bloc\">\n";
150 150
 	}
151 151
 
@@ -156,16 +156,16 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	protected function ouvreCorps($options = []) {
158 158
 		$url_site = url_de_base();
159
-		$header = "<header>\n" .
160
-			"<h1><a href=\"" . attribut_html($url_site) . "\">" . interdire_scripts($GLOBALS['meta']['nom_site'] ?? '') . "</a></h1>\n";
159
+		$header = "<header>\n".
160
+			"<h1><a href=\"".attribut_html($url_site)."\">".interdire_scripts($GLOBALS['meta']['nom_site'] ?? '')."</a></h1>\n";
161 161
 
162 162
 		$titre = (isset($options['titre']) ? $options['titre'] : '');
163 163
 		if ($titre) {
164
-			$header .= "<h2>" . interdire_scripts($titre) . "</h2>";
164
+			$header .= "<h2>".interdire_scripts($titre)."</h2>";
165 165
 		}
166 166
 		$header .= "</header>";
167 167
 
168
-		return $header . "<div class='corps'>\n";
168
+		return $header."<div class='corps'>\n";
169 169
 	}
170 170
 
171 171
 	/**
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
 		if (isset($options['footer'])) {
180 180
 			$footer = $options['footer'];
181 181
 		} else {
182
-			$footer = "<a href=\"" . attribut_html($url_site) . "\">" . _T('retour') . "</a>\n";
182
+			$footer = "<a href=\"".attribut_html($url_site)."\">"._T('retour')."</a>\n";
183 183
 		}
184 184
 		if (!empty($footer)) {
185 185
 			$footer = "<footer>\n{$footer}</footer>";
186 186
 		}
187 187
 
188
-		return "</div>\n" . $footer;
188
+		return "</div>\n".$footer;
189 189
 	}
190 190
 
191 191
 
Please login to merge, or discard this patch.
ecrire/src/Afficher/Minipage/Admin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 			$titre = ($titre == 'install')
106 106
 				? _T('avis_espace_interdit')
107
-				: $titre . '&nbsp;: ' . _T('info_acces_interdit');
107
+				: $titre.'&nbsp;: '._T('info_acces_interdit');
108 108
 
109 109
 			$statut = $GLOBALS['visiteur_session']['statut'] ?? '';
110 110
 			$nom = $GLOBALS['visiteur_session']['nom'] ?? '';
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 				$footer = bouton_action(_T('public:accueil_site'), $GLOBALS['meta']['adresse_site'] ?? '');
124 124
 			}
125 125
 
126
-			spip_log($nom . " $titre " . $_SERVER['REQUEST_URI'], 'minipres');
126
+			spip_log($nom." $titre ".$_SERVER['REQUEST_URI'], 'minipres');
127 127
 
128 128
 			$options['footer'] = $footer;
129 129
 			if (empty($corps)) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 			foreach ($_POST as $v => $c) {
155 155
 				$url = parametre_url($url, $v, $c, '&');
156 156
 			}
157
-			ajax_retour('<div>' . $titre . redirige_formulaire($url) . '</div>', false);
157
+			ajax_retour('<div>'.$titre.redirige_formulaire($url).'</div>', false);
158 158
 			return '';
159 159
 		}
160 160
 	}
Please login to merge, or discard this patch.
ecrire/genie/mise_a_jour.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
 function genie_mise_a_jour_dist($t) {
29 29
 	include_spip('inc/meta');
30 30
 	$maj = info_maj($GLOBALS['spip_version_branche']);
31
-	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche'] . "|$maj") : '', 'non');
31
+	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : '', 'non');
32 32
 
33 33
 	mise_a_jour_ecran_securite();
34 34
 
35
-	spip_log('Verification version SPIP : ' . ($maj ?: 'version a jour'), 'verifie_maj');
35
+	spip_log('Verification version SPIP : '.($maj ?: 'version a jour'), 'verifie_maj');
36 36
 
37 37
 	return 1;
38 38
 }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	// si l'ecran n'est pas deja present ou pas updatable, sortir
58 58
 	if (
59 59
 		!_URL_ECRAN_SECURITE
60
-		or !file_exists($filename = _DIR_ETC . 'ecran_securite.php')
60
+		or !file_exists($filename = _DIR_ETC.'ecran_securite.php')
61 61
 		or !is_writable($filename)
62 62
 		or !$last_modified = filemtime($filename)
63 63
 		or !$md5 = md5_file($filename)
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	}
67 67
 
68 68
 	include_spip('inc/distant');
69
-	$tmp_file = _DIR_TMP . 'ecran_securite.php';
69
+	$tmp_file = _DIR_TMP.'ecran_securite.php';
70 70
 	$url = parametre_url(_URL_ECRAN_SECURITE, 'md5', $md5);
71 71
 	$url = parametre_url($url, 'vspip', $GLOBALS['spip_version_branche']);
72 72
 	$res = recuperer_url($url, [
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			include_once $tmp_file;
86 86
 			// ok, on le copie a la place de l'ecran existant
87 87
 			// en backupant l'ecran avant, au cas ou
88
-			@copy($filename, $filename . '-bck-' . date('Y-m-d-His', $last_modified));
88
+			@copy($filename, $filename.'-bck-'.date('Y-m-d-His', $last_modified));
89 89
 			@rename($tmp_file, $filename);
90 90
 		} else {
91 91
 			@unlink($tmp_file);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		$message[] = _T('nouvelle_version_spip_majeure', ['version' => $maj['majeure']]);
128 128
 	}
129 129
 
130
-	return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="' . $maj['mineure'] . '">' . implode(' | ', $message) . '</a>';
130
+	return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="'.$maj['mineure'].'">'.implode(' | ', $message).'</a>';
131 131
 }
132 132
 
133 133
 /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 function info_maj_cache(): ?array {
145 145
 	$contenu = '';
146 146
 	$options = [];
147
-	$nom = _DIR_CACHE . _VERSIONS_LISTE;
147
+	$nom = _DIR_CACHE._VERSIONS_LISTE;
148 148
 	if (file_exists($nom)) {
149 149
 		$contenu = file_get_contents($nom);
150 150
 		$options['if_modified_since'] = filemtime($nom);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	try {
166 166
 		$json = json_decode($contenu, true, 512, JSON_THROW_ON_ERROR);
167 167
 	} catch (JsonException $e) {
168
-		spip_log('Failed to parse Json data : ' . $e->getMessage(), 'verifie_maj');
168
+		spip_log('Failed to parse Json data : '.$e->getMessage(), 'verifie_maj');
169 169
 		return null;
170 170
 	}
171 171
 
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 
198 198
 	foreach ($versions as $v) {
199 199
 		[$maj2, $min2, $rev2] = explode('.', $v);
200
-		$branche_maj = $maj2 . '.' . $min2;
201
-		$version_maj = $maj2 . '.' . $min2 . '.' . $rev2;
200
+		$branche_maj = $maj2.'.'.$min2;
201
+		$version_maj = $maj2.'.'.$min2.'.'.$rev2;
202 202
 		$is_version_stable = is_numeric($rev2);
203 203
 		// d'abord les mises à jour de la même branche (version mineure)
204 204
 		if (
Please login to merge, or discard this patch.
ecrire/inc/exporter_csv.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	$champ = preg_replace(',[\s]+,ms', ' ', $champ);
38 38
 	$champ = str_replace('"', '""', $champ);
39 39
 
40
-	return '"' . $champ . '"';
40
+	return '"'.$champ.'"';
41 41
 }
42 42
 
43 43
 /**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	if ($callback) {
58 58
 		$ligne = $callback($nb, $ligne, $delim, $importer_charset);
59 59
 	}
60
-	$output = join($delim, array_map('exporter_csv_champ', $ligne)) . "\r\n";
60
+	$output = join($delim, array_map('exporter_csv_champ', $ligne))."\r\n";
61 61
 	if ($importer_charset) {
62 62
 		$output = str_replace('’', '\'', $output);
63 63
 		$output = unicode2charset(html2unicode(charset2unicode($output)), $importer_charset);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		$fichier = 'php://output';
185 185
 	}
186 186
 	else {
187
-		$fichier = sous_repertoire(_DIR_CACHE, 'export') . $basename;
187
+		$fichier = sous_repertoire(_DIR_CACHE, 'export').$basename;
188 188
 	}
189 189
 
190 190
 	$fp = fopen($fichier, 'w');
Please login to merge, or discard this patch.
ecrire/inc/distant.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	define('_INC_DISTANT_CONTENT_ENCODING', 'gzip');
28 28
 }
29 29
 if (!defined('_INC_DISTANT_USER_AGENT')) {
30
-	define('_INC_DISTANT_USER_AGENT', 'SPIP-' . $GLOBALS['spip_version_affichee'] . ' (' . $GLOBALS['home_server'] . ')');
30
+	define('_INC_DISTANT_USER_AGENT', 'SPIP-'.$GLOBALS['spip_version_affichee'].' ('.$GLOBALS['home_server'].')');
31 31
 }
32 32
 if (!defined('_INC_DISTANT_MAX_SIZE')) {
33 33
 	define('_INC_DISTANT_MAX_SIZE', 2_097_152);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	define('_INC_DISTANT_CONNECT_TIMEOUT', 10);
37 37
 }
38 38
 
39
-define('_REGEXP_COPIE_LOCALE', ',' 	.
39
+define('_REGEXP_COPIE_LOCALE', ','.
40 40
 	preg_replace(
41 41
 		'@^https?:@',
42 42
 		'https?:',
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 	// si c'est la protection de soi-meme, retourner le path
75 75
 	if ($mode !== 'force' and preg_match(_REGEXP_COPIE_LOCALE, $source, $match)) {
76
-		$source = substr(_DIR_IMG, strlen(_DIR_RACINE)) . urldecode($match[1]);
76
+		$source = substr(_DIR_IMG, strlen(_DIR_RACINE)).urldecode($match[1]);
77 77
 
78 78
 		return @file_exists($source) ? $source : false;
79 79
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		return false;
94 94
 	}
95 95
 
96
-	$localrac = _DIR_RACINE . $local;
96
+	$localrac = _DIR_RACINE.$local;
97 97
 	$t = ($mode === 'force') ? false : @file_exists($localrac);
98 98
 
99 99
 	// test d'existence du fichier
@@ -113,18 +113,18 @@  discard block
 block discarded – undo
113 113
 		if (!$taille_max) {
114 114
 			$taille_max = _COPIE_LOCALE_MAX_SIZE;
115 115
 		}
116
-		$localrac_tmp = $localrac . '.tmp';
116
+		$localrac_tmp = $localrac.'.tmp';
117 117
 		$res = recuperer_url(
118 118
 			$source,
119 119
 			['file' => $localrac_tmp, 'taille_max' => $taille_max, 'if_modified_since' => $t ? filemtime($localrac) : '']
120 120
 		);
121 121
 
122 122
 		if (!$res or (!$res['length'] and $res['status'] != 304)) {
123
-			spip_log("copie_locale : Echec recuperation $source sur $localrac_tmp status : " . ($res ? $res['status'] : '-'), 'distant' . _LOG_INFO_IMPORTANTE);
123
+			spip_log("copie_locale : Echec recuperation $source sur $localrac_tmp status : ".($res ? $res['status'] : '-'), 'distant'._LOG_INFO_IMPORTANTE);
124 124
 			@unlink($localrac_tmp);
125 125
 		}
126 126
 		else {
127
-			spip_log("copie_locale : recuperation $source sur $localrac_tmp OK | taille " . $res['length'] . ' status ' . $res['status'], 'distant');
127
+			spip_log("copie_locale : recuperation $source sur $localrac_tmp OK | taille ".$res['length'].' status '.$res['status'], 'distant');
128 128
 		}
129 129
 		if (!$res or !$res['length']) {
130 130
 			// si $t c'est sans doute juste un not-modified-since
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 			and is_callable($callback_valider_url)
138 138
 			and !$callback_valider_url($res['url'])
139 139
 		) {
140
-			spip_log('copie_locale : url finale ' . $res['url'] . " non valide, on refuse le fichier $localrac_tmp", 'distant' . _LOG_INFO_IMPORTANTE);
140
+			spip_log('copie_locale : url finale '.$res['url']." non valide, on refuse le fichier $localrac_tmp", 'distant'._LOG_INFO_IMPORTANTE);
141 141
 			@unlink($localrac_tmp);
142 142
 			return $t ? $local : false;
143 143
 		}
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
 	if (!$is_known_host) {
230 230
 		$host = trim($parsed_url['host'], '.');
231
-		if (! $ip = filter_var($host, FILTER_VALIDATE_IP)) {
231
+		if (!$ip = filter_var($host, FILTER_VALIDATE_IP)) {
232 232
 			$ip = gethostbyname($host);
233 233
 			if ($ip === $host) {
234 234
 				// Error condition for gethostbyname()
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 			}
250 250
 		}
251 251
 		if ($ip) {
252
-			if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
252
+			if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
253 253
 				return false;
254 254
 			}
255 255
 		}
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	}
261 261
 
262 262
 	$port = $parsed_url['port'];
263
-	if ($port === 80  or $port === 443  or $port === 8080) {
263
+	if ($port === 80 or $port === 443 or $port === 8080) {
264 264
 		return $url;
265 265
 	}
266 266
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 				}
331 331
 			}
332 332
 			if ($taille > 500) {
333
-				$boundary = substr(md5(random_int(0, mt_getrandmax()) . 'spip'), 0, 8);
333
+				$boundary = substr(md5(random_int(0, mt_getrandmax()).'spip'), 0, 8);
334 334
 			}
335 335
 		}
336 336
 
@@ -358,16 +358,16 @@  discard block
 block discarded – undo
358 358
 			}
359 359
 		} else {
360 360
 			// fabrique une chaine HTTP simple pour un POST
361
-			$entete = 'Content-Type: application/x-www-form-urlencoded' . "\r\n";
361
+			$entete = 'Content-Type: application/x-www-form-urlencoded'."\r\n";
362 362
 			$chaine = [];
363 363
 			if (is_array($donnees)) {
364 364
 				foreach ($donnees as $cle => $valeur) {
365 365
 					if (is_array($valeur)) {
366 366
 						foreach ($valeur as $val2) {
367
-							$chaine[] = rawurlencode($cle) . '[]=' . rawurlencode($val2);
367
+							$chaine[] = rawurlencode($cle).'[]='.rawurlencode($val2);
368 368
 						}
369 369
 					} else {
370
-						$chaine[] = rawurlencode($cle) . '=' . rawurlencode($valeur);
370
+						$chaine[] = rawurlencode($cle).'='.rawurlencode($valeur);
371 371
 					}
372 372
 				}
373 373
 				$chaine = implode('&', $chaine);
@@ -468,13 +468,13 @@  discard block
 block discarded – undo
468 468
 		$options['taille_max'] = $copy ? _COPIE_LOCALE_MAX_SIZE : _INC_DISTANT_MAX_SIZE;
469 469
 	}
470 470
 
471
-	spip_log('recuperer_url ' . $options['methode'] . " sur $url", 'distant' . _LOG_DEBUG);
471
+	spip_log('recuperer_url '.$options['methode']." sur $url", 'distant'._LOG_DEBUG);
472 472
 
473 473
 	// Ajout des en-têtes spécifiques si besoin
474 474
 	$formatted_data = '';
475 475
 	if (!empty($options['headers'])) {
476 476
 		foreach ($options['headers'] as $champ => $valeur) {
477
-			$formatted_data .= $champ . ': ' . $valeur . "\r\n";
477
+			$formatted_data .= $champ.': '.$valeur."\r\n";
478 478
 		}
479 479
 	}
480 480
 
@@ -482,9 +482,9 @@  discard block
 block discarded – undo
482 482
 		[$head, $postdata] = prepare_donnees_post($options['datas'], $options['boundary']);
483 483
 		$head .= $formatted_data;
484 484
 		if (stripos($head, 'Content-Length:') === false) {
485
-			$head .= 'Content-Length: ' . strlen($postdata) . "\r\n";
485
+			$head .= 'Content-Length: '.strlen($postdata)."\r\n";
486 486
 		}
487
-		$formatted_data = $head . "\r\n" . $postdata;
487
+		$formatted_data = $head."\r\n".$postdata;
488 488
 		if (
489 489
 			strlen($postdata)
490 490
 			and !$methode_demandee
@@ -498,9 +498,9 @@  discard block
 block discarded – undo
498 498
 	// Accepter les URLs au format feed:// ou qui ont oublie le http:// ou les urls relatives au protocole
499 499
 	$url = preg_replace(',^feed://,i', 'http://', $url);
500 500
 	if (!tester_url_absolue($url)) {
501
-		$url = 'http://' . $url;
501
+		$url = 'http://'.$url;
502 502
 	} elseif (strncmp($url, '//', 2) == 0) {
503
-		$url = 'http:' . $url;
503
+		$url = 'http:'.$url;
504 504
 	}
505 505
 
506 506
 	$url = url_to_ascii($url);
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 		$options['if_modified_since']
530 530
 	);
531 531
 	if (!$handle) {
532
-		spip_log("ECHEC init_http $url", 'distant' . _LOG_ERREUR);
532
+		spip_log("ECHEC init_http $url", 'distant'._LOG_ERREUR);
533 533
 
534 534
 		return false;
535 535
 	}
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 					'status' => 200,
560 560
 				];
561 561
 			} else {
562
-				spip_log("ECHEC chinoiserie $url", 'distant' . _LOG_ERREUR);
562
+				spip_log("ECHEC chinoiserie $url", 'distant'._LOG_ERREUR);
563 563
 				return false;
564 564
 			}
565 565
 		} elseif ($res['location'] and $options['follow_location']) {
@@ -575,11 +575,11 @@  discard block
 block discarded – undo
575 575
 					$options['datas'] = '';
576 576
 				}
577 577
 			}
578
-			spip_log('recuperer_url recommence ' . $options['methode'] . " sur $url", 'distant' . _LOG_DEBUG);
578
+			spip_log('recuperer_url recommence '.$options['methode']." sur $url", 'distant'._LOG_DEBUG);
579 579
 
580 580
 			return recuperer_url($url, $options);
581 581
 		} elseif ($res['status'] !== 200) {
582
-			spip_log('HTTP status ' . $res['status'] . " pour $url", 'distant');
582
+			spip_log('HTTP status '.$res['status']." pour $url", 'distant');
583 583
 		}
584 584
 		$result['status'] = $res['status'];
585 585
 		if (isset($res['headers'])) {
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 
596 596
 	// on ne veut que les entetes
597 597
 	if (!$options['taille_max'] or $options['methode'] == 'HEAD' or $result['status'] == '304') {
598
-		spip_log('RESULTAT recuperer_url ' . $options['methode'] . " sur $url : " . json_encode($result), 'distant' . _LOG_DEBUG);
598
+		spip_log('RESULTAT recuperer_url '.$options['methode']." sur $url : ".json_encode($result), 'distant'._LOG_DEBUG);
599 599
 		return $result;
600 600
 	}
601 601
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 
606 606
 	$gz = false;
607 607
 	if (preg_match(",\bContent-Encoding: .*gzip,is", $result['headers'])) {
608
-		$gz = (_DIR_TMP . md5(uniqid(random_int(0, mt_getrandmax()))) . '.tmp.gz');
608
+		$gz = (_DIR_TMP.md5(uniqid(random_int(0, mt_getrandmax()))).'.tmp.gz');
609 609
 	}
610 610
 
611 611
 	// si on a pas deja recuperer le contenu par une methode detournee
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 
642 642
 	$trace = json_decode(json_encode($result), true);
643 643
 	$trace['page'] = '...';
644
-	spip_log('RESULTAT recuperer_url ' . $options['methode'] . " sur $url : " . json_encode($trace), 'distant' . _LOG_DEBUG);
644
+	spip_log('RESULTAT recuperer_url '.$options['methode']." sur $url : ".json_encode($trace), 'distant'._LOG_DEBUG);
645 645
 
646 646
 	return $result;
647 647
 }
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 	$sig['url'] = $url;
696 696
 
697 697
 	$dir = sous_repertoire(_DIR_CACHE, 'curl');
698
-	$cache = md5(serialize($sig)) . '-' . substr(preg_replace(',\W+,', '_', $url), 0, 80);
698
+	$cache = md5(serialize($sig)).'-'.substr(preg_replace(',\W+,', '_', $url), 0, 80);
699 699
 	$sub = sous_repertoire($dir, substr($cache, 0, 2));
700 700
 	$cache = "$sub$cache";
701 701
 
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 	$fp = false;
750 750
 	if ($fichier) {
751 751
 		include_spip('inc/acces');
752
-		$tmpfile = "$fichier." . creer_uniqid() . '.tmp';
752
+		$tmpfile = "$fichier.".creer_uniqid().'.tmp';
753 753
 		$fp = spip_fopen_lock($tmpfile, 'w', LOCK_EX);
754 754
 		if (!$fp and file_exists($fichier)) {
755 755
 			return filesize($fichier);
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
 	}
809 809
 	$result['status'] = intval($r[1]);
810 810
 	while ($s = trim(fgets($handle, 16384))) {
811
-		$result['headers'][] = $s . "\n";
811
+		$result['headers'][] = $s."\n";
812 812
 		preg_match(',^([^:]*): *(.*)$,i', $s, $r);
813 813
 		[, $d, $v] = $r;
814 814
 		if (strtolower(trim($d)) == 'location' and $result['status'] >= 300 and $result['status'] < 400) {
@@ -857,13 +857,13 @@  discard block
 block discarded – undo
857 857
 
858 858
 	// on se place tout le temps comme si on etait a la racine
859 859
 	if (_DIR_RACINE) {
860
-		$d = preg_replace(',^' . preg_quote(_DIR_RACINE) . ',', '', $d);
860
+		$d = preg_replace(',^'.preg_quote(_DIR_RACINE).',', '', $d);
861 861
 	}
862 862
 
863 863
 	$m = md5($source);
864 864
 
865 865
 	return $d
866
-	. substr(preg_replace(',[^\w-],', '', basename($source)) . '-' . $m, 0, 12)
866
+	. substr(preg_replace(',[^\w-],', '', basename($source)).'-'.$m, 0, 12)
867 867
 	. substr($m, 0, 4)
868 868
 	. ".$extension";
869 869
 }
@@ -887,7 +887,7 @@  discard block
 block discarded – undo
887 887
 	// Si c'est deja local pas de souci
888 888
 	if (!tester_url_absolue($source)) {
889 889
 		if (_DIR_RACINE) {
890
-			$source = preg_replace(',^' . preg_quote(_DIR_RACINE) . ',', '', $source);
890
+			$source = preg_replace(',^'.preg_quote(_DIR_RACINE).',', '', $source);
891 891
 		}
892 892
 
893 893
 		return $source;
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
 		$ext
906 906
 		and preg_match(',^\w+$,', $ext) // pas de php?truc=1&...
907 907
 		and $f = nom_fichier_copie_locale($source, $ext)
908
-		and file_exists(_DIR_RACINE . $f)
908
+		and file_exists(_DIR_RACINE.$f)
909 909
 	) {
910 910
 		return $f;
911 911
 	}
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
 
914 914
 	// Si c'est deja dans la table des documents,
915 915
 	// ramener le nom de sa copie potentielle
916
-	$ext = sql_getfetsel('extension', 'spip_documents', 'fichier=' . sql_quote($source) . " AND distant='oui' AND extension <> ''");
916
+	$ext = sql_getfetsel('extension', 'spip_documents', 'fichier='.sql_quote($source)." AND distant='oui' AND extension <> ''");
917 917
 
918 918
 	if ($ext) {
919 919
 		return nom_fichier_copie_locale($source, $ext);
@@ -924,9 +924,9 @@  discard block
 block discarded – undo
924 924
 
925 925
 	$ext = $path_parts ? $path_parts['extension'] : '';
926 926
 
927
-	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension=' . sql_quote($ext))) {
927
+	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension='.sql_quote($ext))) {
928 928
 		$f = nom_fichier_copie_locale($source, $ext);
929
-		if (file_exists(_DIR_RACINE . $f)) {
929
+		if (file_exists(_DIR_RACINE.$f)) {
930 930
 			return $f;
931 931
 		}
932 932
 	}
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
 	// Ping  pour voir si son extension est connue et autorisee
935 935
 	// avec mise en cache du resultat du ping
936 936
 
937
-	$cache = sous_repertoire(_DIR_CACHE, 'rid') . md5($source);
937
+	$cache = sous_repertoire(_DIR_CACHE, 'rid').md5($source);
938 938
 	if (
939 939
 		!@file_exists($cache)
940 940
 		or !$path_parts = @unserialize(spip_file_get_contents($cache))
@@ -944,11 +944,11 @@  discard block
 block discarded – undo
944 944
 		ecrire_fichier($cache, serialize($path_parts));
945 945
 	}
946 946
 	$ext = !empty($path_parts['extension']) ? $path_parts['extension'] : '';
947
-	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension=' . sql_quote($ext))) {
947
+	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension='.sql_quote($ext))) {
948 948
 		return nom_fichier_copie_locale($source, $ext);
949 949
 	}
950 950
 
951
-	spip_log("pas de copie locale pour $source", 'distant' . _LOG_ERREUR);
951
+	spip_log("pas de copie locale pour $source", 'distant'._LOG_ERREUR);
952 952
 	return null;
953 953
 }
954 954
 
@@ -1047,7 +1047,7 @@  discard block
 block discarded – undo
1047 1047
 		} else {
1048 1048
 			if ($a['body']) {
1049 1049
 				$a['extension'] = $extension;
1050
-				$a['fichier'] = _DIR_RACINE . nom_fichier_copie_locale($source, $extension);
1050
+				$a['fichier'] = _DIR_RACINE.nom_fichier_copie_locale($source, $extension);
1051 1051
 				ecrire_fichier($a['fichier'], $a['body']);
1052 1052
 				$size_image = @spip_getimagesize($a['fichier']);
1053 1053
 				$a['largeur'] = intval($size_image[0]);
@@ -1115,20 +1115,20 @@  discard block
 block discarded – undo
1115 1115
 			!$t
1116 1116
 			and preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $source, $rext)
1117 1117
 		) {
1118
-			$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1118
+			$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1119 1119
 		}
1120 1120
 		if (
1121 1121
 			!$t
1122 1122
 			and preg_match(',^Content-Disposition:\s*attachment;\s*filename=(.*)$,Uims', $headers, $m)
1123 1123
 			and preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $m[1], $rext)
1124 1124
 		) {
1125
-			$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1125
+			$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1126 1126
 		}
1127 1127
 	}
1128 1128
 
1129 1129
 	// Autre mime/type (ou text/plain avec fichier d'extension inconnue)
1130 1130
 	if (!$t) {
1131
-		$t = sql_fetsel('extension', 'spip_types_documents', 'mime_type=' . sql_quote($mime_type));
1131
+		$t = sql_fetsel('extension', 'spip_types_documents', 'mime_type='.sql_quote($mime_type));
1132 1132
 	}
1133 1133
 
1134 1134
 	// Toujours rien ? (ex: audio/x-ogg au lieu de application/ogg)
@@ -1139,11 +1139,11 @@  discard block
 block discarded – undo
1139 1139
 		and preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $source, $rext)
1140 1140
 	) {
1141 1141
 		# eviter xxx.3 => 3gp (> SPIP 3)
1142
-		$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1142
+		$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1143 1143
 	}
1144 1144
 
1145 1145
 	if ($t) {
1146
-		spip_log("mime-type $mime_type ok, extension " . $t['extension'], 'distant');
1146
+		spip_log("mime-type $mime_type ok, extension ".$t['extension'], 'distant');
1147 1147
 		return $t['extension'];
1148 1148
 	} else {
1149 1149
 		# par defaut on retombe sur '.bin' si c'est autorise
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 		}
1247 1247
 	} else {
1248 1248
 		$scheme = $t['scheme'];
1249
-		$noproxy = $scheme . '://';
1249
+		$noproxy = $scheme.'://';
1250 1250
 	}
1251 1251
 	if (isset($t['user'])) {
1252 1252
 		$user = [$t['user'], $t['pass']];
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
 	}
1261 1261
 
1262 1262
 	if (!empty($t['query'])) {
1263
-		$path .= '?' . $t['query'];
1263
+		$path .= '?'.$t['query'];
1264 1264
 	}
1265 1265
 
1266 1266
 	$f = lance_requete($method, $scheme, $user, $host, $path, $port, $noproxy, $refuse_gz, $referer, $datas, $vers, $date);
@@ -1334,29 +1334,29 @@  discard block
 block discarded – undo
1334 1334
 	$proxy_user = '';
1335 1335
 	$http_proxy = need_proxy($host);
1336 1336
 	if ($user) {
1337
-		$user = urlencode($user[0]) . ':' . urlencode($user[1]);
1337
+		$user = urlencode($user[0]).':'.urlencode($user[1]);
1338 1338
 	}
1339 1339
 
1340 1340
 	$connect = '';
1341 1341
 	if ($http_proxy) {
1342
-		if (!defined('_PROXY_HTTPS_NOT_VIA_CONNECT') and in_array($scheme, ['tls','ssl'])) {
1343
-			$path_host = (!$user ? '' : "$user@") . $host . (($port != 80) ? ":$port" : '');
1344
-			$connect = 'CONNECT ' . $path_host . " $vers\r\n"
1342
+		if (!defined('_PROXY_HTTPS_NOT_VIA_CONNECT') and in_array($scheme, ['tls', 'ssl'])) {
1343
+			$path_host = (!$user ? '' : "$user@").$host.(($port != 80) ? ":$port" : '');
1344
+			$connect = 'CONNECT '.$path_host." $vers\r\n"
1345 1345
 				. "Host: $path_host\r\n"
1346 1346
 				. "Proxy-Connection: Keep-Alive\r\n";
1347 1347
 		} else {
1348
-			$path = (in_array($scheme, ['tls','ssl']) ? 'https://' : "$scheme://")
1348
+			$path = (in_array($scheme, ['tls', 'ssl']) ? 'https://' : "$scheme://")
1349 1349
 				. (!$user ? '' : "$user@")
1350
-				. "$host" . (($port != 80) ? ":$port" : '') . $path;
1350
+				. "$host".(($port != 80) ? ":$port" : '').$path;
1351 1351
 		}
1352 1352
 		$t2 = @parse_url($http_proxy);
1353 1353
 		$first_host = $t2['host'];
1354 1354
 		$first_port = ($t2['port'] ?? null) ?: 80;
1355 1355
 		if ($t2['user'] ?? null) {
1356
-			$proxy_user = base64_encode($t2['user'] . ':' . $t2['pass']);
1356
+			$proxy_user = base64_encode($t2['user'].':'.$t2['pass']);
1357 1357
 		}
1358 1358
 	} else {
1359
-		$first_host = $noproxy . $host;
1359
+		$first_host = $noproxy.$host;
1360 1360
 		$first_port = $port;
1361 1361
 	}
1362 1362
 
@@ -1379,7 +1379,7 @@  discard block
 block discarded – undo
1379 1379
 		);
1380 1380
 		spip_log("Recuperer $path sur $first_host:$first_port par $f (via CONNECT)", 'connect');
1381 1381
 		if (!$f) {
1382
-			spip_log("Erreur connexion $errno $errstr", 'distant' . _LOG_ERREUR);
1382
+			spip_log("Erreur connexion $errno $errstr", 'distant'._LOG_ERREUR);
1383 1383
 			return $errno;
1384 1384
 		}
1385 1385
 		stream_set_timeout($f, _INC_DISTANT_CONNECT_TIMEOUT);
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
 			or !count($res = explode(' ', $res))
1393 1393
 			or $res[1] !== '200'
1394 1394
 		) {
1395
-			spip_log("Echec CONNECT sur $first_host:$first_port", 'connect' . _LOG_INFO_IMPORTANTE);
1395
+			spip_log("Echec CONNECT sur $first_host:$first_port", 'connect'._LOG_INFO_IMPORTANTE);
1396 1396
 			fclose($f);
1397 1397
 
1398 1398
 			return false;
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
 		} while (!$f and $ntry-- and $errno !== 110 and sleep(1));
1410 1410
 		spip_log("Recuperer $path sur $first_host:$first_port par $f");
1411 1411
 		if (!$f) {
1412
-			spip_log("Erreur connexion $errno $errstr", 'distant' . _LOG_ERREUR);
1412
+			spip_log("Erreur connexion $errno $errstr", 'distant'._LOG_ERREUR);
1413 1413
 
1414 1414
 			return $errno;
1415 1415
 		}
@@ -1419,16 +1419,16 @@  discard block
 block discarded – undo
1419 1419
 	$site = $GLOBALS['meta']['adresse_site'] ?? '';
1420 1420
 
1421 1421
 	$host_port = $host;
1422
-	if ($port != (in_array($scheme, ['tls','ssl']) ? 443 : 80)) {
1422
+	if ($port != (in_array($scheme, ['tls', 'ssl']) ? 443 : 80)) {
1423 1423
 		$host_port .= ":$port";
1424 1424
 	}
1425 1425
 	$req = "$method $path $vers\r\n"
1426 1426
 		. "Host: $host_port\r\n"
1427
-		. 'User-Agent: ' . _INC_DISTANT_USER_AGENT . "\r\n"
1428
-		. ($refuse_gz ? '' : ('Accept-Encoding: ' . _INC_DISTANT_CONTENT_ENCODING . "\r\n"))
1427
+		. 'User-Agent: '._INC_DISTANT_USER_AGENT."\r\n"
1428
+		. ($refuse_gz ? '' : ('Accept-Encoding: '._INC_DISTANT_CONTENT_ENCODING."\r\n"))
1429 1429
 		. (!$site ? '' : "Referer: $site/$referer\r\n")
1430
-		. (!$date ? '' : 'If-Modified-Since: ' . (gmdate('D, d M Y H:i:s', $date) . " GMT\r\n"))
1431
-		. (!$user ? '' : ('Authorization: Basic ' . base64_encode($user) . "\r\n"))
1430
+		. (!$date ? '' : 'If-Modified-Since: '.(gmdate('D, d M Y H:i:s', $date)." GMT\r\n"))
1431
+		. (!$user ? '' : ('Authorization: Basic '.base64_encode($user)."\r\n"))
1432 1432
 		. (!$proxy_user ? '' : "Proxy-Authorization: Basic $proxy_user\r\n")
1433 1433
 		. (!strpos($vers, '1.1') ? '' : "Keep-Alive: 300\r\nConnection: keep-alive\r\n");
1434 1434
 
Please login to merge, or discard this patch.
ecrire/inc/texte_mini.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	// celle du texte) et public (spip_lang est la langue du texte)
44 44
 	$dir = _DIR_RESTREINT ? lang_dir() : lang_dir($GLOBALS['spip_lang']);
45 45
 
46
-	$p = 'puce' . (test_espace_prive() ? '_prive' : '');
46
+	$p = 'puce'.(test_espace_prive() ? '_prive' : '');
47 47
 	if ($dir == 'rtl') {
48 48
 		$p .= '_rtl';
49 49
 	}
50 50
 
51 51
 	if (!isset($GLOBALS[$p])) {
52
-		$GLOBALS[$p] = '<span class="spip-puce ' . $dir . '"><b>–</b></span>';
52
+		$GLOBALS[$p] = '<span class="spip-puce '.$dir.'"><b>–</b></span>';
53 53
 	}
54 54
 
55 55
 	return $GLOBALS[$p];
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 function spip_balisage_code(string $corps, bool $bloc = false, string $attributs = '', string $langage = '') {
68 68
 
69 69
 	$echap = spip_htmlspecialchars($corps); // il ne faut pas passer dans entites_html, ne pas transformer les &#xxx; du code !
70
-	$class = "spip_code " . ($bloc ? 'spip_code_block' : 'spip_code_inline');
70
+	$class = "spip_code ".($bloc ? 'spip_code_block' : 'spip_code_inline');
71 71
 	if ($attributs) {
72
-		$attributs = " " . trim($attributs);
72
+		$attributs = " ".trim($attributs);
73 73
 	}
74 74
 	if ($langage) {
75 75
 		$class .= " language-$langage";
76
-		$attributs .= ' data-language="'. $langage .'"';
76
+		$attributs .= ' data-language="'.$langage.'"';
77 77
 	}
78 78
 	if ($bloc) {
79 79
 		$html = "<div class=\"precode\">"
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	else {
88 88
 		$echap = str_replace("\t", "&nbsp; &nbsp; &nbsp; &nbsp; ", $echap);
89 89
 		$echap = str_replace("  ", " &nbsp;", $echap);
90
-		$html = "<code class=\"$class\" dir=\"ltr\"$attributs>" . $echap . '</code>';
90
+		$html = "<code class=\"$class\" dir=\"ltr\"$attributs>".$echap.'</code>';
91 91
 	}
92 92
 
93 93
 	return $html;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 }
106 106
 
107 107
 if (!defined('_BALISES_BLOCS_REGEXP')) {
108
-	define('_BALISES_BLOCS_REGEXP', ',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS');
108
+	define('_BALISES_BLOCS_REGEXP', ',</?('._BALISES_BLOCS.')[>[:space:]],iS');
109 109
 }
110 110
 
111 111
 //
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
 	// Tester si on echappe en span ou en div
124 124
 	if (is_null($mode) or !in_array($mode, ['div', 'span'])) {
125
-		$mode = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $rempl) ? 'div' : 'span';
125
+		$mode = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $rempl) ? 'div' : 'span';
126 126
 	}
127 127
 
128 128
 	// Decouper en morceaux, base64 a des probleme selon la taille de la pile
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	) {
158 158
 		foreach ($matches as $m) {
159 159
 			if ($m[1] === 'code') {
160
-				$code = '<code' . $m[2] . '>' . spip_htmlspecialchars($m[3]) . '</code>';
160
+				$code = '<code'.$m[2].'>'.spip_htmlspecialchars($m[3]).'</code>';
161 161
 				$pre = str_replace($m[0], $code, $pre);
162 162
 			}
163 163
 		}
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
 // Echapper les <code>...</ code>
169 169
 function traiter_echap_code_dist($regs, $options = []) {
170
-	[, , $att, $corps] = $regs;
170
+	[,, $att, $corps] = $regs;
171 171
 
172 172
 	// ne pas mettre le <div...> s'il n'y a qu'une ligne
173 173
 	if (strpos($corps, "\n") !== false) {
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
 				// sinon les traiter selon le cas
253 253
 				$callback_secure_prefix = ($callback_options['secure_prefix'] ?? '');
254 254
 				if (
255
-					function_exists($f = $callback_prefix . $callback_secure_prefix . 'traiter_echap_' . strtolower($regs[1]))
256
-					or function_exists($f = $f . '_dist')
255
+					function_exists($f = $callback_prefix.$callback_secure_prefix.'traiter_echap_'.strtolower($regs[1]))
256
+					or function_exists($f = $f.'_dist')
257 257
 					or ($callback_secure_prefix and (
258
-						function_exists($f = $callback_prefix . 'traiter_echap_' . strtolower($regs[1]))
259
-						or function_exists($f = $f . '_dist')
258
+						function_exists($f = $callback_prefix.'traiter_echap_'.strtolower($regs[1]))
259
+						or function_exists($f = $f.'_dist')
260 260
 					))
261 261
 				) {
262 262
 					$echap = $f($regs, $callback_options);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	// dans une callback autonommee
279 279
 	if (strpos($preg ?: _PROTEGE_BLOCS, 'script') !== false) {
280 280
 		if (
281
-			strpos($letexte, '<' . '?') !== false and preg_match_all(
281
+			strpos($letexte, '<'.'?') !== false and preg_match_all(
282 282
 				',<[?].*($|[?]>),UisS',
283 283
 				$letexte,
284 284
 				$matches,
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 			strpos($letexte, '<') !== false
311 311
 			and
312 312
 			preg_match_all(
313
-				',<(span|div)\sclass=[\'"]base64' . $source . '[\'"]\s(.*)>\s*</\1>,UmsS',
313
+				',<(span|div)\sclass=[\'"]base64'.$source.'[\'"]\s(.*)>\s*</\1>,UmsS',
314 314
 				$letexte,
315 315
 				$regs,
316 316
 				PREG_SET_ORDER
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 					}
328 328
 				}
329 329
 				if ($at) {
330
-					$rempl = '<' . $reg[1] . '>' . $rempl . '</' . $reg[1] . '>';
330
+					$rempl = '<'.$reg[1].'>'.$rempl.'</'.$reg[1].'>';
331 331
 					foreach ($at as $attr => $a) {
332 332
 						$rempl = inserer_attribut($rempl, $attr, $a);
333 333
 					}
@@ -408,8 +408,8 @@  discard block
 block discarded – undo
408 408
 	$texte = nettoyer_raccourcis_typo($texte);
409 409
 
410 410
 	// balises de sauts de ligne et paragraphe
411
-	$texte = preg_replace('/<p( [^>]*)?' . '>/', "\r\r", $texte);
412
-	$texte = preg_replace('/<br( [^>]*)?' . '>/', "\n", $texte);
411
+	$texte = preg_replace('/<p( [^>]*)?'.'>/', "\r\r", $texte);
412
+	$texte = preg_replace('/<br( [^>]*)?'.'>/', "\n", $texte);
413 413
 
414 414
 	// on repasse les doubles \n en \r que nettoyer_raccourcis_typo() a pu modifier
415 415
 	$texte = str_replace("\n\n", "\r\r", $texte);
@@ -434,15 +434,15 @@  discard block
 block discarded – undo
434 434
 		// excédentaire est ensuite supprimé par l'appel à preg_replace()
435 435
 		$long = spip_substr($texte, 0, max($taille + 1 - $taille_suite, 1));
436 436
 		$u = $GLOBALS['meta']['pcre_u'];
437
-		$court = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D' . $u, "\\2", $long);
437
+		$court = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D'.$u, "\\2", $long);
438 438
 		$points = $suite;
439 439
 
440 440
 		// trop court ? ne pas faire de (...)
441 441
 		if (spip_strlen($court) < max(0.75 * $taille, 2)) {
442 442
 			$points = '';
443 443
 			$long = spip_substr($texte, 0, $taille + 1);
444
-			preg_match('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D' . $u, $long, $m);
445
-			$texte = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D' . $u, "\\2", $long);
444
+			preg_match('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D'.$u, $long, $m);
445
+			$texte = preg_replace('/(^|([^\s ])[\s ]+)([\s ]|[^\s ]+)?$/D'.$u, "\\2", $long);
446 446
 			// encore trop court ? couper au caractere
447 447
 			if (spip_strlen($texte) < 0.75 * $taille) {
448 448
 				$texte = spip_substr($long, 0, $taille);
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 	// supprimer l'eventuelle entite finale mal coupee
459 459
 	$texte = preg_replace('/&#?[a-z0-9]*$/S', '', $texte);
460 460
 
461
-	return quote_amp(trim($texte)) . $points;
461
+	return quote_amp(trim($texte)).$points;
462 462
 }
463 463
 
464 464
 
@@ -470,16 +470,16 @@  discard block
 block discarded – undo
470 470
 				define('_PROTEGE_JS_MODELES', creer_uniqid());
471 471
 			}
472 472
 			foreach ($r as $regs) {
473
-				$t = str_replace($regs[0], code_echappement($regs[0], 'javascript' . _PROTEGE_JS_MODELES), $t);
473
+				$t = str_replace($regs[0], code_echappement($regs[0], 'javascript'._PROTEGE_JS_MODELES), $t);
474 474
 			}
475 475
 		}
476
-		if (preg_match_all(',<\?php.*?($|\?' . '>),isS', $t, $r, PREG_SET_ORDER)) {
476
+		if (preg_match_all(',<\?php.*?($|\?'.'>),isS', $t, $r, PREG_SET_ORDER)) {
477 477
 			if (!defined('_PROTEGE_PHP_MODELES')) {
478 478
 				include_spip('inc/acces');
479 479
 				define('_PROTEGE_PHP_MODELES', creer_uniqid());
480 480
 			}
481 481
 			foreach ($r as $regs) {
482
-				$t = str_replace($regs[0], code_echappement($regs[0], 'php' . _PROTEGE_PHP_MODELES), $t);
482
+				$t = str_replace($regs[0], code_echappement($regs[0], 'php'._PROTEGE_PHP_MODELES), $t);
483 483
 			}
484 484
 		}
485 485
 	}
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 			if (!empty($options['wrap_suspect'])) {
598 598
 				$texte = wrap($texte, $options['wrap_suspect']);
599 599
 			}
600
-			$texte = "<mark class='danger-js' title='" . attribut_html(_T('erreur_contenu_suspect')) . "'>⚠️</mark> " . $texte;
600
+			$texte = "<mark class='danger-js' title='".attribut_html(_T('erreur_contenu_suspect'))."'>⚠️</mark> ".$texte;
601 601
 		}
602 602
 
603 603
 		$texte = $collecteurModeles->retablir($texte);
@@ -744,11 +744,11 @@  discard block
 block discarded – undo
744 744
  **/
745 745
 function supprime_img($letexte, $message = null) {
746 746
 	if ($message === null) {
747
-		$message = '(' . _T('img_indisponible') . ')';
747
+		$message = '('._T('img_indisponible').')';
748 748
 	}
749 749
 
750 750
 	return preg_replace(
751
-		',<(img|doc|emb)([0-9]+)(\|([^>]*))?' . '\s*/?' . '>,i',
751
+		',<(img|doc|emb)([0-9]+)(\|([^>]*))?'.'\s*/?'.'>,i',
752 752
 		$message,
753 753
 		$letexte
754 754
 	);
Please login to merge, or discard this patch.