Completed
Push — master ( b22279...3633cd )
by cam
01:26
created
ecrire/inc/install.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
  * @return void
44 44
  **/
45 45
 function install_fichier_connexion($nom, $texte) {
46
-	$texte = '<' . "?php\n"
46
+	$texte = '<'."?php\n"
47 47
 		. "if (!defined(\"_ECRIRE_INC_VERSION\")) return;\n"
48 48
 		. $texte
49
-		. '?' . '>';
49
+		. '?'.'>';
50 50
 
51 51
 	ecrire_fichier($nom, $texte);
52 52
 }
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
 		return $regs;
114 114
 	} else {
115 115
 		$ar = '\s*\'([^\']*)\'';
116
-		$r = '\s*,' . $ar;
116
+		$r = '\s*,'.$ar;
117 117
 		$r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r(?:$r)?)?)?)?#";
118 118
 		if (preg_match($r, $s, $regs)) {
119
-			$regs[2] = $regs[1] . (!$regs[2] ? '' : ':' . $regs[2] . ';');
119
+			$regs[2] = $regs[1].(!$regs[2] ? '' : ':'.$regs[2].';');
120 120
 			array_shift($regs);
121 121
 			array_shift($regs);
122 122
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	// Si on n'a pas la bonne version de PHP, c'est la fin
175 175
 	if ($err) {
176 176
 		die("<div class='error'>"
177
-			. '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>"
177
+			. '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>"
178 178
 			. "<li><strong>{$err[0]}</strong></li>\n</ul></div>");
179 179
 	}
180 180
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
 	if ($err) {
203 203
 		echo "<div class='error'>"
204
-			. '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>";
204
+			. '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>";
205 205
 		foreach ($err as $e) {
206 206
 			echo "<li><strong>$e</strong></li>\n";
207 207
 		}
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 
236 236
 // https://code.spip.net/@info_etape
237 237
 function info_etape($titre, $complement = '') {
238
-	return '<h2>' . $titre . "</h2>\n" .
239
-	($complement ? '' . $complement . "\n" : '');
238
+	return '<h2>'.$titre."</h2>\n".
239
+	($complement ? ''.$complement."\n" : '');
240 240
 }
241 241
 
242 242
 /**
@@ -250,18 +250,18 @@  discard block
 block discarded – undo
250 250
 		$code = _T('bouton_suivant');
251 251
 	}
252 252
 	static $suivant = 0;
253
-	$id = 'suivant' . (($suivant > 0) ? strval($suivant) : '');
253
+	$id = 'suivant'.(($suivant > 0) ? strval($suivant) : '');
254 254
 	$suivant += 1;
255 255
 
256
-	return "\n<p class='boutons suivant'><input id='" . $id . "' type='submit'\nvalue=\"" .
257
-	$code .
256
+	return "\n<p class='boutons suivant'><input id='".$id."' type='submit'\nvalue=\"".
257
+	$code.
258 258
 	" >>\" /></p>\n";
259 259
 }
260 260
 
261 261
 // https://code.spip.net/@info_progression_etape
262 262
 function info_progression_etape($en_cours, $phase, $dir, $erreur = false) {
263 263
 	//$en_cours = _request('etape')?_request('etape'):"";
264
-	$liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$');
264
+	$liste = find_all_in_path($dir, $phase.'(([0-9])+|fin)[.]php$');
265 265
 	$debut = 1;
266 266
 	$etat = 'ok';
267 267
 	$last = count($liste);
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
 			$aff_etapes .= "<li class='$class'><div class='fond'>";
302 302
 			$aff_etapes .= ($debut == $en_cours) ? '<strong>' : '';
303
-			$aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em>&nbsp;: </em>";
303
+			$aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em>&nbsp;: </em>";
304 304
 			$aff_etapes .= $intitule_etat["$phase"][$debut];
305 305
 			$aff_etapes .= ($debut == $en_cours) ? '</strong>' : '';
306 306
 			$aff_etapes .= '</div></li>';
@@ -316,11 +316,11 @@  discard block
 block discarded – undo
316 316
 
317 317
 // https://code.spip.net/@fieldset
318 318
 function fieldset($legend, $champs = [], $apres = '', $avant = '') {
319
-	return "<fieldset>\n" .
320
-	$avant .
321
-	($legend ? '<legend>' . $legend . "</legend>\n" : '') .
322
-	fieldset_champs($champs) .
323
-	$apres .
319
+	return "<fieldset>\n".
320
+	$avant.
321
+	($legend ? '<legend>'.$legend."</legend>\n" : '').
322
+	fieldset_champs($champs).
323
+	$apres.
324 324
 	"</fieldset>\n";
325 325
 }
326 326
 
@@ -330,18 +330,18 @@  discard block
 block discarded – undo
330 330
 		$type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', $nom) ? 'password' : 'text');
331 331
 		$class = isset($contenu['hidden']) ? '' : "class='formo' size='40' ";
332 332
 		if (isset($contenu['alternatives'])) {
333
-			$fieldset .= $contenu['label'] . "\n";
333
+			$fieldset .= $contenu['label']."\n";
334 334
 			foreach ($contenu['alternatives'] as $valeur => $label) {
335
-				$fieldset .= "<input type='radio' name='" . $nom .
335
+				$fieldset .= "<input type='radio' name='".$nom.
336 336
 					"' id='$nom-$valeur' value='$valeur'"
337 337
 					. (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '')
338 338
 					. "/>\n";
339
-				$fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n";
339
+				$fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n";
340 340
 			}
341 341
 			$fieldset .= "<br />\n";
342 342
 		} else {
343
-			$fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n";
344
-			$fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'"
343
+			$fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n";
344
+			$fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'"
345 345
 				. (preg_match(',^(pass|login),', $nom) ? " autocomplete='off'" : '')
346 346
 				. ((isset($contenu['required']) and $contenu['required']) ? " required='required'" : '')
347 347
 				. " />\n";
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
 function install_select_serveur() {
355 355
 	$options = [];
356
-	$dir = _DIR_RESTREINT . 'req/';
356
+	$dir = _DIR_RESTREINT.'req/';
357 357
 	$d = opendir($dir);
358 358
 	if (!$d) {
359 359
 		return [];
@@ -361,17 +361,17 @@  discard block
 block discarded – undo
361 361
 	while (($f = readdir($d)) !== false) {
362 362
 		if (
363 363
 			(preg_match('/^(.*)[.]php$/', $f, $s))
364
-			and is_readable($f = $dir . $f)
364
+			and is_readable($f = $dir.$f)
365 365
 		) {
366 366
 			require_once($f);
367 367
 			$s = $s[1];
368
-			$v = 'spip_versions_' . $s;
368
+			$v = 'spip_versions_'.$s;
369 369
 			if (function_exists($v) and $v()) {
370 370
 				$titre = _T("install_select_type_$s");
371 371
 				// proposer mysql par defaut si dispo
372 372
 				$checked = ($s == 'mysql' ? " checked='checked'" : '');
373 373
 				$options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>"
374
-					. "<label for='$s'>" . ($titre ? $titre : $s) . '</label></li>';
374
+					. "<label for='$s'>".($titre ? $titre : $s).'</label></li>';
375 375
 			} else {
376 376
 				spip_log("$s: portage indisponible");
377 377
 			}
@@ -390,8 +390,8 @@  discard block
 block discarded – undo
390 390
 		"\n<input type='hidden' name='etape' value='$etape' />"
391 391
 		. $hidden
392 392
 		. (_request('echec') ?
393
-			('<p><b>' . _T('avis_connexion_echec_1') .
394
-				'</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>')
393
+			('<p><b>'._T('avis_connexion_echec_1').
394
+				'</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>')
395 395
 			: '')
396 396
 
397 397
 		. ($jquery ? http_script('', 'jquery.js') : '')
@@ -429,9 +429,9 @@  discard block
 block discarded – undo
429 429
 		});')
430 430
 
431 431
 		. ($server_db
432
-			? '<input type="hidden" name="server_db" value="' . $server_db . '" />'
432
+			? '<input type="hidden" name="server_db" value="'.$server_db.'" />'
433 433
 			. (($predef[0])
434
-				? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>')
434
+				? ('<h3>'._T('install_serveur_hebergeur').'</h3>')
435 435
 				: '')
436 436
 			: ('<fieldset><legend>'
437 437
 				. _T('install_select_type_db')
@@ -446,9 +446,9 @@  discard block
 block discarded – undo
446 446
 				. "\n</ul>\n</div></fieldset>")
447 447
 		)
448 448
 		. '<div id="install_adresse_base_hebergeur">'
449
-		. '<p>' . _T('texte_connexion_mysql') . '</p>'
449
+		. '<p>'._T('texte_connexion_mysql').'</p>'
450 450
 		. ($predef[1]
451
-			? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>'
451
+			? '<h3>'._T('install_adresse_base_hebergeur').'</h3>'
452 452
 			: fieldset(
453 453
 				_T('entree_base_donnee_1'),
454 454
 				[
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 
464 464
 		. '<div id="install_login_base_hebergeur">'
465 465
 		. ($predef[2]
466
-			? '<h3>' . _T('install_login_base_hebergeur') . '</h3>'
466
+			? '<h3>'._T('install_login_base_hebergeur').'</h3>'
467 467
 			: fieldset(
468 468
 				_T('entree_login_connexion_1'),
469 469
 				[
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 
479 479
 		. '<div id="install_pass_base_hebergeur">'
480 480
 		. ($predef[3]
481
-			? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>'
481
+			? '<h3>'._T('install_pass_base_hebergeur').'</h3>'
482 482
 			: fieldset(
483 483
 				_T('entree_mot_passe_1'),
484 484
 				[
@@ -501,20 +501,20 @@  discard block
 block discarded – undo
501 501
 function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) {
502 502
 	return ((defined('_INSTALL_HOST_DB'))
503 503
 		? ''
504
-		: "\n<input type='hidden' name='adresse_db'  value=\"" . spip_htmlspecialchars($adresse_db) . '" />'
504
+		: "\n<input type='hidden' name='adresse_db'  value=\"".spip_htmlspecialchars($adresse_db).'" />'
505 505
 	)
506 506
 	. ((defined('_INSTALL_USER_DB'))
507 507
 		? ''
508
-		: "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />'
508
+		: "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />'
509 509
 	)
510 510
 	. ((defined('_INSTALL_PASS_DB'))
511 511
 		? ''
512
-		: "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />'
512
+		: "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />'
513 513
 	)
514 514
 
515 515
 	. ((defined('_INSTALL_SERVER_DB'))
516 516
 		? ''
517
-		: "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />'
517
+		: "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />'
518 518
 	);
519 519
 }
520 520
 
Please login to merge, or discard this patch.
ecrire/inc/icone_renommer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
 
48 48
 	$dir = 'images/';
49 49
 	$f = "$type-$size.png";
50
-	if ($icone = find_in_theme($dir . $f)) {
50
+	if ($icone = find_in_theme($dir.$f)) {
51 51
 		$dir = dirname($icone);
52 52
 		$fond = $icone;
53 53
 
54 54
 		if (
55 55
 			$rtl
56
-			and $fr = $dir . '/' . str_replace("$type-", "$type-rtl-", basename($icone))
56
+			and $fr = $dir.'/'.str_replace("$type-", "$type-rtl-", basename($icone))
57 57
 			and file_exists($fr)
58 58
 		) {
59 59
 			$fond = $fr;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		}
70 70
 
71 71
 		$fonction = '';
72
-		if (in_array($action, ['add','del', 'new', 'edit', 'config'])) {
72
+		if (in_array($action, ['add', 'del', 'new', 'edit', 'config'])) {
73 73
 			$fonction = $action;
74 74
 		}
75 75
 
Please login to merge, or discard this patch.
ecrire/inc/presenter_enfants.php 1 patch
Spacing   +25 added lines, -26 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	$result = sql_select(
44 44
 		'id_rubrique, id_parent, titre, descriptif, lang',
45 45
 		'spip_rubriques',
46
-		'id_parent=' . intval($collection),
46
+		'id_parent='.intval($collection),
47 47
 		'',
48 48
 		'0+titre,titre',
49 49
 		"$debut,$limite"
@@ -74,19 +74,18 @@  discard block
 block discarded – undo
74 74
 				}
75 75
 			}
76 76
 
77
-			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' :
78
-					http_img_pack(
77
+			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : http_img_pack(
79 78
 						'auteur-0minirezo-16.png',
80 79
 						'',
81 80
 						" width='16' height='16'",
82 81
 						_T('image_administrer_rubrique')
83
-					)) .
84
-				" <a class='titremlien' dir='$lang_dir'" .
85
-				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') .
86
-				" href='" .
87
-				generer_url_entite($id_rubrique, 'rubrique') .
88
-				"'><span class='titre'>" .
89
-				$rang . $titre
82
+					)).
83
+				" <a class='titremlien' dir='$lang_dir'".
84
+				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : '').
85
+				" href='".
86
+				generer_url_entite($id_rubrique, 'rubrique').
87
+				"'><span class='titre'>".
88
+				$rang.$titre
90 89
 				. '</span>'
91 90
 				. (is_string($logo) ? $logo : '')
92 91
 				. '</a>';
@@ -96,8 +95,8 @@  discard block
 block discarded – undo
96 95
 				;
97 96
 
98 97
 			$res[] =
99
-				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) .
100
-				$les_sous_enfants .
98
+				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre).
99
+				$les_sous_enfants.
101 100
 				fin_cadre_sous_rub(true);
102 101
 		}
103 102
 	}
@@ -116,7 +115,7 @@  discard block
 block discarded – undo
116 115
  *  Le contenu du bloc dépliable
117 116
  */
118 117
 function sous_enfant_rub($collection2) {
119
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($collection2));
118
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($collection2));
120 119
 
121 120
 	$retour = '';
122 121
 	$pagination = '';
@@ -128,23 +127,23 @@  discard block
 block discarded – undo
128 127
 	 * Si > 500 on affiche une pagination
129 128
 	 */
130 129
 	if ($nb > $limite) {
131
-		$debut = _request('debut_rubrique' . $collection2) ? _request('debut_rubrique' . $collection2) : $debut;
130
+		$debut = _request('debut_rubrique'.$collection2) ? _request('debut_rubrique'.$collection2) : $debut;
132 131
 		$pagination = chercher_filtre('pagination');
133
-		$pagination = '<p class="pagination">' . $pagination(
132
+		$pagination = '<p class="pagination">'.$pagination(
134 133
 			$nb,
135
-			'_rubrique' . $collection2,
134
+			'_rubrique'.$collection2,
136 135
 			$debut,
137 136
 			$limite,
138 137
 			true,
139 138
 			'prive'
140
-		) . '</p>';
139
+		).'</p>';
141 140
 		$limite = $debut + $limite;
142 141
 	}
143 142
 
144 143
 	$result = sql_select(
145 144
 		'id_rubrique, id_parent, titre, lang',
146 145
 		'spip_rubriques',
147
-		'id_parent=' . intval($collection2),
146
+		'id_parent='.intval($collection2),
148 147
 		'',
149 148
 		'0+titre,titre',
150 149
 		"$debut,$limite"
@@ -164,14 +163,14 @@  discard block
 block discarded – undo
164 163
 		changer_typo($row['lang']);
165 164
 		$lang_dir = lang_dir($row['lang']);
166 165
 		if (autoriser('voir', 'rubrique', $id_rubrique2)) {
167
-			$retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_url_entite(
166
+			$retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_url_entite(
168 167
 				$id_rubrique2,
169 168
 				'rubrique'
170
-			) . "'>" . $rang2 . $titre2 . "</a></li>\n";
169
+			)."'>".$rang2.$titre2."</a></li>\n";
171 170
 		}
172 171
 	}
173 172
 
174
-	$retour = $pagination . $retour . $pagination;
173
+	$retour = $pagination.$retour.$pagination;
175 174
 
176 175
 	if (!$retour) {
177 176
 		return '';
@@ -180,7 +179,7 @@  discard block
 block discarded – undo
180 179
 	return debut_block_depliable($debut > 0 ? true : false, "enfants$collection2")
181 180
 	. "\n<ul class='liste-items sous-sous-rub'>\n"
182 181
 	. $retour
183
-	. "</ul>\n" . fin_block() . "\n\n";
182
+	. "</ul>\n".fin_block()."\n\n";
184 183
 }
185 184
 
186 185
 /**
@@ -199,13 +198,13 @@  discard block
 block discarded – undo
199 198
 	$debut = 0;
200 199
 	$limite = 500;
201 200
 
202
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique));
201
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique));
203 202
 
204 203
 	if ($nb > $limite) {
205
-		$debut = _request('debut_rubrique' . $id_rubrique) ? _request('debut_rubrique' . $id_rubrique) : $debut;
204
+		$debut = _request('debut_rubrique'.$id_rubrique) ? _request('debut_rubrique'.$id_rubrique) : $debut;
206 205
 		$pagination = chercher_filtre('pagination');
207
-		$pagination = '<br class="nettoyeur"><p class="pagination">' .
208
-			$pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') .
206
+		$pagination = '<br class="nettoyeur"><p class="pagination">'.
207
+			$pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive').
209 208
 		'</p>';
210 209
 	}
211 210
 
Please login to merge, or discard this patch.
ecrire/inc/charsets.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		}
74 74
 	}
75 75
 
76
-	if (find_in_path($charset . '.php', 'charsets/', true)) {
76
+	if (find_in_path($charset.'.php', 'charsets/', true)) {
77 77
 		return $charset;
78 78
 	} else {
79 79
 		spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'");
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	static $pcre_ok = 0;
161 161
 
162 162
 	if (!$pcre_ok) {
163
-		$s = ' ' . chr(195) . chr(169) . 't' . chr(195) . chr(169) . ' ';
163
+		$s = ' '.chr(195).chr(169).'t'.chr(195).chr(169).' ';
164 164
 		if (preg_match(',\W...\W,u', $s)) {
165 165
 			$pcre_ok = 1;
166 166
 		} else {
@@ -261,38 +261,38 @@  discard block
 block discarded – undo
261 261
 
262 262
 	if (!isset($trans[$charset][$charset_cible])) {
263 263
 		$trans[$charset][$charset_cible] = [
264
-			$p . chr(128) => '&#8364;',
265
-			$p . chr(129) => ' ', # pas affecte
266
-			$p . chr(130) => '&#8218;',
267
-			$p . chr(131) => '&#402;',
268
-			$p . chr(132) => '&#8222;',
269
-			$p . chr(133) => '&#8230;',
270
-			$p . chr(134) => '&#8224;',
271
-			$p . chr(135) => '&#8225;',
272
-			$p . chr(136) => '&#710;',
273
-			$p . chr(137) => '&#8240;',
274
-			$p . chr(138) => '&#352;',
275
-			$p . chr(139) => '&#8249;',
276
-			$p . chr(140) => '&#338;',
277
-			$p . chr(141) => ' ', # pas affecte
278
-			$p . chr(142) => '&#381;',
279
-			$p . chr(143) => ' ', # pas affecte
280
-			$p . chr(144) => ' ', # pas affecte
281
-			$p . chr(145) => '&#8216;',
282
-			$p . chr(146) => '&#8217;',
283
-			$p . chr(147) => '&#8220;',
284
-			$p . chr(148) => '&#8221;',
285
-			$p . chr(149) => '&#8226;',
286
-			$p . chr(150) => '&#8211;',
287
-			$p . chr(151) => '&#8212;',
288
-			$p . chr(152) => '&#732;',
289
-			$p . chr(153) => '&#8482;',
290
-			$p . chr(154) => '&#353;',
291
-			$p . chr(155) => '&#8250;',
292
-			$p . chr(156) => '&#339;',
293
-			$p . chr(157) => ' ', # pas affecte
294
-			$p . chr(158) => '&#382;',
295
-			$p . chr(159) => '&#376;',
264
+			$p.chr(128) => '&#8364;',
265
+			$p.chr(129) => ' ', # pas affecte
266
+			$p.chr(130) => '&#8218;',
267
+			$p.chr(131) => '&#402;',
268
+			$p.chr(132) => '&#8222;',
269
+			$p.chr(133) => '&#8230;',
270
+			$p.chr(134) => '&#8224;',
271
+			$p.chr(135) => '&#8225;',
272
+			$p.chr(136) => '&#710;',
273
+			$p.chr(137) => '&#8240;',
274
+			$p.chr(138) => '&#352;',
275
+			$p.chr(139) => '&#8249;',
276
+			$p.chr(140) => '&#338;',
277
+			$p.chr(141) => ' ', # pas affecte
278
+			$p.chr(142) => '&#381;',
279
+			$p.chr(143) => ' ', # pas affecte
280
+			$p.chr(144) => ' ', # pas affecte
281
+			$p.chr(145) => '&#8216;',
282
+			$p.chr(146) => '&#8217;',
283
+			$p.chr(147) => '&#8220;',
284
+			$p.chr(148) => '&#8221;',
285
+			$p.chr(149) => '&#8226;',
286
+			$p.chr(150) => '&#8211;',
287
+			$p.chr(151) => '&#8212;',
288
+			$p.chr(152) => '&#732;',
289
+			$p.chr(153) => '&#8482;',
290
+			$p.chr(154) => '&#353;',
291
+			$p.chr(155) => '&#8250;',
292
+			$p.chr(156) => '&#339;',
293
+			$p.chr(157) => ' ', # pas affecte
294
+			$p.chr(158) => '&#382;',
295
+			$p.chr(159) => '&#376;',
296 296
 		];
297 297
 		if ($charset_cible != 'unicode') {
298 298
 			foreach ($trans[$charset][$charset_cible] as $k => $c) {
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 					and is_array($GLOBALS['CHARSET'][$cset])
434 434
 				) {
435 435
 					foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
436
-						$trans[$charset][chr($key)] = '&#' . $val . ';';
436
+						$trans[$charset][chr($key)] = '&#'.$val.';';
437 437
 					}
438 438
 				}
439 439
 			}
@@ -500,11 +500,11 @@  discard block
 block discarded – undo
500 500
 					$h = dechex($e);
501 501
 					if ($s = isset($CHARSET_REVERSE[$charset][$e])) {
502 502
 						$s = $CHARSET_REVERSE[$charset][$e];
503
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($s);
504
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($s);
503
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($s);
504
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($s);
505 505
 					} else {
506
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($e);
507
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($e);
506
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($e);
507
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($e);
508 508
 					}
509 509
 				}
510 510
 			}
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 				and is_array($GLOBALS['CHARSET'][$cset])
551 551
 			) {
552 552
 				foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
553
-					$trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';');
553
+					$trans[$charset][chr($key)] = unicode2charset('&#'.$val.';');
554 554
 				}
555 555
 			}
556 556
 		}
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 				}
658 658
 				$thisPos++;
659 659
 			}
660
-			$encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';';
660
+			$encodedLetter = '&#'.preg_replace('/^0+/', '', $decimalCode).';';
661 661
 			$encodedString .= $encodedLetter;
662 662
 		}
663 663
 	}
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 			} // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html
701 701
 			else {
702 702
 				if ($word != 65279) {
703
-					$texte .= '&#' . $word . ';';
703
+					$texte .= '&#'.$word.';';
704 704
 				}
705 705
 			}
706 706
 		}
@@ -728,13 +728,13 @@  discard block
 block discarded – undo
728 728
 		return chr($num);
729 729
 	}
730 730
 	if ($num < 2048) {
731
-		return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
731
+		return chr(($num >> 6) + 192).chr(($num & 63) + 128);
732 732
 	}
733 733
 	if ($num < 65536) {
734
-		return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
734
+		return chr(($num >> 12) + 224).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
735 735
 	}
736 736
 	if ($num < 1114112) {
737
-		return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
737
+		return chr(($num >> 18) + 240).chr((($num >> 12) & 63) + 128).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
738 738
 	}
739 739
 
740 740
 	return '';
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 	while (preg_match(',&#0*([0-9]+);,S', $texte, $regs) and !isset($vu[$regs[1]])) {
802 802
 		$num = $regs[1];
803 803
 		$vu[$num] = true;
804
-		$s = '\u' . sprintf('%04x', $num);
804
+		$s = '\u'.sprintf('%04x', $num);
805 805
 		$texte = str_replace($regs[0], $s, $texte);
806 806
 	}
807 807
 
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
  **/
819 819
 function javascript_to_unicode($texte) {
820 820
 	while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) {
821
-		$texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte);
821
+		$texte = str_replace($regs[0], '&#'.hexdec($regs[1]).';', $texte);
822 822
 	}
823 823
 
824 824
 	return $texte;
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 		return $texte;
864 864
 	}
865 865
 
866
-	$table_translit = 'translit' . $complexe;
866
+	$table_translit = 'translit'.$complexe;
867 867
 
868 868
 	// 2. Translitterer grace a la table predefinie
869 869
 	if (!isset($trans[$complexe])) {
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 	if ($chiffres) {
925 925
 		$texte = preg_replace_callback(
926 926
 			"/[aeiuoyd]['`?~.^+(-]{1,2}/S",
927
-			function ($m) {
927
+			function($m) {
928 928
 			return translitteration_chiffree($m[0]);
929 929
 			},
930 930
 			$texte
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
  *    true s'il a un BOM
957 957
  **/
958 958
 function bom_utf8($texte) {
959
-	return (substr($texte, 0, 3) == chr(0xEF) . chr(0xBB) . chr(0xBF));
959
+	return (substr($texte, 0, 3) == chr(0xEF).chr(0xBB).chr(0xBF));
960 960
 }
961 961
 
962 962
 /**
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
 		// on prend n fois la longueur desiree, pour etre surs d'avoir tout
1153 1153
 		// (un caractere utf-8 prenant au maximum n bytes)
1154 1154
 		$n = 0;
1155
-		while (preg_match(',[\x80-\xBF]{' . (++$n) . '},', $c)) {
1155
+		while (preg_match(',[\x80-\xBF]{'.(++$n).'},', $c)) {
1156 1156
 			;
1157 1157
 		}
1158 1158
 		$c = substr($c, 0, $n * $length);
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 
1187 1187
 	$lettre1 = mb_strtoupper(spip_substr($c, 0, 1));
1188 1188
 
1189
-	return $lettre1 . spip_substr($c, 1);
1189
+	return $lettre1.spip_substr($c, 1);
1190 1190
 }
1191 1191
 
1192 1192
 /**
Please login to merge, or discard this patch.
ecrire/inc/presentation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 	];
45 45
 	$style_titre_mapping = ['couleur' => 'topper', 'trait-couleur' => 'section'];
46 46
 	$c = isset($style_mapping[$style]) ? $style_mapping[$style] : 'simple';
47
-	$class = $c . ($class ? " $class" : '');
47
+	$class = $c.($class ? " $class" : '');
48 48
 	if (!$padding) {
49
-		$class .= ($class ? ' ' : '') . 'no-padding';
49
+		$class .= ($class ? ' ' : '').'no-padding';
50 50
 	}
51 51
 
52 52
 	//($id?"id='$id' ":"")
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 		if ($fonction) {
62 62
 			// 2 images pour composer l'icone : le fond (article) en background,
63 63
 			// la fonction (new) en image
64
-			$icone = http_img_pack($fonction, '', "class='cadre-icone' width='$size' height='$size'\n" .
64
+			$icone = http_img_pack($fonction, '', "class='cadre-icone' width='$size' height='$size'\n".
65 65
 				http_style_background($fond, 'no-repeat center center', $size));
66 66
 		} else {
67 67
 			$icone = http_img_pack($fond, '', "class='cadre-icone' width='$size' height='$size'");
68 68
 		}
69
-		$titre = $icone . $titre;
69
+		$titre = $icone.$titre;
70 70
 	}
71 71
 
72 72
 	return boite_ouvrir($titre, $class, isset($style_titre_mapping[$style]) ? $style_titre_mapping[$style] : '', $id);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	$titre,
181 181
 	$ze_logo = ''
182 182
 ) {
183
-	return "<h1 class = 'grostitre'>" . $ze_logo . ' ' . typo($titre) . "</h1>\n";
183
+	return "<h1 class = 'grostitre'>".$ze_logo.' '.typo($titre)."</h1>\n";
184 184
 }
185 185
 
186 186
 // La boite des raccourcis
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 // https://code.spip.net/@bloc_des_raccourcis
189 189
 function bloc_des_raccourcis($bloc) {
190 190
 	return creer_colonne_droite()
191
-	. boite_ouvrir(_T('titre_cadre_raccourcis'), 'raccourcis') . $bloc . boite_fermer();
191
+	. boite_ouvrir(_T('titre_cadre_raccourcis'), 'raccourcis').$bloc.boite_fermer();
192 192
 }
193 193
 
194 194
 //
Please login to merge, or discard this patch.
ecrire/inc/prepare_recherche.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
 	$where_resultat_recent = sql_date_proche('maj', (0 - ($delai_fraicheur + 100)), ' SECOND');
83 83
 	if (!isset($cache[$serveur][$table][$recherche])) {
84 84
 		$hash_serv = ($serveur ? substr(md5($serveur), 0, 16) : '');
85
-		$hash = substr(md5($recherche . $table), 0, 16);
86
-		$where = "(resultats.recherche='$hash' AND resultats.table_objet=" . sql_quote($table) . " AND resultats.serveur='$hash_serv')";
85
+		$hash = substr(md5($recherche.$table), 0, 16);
86
+		$where = "(resultats.recherche='$hash' AND resultats.table_objet=".sql_quote($table)." AND resultats.serveur='$hash_serv')";
87 87
 		$row = sql_fetsel(
88 88
 			'recherche',
89 89
 			'spip_resultats AS resultats',
90
-			$where . " AND $where_resultat_recent",
90
+			$where." AND $where_resultat_recent",
91 91
 			'',
92 92
 			'',
93 93
 			'0,1'
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		}
197 197
 
198 198
 		foreach ($listes_ids as $p => $ids) {
199
-			$select .= "+$p*(" .
199
+			$select .= "+$p*(".
200 200
 				sql_in("$table.$primary", $ids, '', $serveur)
201 201
 				. ') ';
202 202
 		}
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
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	$champ = preg_replace(',[\s]+,ms', ' ', $champ);
39 39
 	$champ = str_replace('"', '""', $champ);
40 40
 
41
-	return '"' . $champ . '"';
41
+	return '"'.$champ.'"';
42 42
 }
43 43
 
44 44
 /**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	if ($callback) {
59 59
 		$ligne = call_user_func($callback, $nb, $ligne, $delim, $importer_charset);
60 60
 	}
61
-	$output = join($delim, array_map('exporter_csv_champ', $ligne)) . "\r\n";
61
+	$output = join($delim, array_map('exporter_csv_champ', $ligne))."\r\n";
62 62
 	if ($importer_charset) {
63 63
 		$output = str_replace('’', '\'', $output);
64 64
 		$output = unicode2charset(html2unicode(charset2unicode($output)), $importer_charset);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		$fichier = 'php://output';
176 176
 	}
177 177
 	else {
178
-	$fichier = sous_repertoire(_DIR_CACHE, 'export') . $filename;
178
+	$fichier = sous_repertoire(_DIR_CACHE, 'export').$filename;
179 179
 	}
180 180
 
181 181
 	$fp = fopen($fichier, 'w');
Please login to merge, or discard this patch.
ecrire/inc/rechercher.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	if (substr($recherche, 0, 1) == '/' and substr($recherche, -1, 1) == '/' and strlen($recherche) > 2) {
101 101
 		// c'est une preg
102 102
 		$recherche_trans = translitteration($recherche);
103
-		$preg = $recherche_trans . $options['preg_flags'];
103
+		$preg = $recherche_trans.$options['preg_flags'];
104 104
 		$is_preg = true;
105 105
 	} else {
106 106
 		// s'il y a plusieurs mots il faut les chercher tous : oblige REGEXP,
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 			}
121 121
 		}
122 122
 
123
-		if (preg_match(',\s+,' . $u, $recherche_mod)) {
123
+		if (preg_match(',\s+,'.$u, $recherche_mod)) {
124 124
 			$is_preg = true;
125 125
 
126 126
 			$recherche_inter = '|';
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			foreach ($recherche_mots as $mot) {
131 131
 				if (strlen($mot) >= $min_long) {
132 132
 					// echapper les caracteres de regexp qui sont eventuellement dans la recherche
133
-					$recherche_inter .= preg_quote($mot) . ' ';
133
+					$recherche_inter .= preg_quote($mot).' ';
134 134
 					$petits_mots = false;
135 135
 				}
136 136
 			}
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
 
139 139
 			// mais on cherche quand même l'expression complète, même si elle
140 140
 			// comporte des mots de moins de quatre lettres
141
-			$recherche = trim(preg_replace(',\s+,' . $u, '|', $recherche_inter), '|');
141
+			$recherche = trim(preg_replace(',\s+,'.$u, '|', $recherche_inter), '|');
142 142
 			if (!$recherche or $petits_mots) {
143 143
 				$recherche = preg_quote($recherche_org);
144 144
 			}
145 145
 			$recherche_trans = translitteration($recherche);
146 146
 		}
147 147
 
148
-		$preg = '/' . str_replace('/', '\\/', $recherche_trans) . '/' . $options['preg_flags'];
148
+		$preg = '/'.str_replace('/', '\\/', $recherche_trans).'/'.$options['preg_flags'];
149 149
 	}
150 150
 
151 151
 	// Si la chaine est inactive, on va utiliser LIKE pour aller plus vite
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 		}
186 186
 		$q = sql_quote(
187 187
 			'%'
188
-			. preg_replace(',\s+,' . $u, '%', $q)
188
+			. preg_replace(',\s+,'.$u, '%', $q)
189 189
 			. '%'
190 190
 		);
191 191
 
192
-		$preg = '/' . preg_replace(',\s+,' . $u, '.+', trim($recherche_mod)) . '/' . $options['preg_flags'];
192
+		$preg = '/'.preg_replace(',\s+,'.$u, '.+', trim($recherche_mod)).'/'.$options['preg_flags'];
193 193
 	} else {
194 194
 		$methode = 'REGEXP';
195 195
 		$q = sql_quote(trim($recherche, '/'));
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	foreach ($tables as $table => $champs) {
312 312
 		# lock via memoization, si dispo
313 313
 		if (function_exists('cache_lock')) {
314
-			cache_lock($lock = _RECHERCHE_LOCK_KEY . ' ' . $table . ' ' . $recherche);
314
+			cache_lock($lock = _RECHERCHE_LOCK_KEY.' '.$table.' '.$recherche);
315 315
 		}
316 316
 
317 317
 		spip_timer('rech');
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
 
328 328
 		spip_log(
329
-			"recherche $table ($recherche) : " . count($results[$table]) . ' resultats ' . spip_timer('rech'),
329
+			"recherche $table ($recherche) : ".count($results[$table]).' resultats '.spip_timer('rech'),
330 330
 			'recherche'
331 331
 		);
332 332
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
 	$results = recherche_en_base($recherche, $tables, $options);
363 363
 
364
-	$preg = '/' . str_replace('/', '\\/', $recherche) . '/' . $options['preg_flags'];
364
+	$preg = '/'.str_replace('/', '\\/', $recherche).'/'.$options['preg_flags'];
365 365
 
366 366
 	foreach ($results as $table => $r) {
367 367
 		$_id_table = id_table_objet($table);
Please login to merge, or discard this patch.
ecrire/inc/modifier.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 	// Appels incomplets (sans $c)
115 115
 	if (!is_array($c)) {
116
-		spip_log('erreur appel objet_modifier_champs(' . $objet . '), manque $c');
116
+		spip_log('erreur appel objet_modifier_champs('.$objet.'), manque $c');
117 117
 
118 118
 		return _T('erreur_technique_enregistrement_impossible');
119 119
 	}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 				$id_rubrique = 0;
203 203
 				if (isset($desc['field']['id_rubrique'])) {
204 204
 					$parent = ($objet == 'rubrique') ? 'id_parent' : 'id_rubrique';
205
-					$id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=" . intval($id_objet));
205
+					$id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=".intval($id_objet));
206 206
 				}
207 207
 				$instituer_langue_objet = charger_fonction('instituer_langue_objet', 'action');
208 208
 				$champs['lang'] = $instituer_langue_objet($objet, $id_objet, $id_rubrique, $changer_lang, $serveur);
@@ -224,13 +224,13 @@  discard block
 block discarded – undo
224 224
 		}
225 225
 
226 226
 		// allez on commit la modif
227
-		sql_updateq($spip_table_objet, $champs, "$id_table_objet=" . intval($id_objet), $serveur);
227
+		sql_updateq($spip_table_objet, $champs, "$id_table_objet=".intval($id_objet), $serveur);
228 228
 
229 229
 		// on verifie si elle est bien passee
230 230
 		$moof = sql_fetsel(
231 231
 			array_keys($champs),
232 232
 			$spip_table_objet,
233
-			"$id_table_objet=" . intval($id_objet),
233
+			"$id_table_objet=".intval($id_objet),
234 234
 			[],
235 235
 			[],
236 236
 			'',
@@ -266,13 +266,13 @@  discard block
 block discarded – undo
266 266
 			// c'est un cas exceptionnel
267 267
 			if (count($liste)) {
268 268
 				spip_log(
269
-					"Erreur enregistrement en base $objet/$id_objet champs :" . var_export($conflits, true),
270
-					'modifier.' . _LOG_CRITIQUE
269
+					"Erreur enregistrement en base $objet/$id_objet champs :".var_export($conflits, true),
270
+					'modifier.'._LOG_CRITIQUE
271 271
 				);
272 272
 
273 273
 				return _T(
274 274
 					'erreur_technique_enregistrement_champs',
275
-					['champs' => "<i>'" . implode("'</i>,<i>'", $liste) . "'</i>"]
275
+					['champs' => "<i>'".implode("'</i>,<i>'", $liste)."'</i>"]
276 276
 				);
277 277
 			}
278 278
 		}
@@ -312,10 +312,10 @@  discard block
 block discarded – undo
312 312
 	// message a affiner :-)
313 313
 	include_spip('inc/filtres_mini');
314 314
 	$qui = isset($GLOBALS['visiteur_session']['nom']) and $GLOBALS['visiteur_session']['nom'] ? $GLOBALS['visiteur_session']['nom'] : $GLOBALS['ip'];
315
-	journal(_L($qui . ' a &#233;dit&#233; l&#8217;' . $objet . ' ' . $id_objet . ' (' . join(
315
+	journal(_L($qui.' a &#233;dit&#233; l&#8217;'.$objet.' '.$id_objet.' ('.join(
316 316
 		'+',
317 317
 		array_diff(array_keys($champs), ['date_modif'])
318
-	) . ')'), [
318
+	).')'), [
319 319
 		'faire' => 'modifier',
320 320
 		'quoi' => $objet,
321 321
 		'id' => $id_objet
Please login to merge, or discard this patch.