Completed
Push — master ( 15d2e0...1ead13 )
by cam
01:08
created
prive/formulaires/editer_auteur.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		unset($erreurs['new_login']);
171 171
 	}
172 172
 
173
-	$auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
173
+	$auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
174 174
 	$auth_methode = ($auth_methode ?: 'spip');
175 175
 	include_spip('inc/auth');
176 176
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			!autoriser('modifier', 'auteur', $id_auteur, null, ['email' => '?'])
187 187
 			and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
188 188
 			and !strlen(trim($email))
189
-			and $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
189
+			and $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur='.intval($id_auteur)))
190 190
 		) {
191 191
 			$erreurs['email'] = (($id_auteur == $GLOBALS['visiteur_session']['id_auteur']) ? _T('form_email_non_valide') : _T('form_prop_indiquer_email'));
192 192
 		} else {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 			#Nouvel auteur
202 202
 			if (intval($id_auteur) == 0) {
203 203
 				#Un auteur existe deja avec cette adresse ?
204
-				if (sql_countsel('spip_auteurs', 'email=' . sql_quote($email)) > 0) {
204
+				if (sql_countsel('spip_auteurs', 'email='.sql_quote($email)) > 0) {
205 205
 					$erreurs['email'] = _T('erreur_email_deja_existant');
206 206
 				}
207 207
 			} else {
@@ -209,11 +209,11 @@  discard block
 block discarded – undo
209 209
 				if (
210 210
 					(sql_countsel(
211 211
 						'spip_auteurs',
212
-						'email=' . sql_quote($email)
212
+						'email='.sql_quote($email)
213 213
 					) > 0) and ($id_auteur != ($id_auteur_ancien = sql_getfetsel(
214 214
 						'id_auteur',
215 215
 						'spip_auteurs',
216
-						'email=' . sql_quote($email)
216
+						'email='.sql_quote($email)
217 217
 					)))
218 218
 				) {
219 219
 					$erreurs['email'] = _T('erreur_email_deja_existant');
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	// corriger un cas si frequent : www.example.org sans le http:// qui precede
232 232
 	if ($url = _request('url_site') and !tester_url_absolue($url)) {
233 233
 		if (strpos($url, ':') === false and strncasecmp($url, 'www.', 4) === 0) {
234
-			$url = 'http://' . $url;
234
+			$url = 'http://'.$url;
235 235
 			set_request('url_site', $url);
236 236
 		}
237 237
 	}
@@ -248,11 +248,11 @@  discard block
 block discarded – undo
248 248
 	}
249 249
 	elseif (
250 250
 		($login = _request('new_login')) and
251
-		$login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur))
251
+		$login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur))
252 252
 	) {
253 253
 		// on verifie la meme chose que dans auteurs_edit_config()
254 254
 		if (
255
-			! auth_autoriser_modifier_login($auth_methode)
255
+			!auth_autoriser_modifier_login($auth_methode)
256 256
 			or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['login' => true])
257 257
 			// legacy : ne pas risquer d'autoriser la modif login si fonction d'autorisation pas mise a jour et ne teste que l'option email
258 258
 			or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['email' => true])
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 		if (
360 360
 			$GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
361 361
 			and $email_nouveau !=
362
-				($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
362
+				($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur='.intval($id_auteur)))
363 363
 		) {
364 364
 			$envoyer_mail = charger_fonction('envoyer_mail', 'inc');
365 365
 			$texte = _T(
@@ -393,12 +393,12 @@  discard block
 block discarded – undo
393 393
 		if (isset($erreurs['message_ok'])) {
394 394
 			if (!isset($res['message_ok'])) { $res['message_ok'] = '';
395 395
 			}
396
-			$res['message_ok'] = trim($res['message_ok'] . ' ' . $erreurs['message_ok']);
396
+			$res['message_ok'] = trim($res['message_ok'].' '.$erreurs['message_ok']);
397 397
 		}
398 398
 		if (isset($erreurs['message_erreur']) and $erreurs['message_erreur']) {
399 399
 			if (!isset($res['message_erreur'])) { $res['message_erreur'] = '';
400 400
 			}
401
-			$res['message_erreur'] = trim($res['message_erreur'] . ' ' . $erreurs['message_erreur']);
401
+			$res['message_erreur'] = trim($res['message_erreur'].' '.$erreurs['message_erreur']);
402 402
 		}
403 403
 	}
404 404
 
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 
426 426
 
427 427
 function auteur_reset_password($id_auteur, $erreurs = []) {
428
-	$auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
428
+	$auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
429 429
 	$config = auteurs_edit_config($auteur);
430 430
 
431 431
 	if ($config['edit_pass']) {
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 		include_spip('action/editer_auteur');
461 461
 		auteur_modifier($id_auteur, $set);
462 462
 
463
-		$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
463
+		$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
464 464
 		include_spip('inc/filtres');
465 465
 		if (
466 466
 			$notifier
Please login to merge, or discard this patch.
prive/transmettre/rss/a_suivre_fonctions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 			}
16 16
 		}
17 17
 		krsort($items);
18
-		$texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte);
18
+		$texte = str_replace($placeholder, implode("\n\t", $items)."\n", $texte);
19 19
 	}
20 20
 
21 21
 	return $texte;
Please login to merge, or discard this patch.
ecrire/action/instituer_langue_objet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 		if ($changer_lang != 'herit') {
46 46
 			$set['lang'] = $changer_lang;
47
-			sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur);
47
+			sql_updateq($table_objet_sql, $set, "$id_table_objet=".intval($id), [], $serveur);
48 48
 			include_spip('inc/rubriques'); // pour calculer_langues_rubriques et calculer_langues_utilisees
49 49
 			if ($table_objet_sql == 'spip_rubriques') {
50 50
 				calculer_langues_rubriques();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			$langues = calculer_langues_utilisees($serveur);
53 53
 			ecrire_meta('langues_utilisees', $langues);
54 54
 		} else {
55
-			$langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
55
+			$langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
56 56
 			if (!$langue_parent) {
57 57
 				$langue_parent = $GLOBALS['meta']['langue_site'];
58 58
 			}
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			if (isset($set['langue_choisie'])) {
62 62
 				$set['langue_choisie'] = 'non';
63 63
 			}
64
-			sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur);
64
+			sql_updateq($table_objet_sql, $set, "$id_table_objet=".intval($id), [], $serveur);
65 65
 			if ($table_objet_sql == 'spip_rubriques') {
66 66
 				include_spip('inc/rubriques');
67 67
 				calculer_langues_rubriques();
Please login to merge, or discard this patch.
ecrire/base/upgrade.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	if ($GLOBALS['spip_version_base'] != $GLOBALS['meta']['version_installee']) {
57 57
 		if (!is_numeric(_request('reinstall'))) {
58 58
 			include_spip('base/create');
59
-			spip_log('recree les tables eventuellement disparues', 'maj.' . _LOG_INFO_IMPORTANTE);
59
+			spip_log('recree les tables eventuellement disparues', 'maj.'._LOG_INFO_IMPORTANTE);
60 60
 			creer_base();
61 61
 		}
62 62
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			exit;
70 70
 		}
71 71
 	}
72
-	spip_log('Fin de mise a jour SQL. Debut m-a-j acces et config', 'maj.' . _LOG_INFO_IMPORTANTE);
72
+	spip_log('Fin de mise a jour SQL. Debut m-a-j acces et config', 'maj.'._LOG_INFO_IMPORTANTE);
73 73
 
74 74
 	// supprimer quelques fichiers temporaires qui peuvent se retrouver invalides
75 75
 	@spip_unlink(_CACHE_RUBRIQUES);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	@spip_unlink(_CACHE_PLUGINS_OPT);
79 79
 	@spip_unlink(_CACHE_PLUGINS_FCT);
80 80
 	@spip_unlink(_CACHE_CHEMIN);
81
-	@spip_unlink(_DIR_TMP . 'plugin_xml_cache.gz');
81
+	@spip_unlink(_DIR_TMP.'plugin_xml_cache.gz');
82 82
 
83 83
 	include_spip('inc/auth');
84 84
 	auth_synchroniser_distant();
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 	$version_installee = $GLOBALS['meta']['version_installee'] ?? null;
118 118
 
119 119
 	spip_log(
120
-		"Version anterieure: $version_installee. Courante: " . $GLOBALS['spip_version_base'],
121
-		'maj.' . _LOG_INFO_IMPORTANTE
120
+		"Version anterieure: $version_installee. Courante: ".$GLOBALS['spip_version_base'],
121
+		'maj.'._LOG_INFO_IMPORTANTE
122 122
 	);
123 123
 	if (!$version_installee or ($GLOBALS['spip_version_base'] < $version_installee)) {
124 124
 		sql_replace(
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
 	$res = maj_while($version_installee, $cible, $GLOBALS['maj'], 'version_installee', 'meta', $redirect, $debut_page);
152 152
 	if ($res) {
153 153
 		if (!is_array($res)) {
154
-			spip_log("Pb d'acces SQL a la mise a jour", 'maj.' . _LOG_ERREUR);
154
+			spip_log("Pb d'acces SQL a la mise a jour", 'maj.'._LOG_ERREUR);
155 155
 		} else {
156
-			echo _T('avis_operation_echec') . ' ' . join(' ', $res);
156
+			echo _T('avis_operation_echec').' '.join(' ', $res);
157 157
 			echo install_fin_html();
158 158
 		}
159 159
 	}
@@ -241,9 +241,9 @@  discard block
 block discarded – undo
241 241
 		$res = maj_while($current_version, $version_cible, $maj, $nom_meta_base_version, $table_meta, $redirect);
242 242
 		if ($res) {
243 243
 			if (!is_array($res)) {
244
-				spip_log("Pb d'acces SQL a la mise a jour", 'maj.' . _LOG_ERREUR);
244
+				spip_log("Pb d'acces SQL a la mise a jour", 'maj.'._LOG_ERREUR);
245 245
 			} else {
246
-				echo '<p>' . _T('avis_operation_echec') . ' ' . join(' ', $res) . '</p>';
246
+				echo '<p>'._T('avis_operation_echec').' '.join(' ', $res).'</p>';
247 247
 			}
248 248
 		}
249 249
 	}
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	echo(install_debut_html($titre));
300 300
 	// script de rechargement auto sur timeout
301 301
 	$redirect = generer_url_ecrire('upgrade', "reinstall=$installee&meta=$meta&table=$table", true);
302
-	echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . ($timeout * 1000) . ')');
302
+	echo http_script("window.setTimeout('location.href=\"".$redirect."\";',".($timeout * 1000).')');
303 303
 	echo "<div style='text-align: left'>\n";
304 304
 	if (ob_get_level()) {
305 305
 		ob_flush();
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 				return [$v, $etape];
389 389
 			}
390 390
 			$n = time() - $time;
391
-			spip_log("$table $meta: $v en $n secondes", 'maj.' . _LOG_INFO_IMPORTANTE);
391
+			spip_log("$table $meta: $v en $n secondes", 'maj.'._LOG_INFO_IMPORTANTE);
392 392
 			if ($meta) {
393 393
 				ecrire_meta($meta, $installee = $v, 'oui', $table);
394 394
 			}
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	if ($meta) {
405 405
 		ecrire_meta($meta, $cible, 'oui', $table);
406 406
 	}
407
-	spip_log("MAJ terminee. $meta: $installee", 'maj.' . _LOG_INFO_IMPORTANTE);
407
+	spip_log("MAJ terminee. $meta: $installee", 'maj.'._LOG_INFO_IMPORTANTE);
408 408
 
409 409
 	return [];
410 410
 }
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
  * @return int
430 430
  */
431 431
 function serie_alter($serie, $q = [], $meta = '', $table = 'meta', $redirect = '') {
432
-	$meta2 = $meta . '_maj_' . $serie;
432
+	$meta2 = $meta.'_maj_'.$serie;
433 433
 	$etape = 0;
434 434
 	if (isset($GLOBALS[$table][$meta2])) {
435 435
 		$etape = intval($GLOBALS[$table][$meta2]);
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 				and function_exists($f = array_shift($r))
443 443
 			) {
444 444
 				// note: $r (arguments de la fonction $f) peut avoir des données tabulaires
445
-				spip_log("$msg: $f " . @join(',', $r), 'maj.' . _LOG_INFO_IMPORTANTE);
445
+				spip_log("$msg: $f ".@join(',', $r), 'maj.'._LOG_INFO_IMPORTANTE);
446 446
 				// pour les fonctions atomiques sql_xx
447 447
 				// on enregistre le meta avant de lancer la fonction,
448 448
 				// de maniere a eviter de boucler sur timeout
@@ -460,12 +460,12 @@  discard block
 block discarded – undo
460 460
 					relance_maj($meta, $table, $redirect);
461 461
 				}
462 462
 				ecrire_meta($meta2, $i + 1, 'non', $table);
463
-				spip_log("$meta2: ok", 'maj.' . _LOG_INFO_IMPORTANTE);
463
+				spip_log("$meta2: ok", 'maj.'._LOG_INFO_IMPORTANTE);
464 464
 			} else {
465 465
 				if (!is_array($r)) {
466
-					spip_log("maj $i format incorrect", 'maj.' . _LOG_ERREUR);
466
+					spip_log("maj $i format incorrect", 'maj.'._LOG_ERREUR);
467 467
 				} else {
468
-					spip_log("maj $i fonction $f non definie", 'maj.' . _LOG_ERREUR);
468
+					spip_log("maj $i fonction $f non definie", 'maj.'._LOG_ERREUR);
469 469
 				}
470 470
 				// en cas d'erreur serieuse, on s'arrete
471 471
 				// mais on permet de passer par dessus en rechargeant la page.
Please login to merge, or discard this patch.
ecrire/balise/menu_lang_ecrire.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	include_spip('inc/lang');
100 100
 
101 101
 	if ($GLOBALS['spip_lang'] <> $default) {
102
-		$opt = lang_select($default);  # et remplace
102
+		$opt = lang_select($default); # et remplace
103 103
 		if ($GLOBALS['spip_lang'] <> $default) {
104
-			$default = '';  # annule tout choix par defaut
104
+			$default = ''; # annule tout choix par defaut
105 105
 			if ($opt) {
106 106
 				lang_select();
107 107
 			}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 	# lien a partir de /
112 112
 	$cible = parametre_url(self(), 'lang', '', '&');
113
-	$post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), true);
113
+	$post = generer_url_action('converser', 'redirect='.rawurlencode($cible), true);
114 114
 
115 115
 	return [
116 116
 		'formulaires/menu_lang',
Please login to merge, or discard this patch.
ecrire/inc/filtres_mime.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	static $t1 = ['&', '<', '>'];
121 121
 	static $t2 = ['&amp;', '&lt;', '&gt;'];
122 122
 
123
-	return '<pre>' . str_replace($t1, $t2, (string) $t) . '</pre>';
123
+	return '<pre>'.str_replace($t1, $t2, (string) $t).'</pre>';
124 124
 }
125 125
 
126 126
 /**
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
 	foreach ($lignes as &$l) {
141 141
 		$l = join('|', $l);
142 142
 	}
143
-	$corps = join("\n", $lignes) . "\n";
144
-	$corps = $caption .
145
-		"\n|{{" .
146
-		join('}}|{{', $entete) .
147
-		'}}|' .
148
-		"\n|" .
143
+	$corps = join("\n", $lignes)."\n";
144
+	$corps = $caption.
145
+		"\n|{{".
146
+		join('}}|{{', $entete).
147
+		'}}|'.
148
+		"\n|".
149 149
 		str_replace("\n", "|\n|", $corps);
150 150
 	include_spip('inc/texte');
151 151
 
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
 		}
188 188
 	}
189 189
 	// Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ?
190
-	$t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t));
190
+	$t = safehtml(preg_replace(',<script'.'.*?</script>,is', '', $t));
191 191
 
192
-	return (!$style ? '' : "\n<style>" . $style . '</style>') . $t;
192
+	return (!$style ? '' : "\n<style>".$style.'</style>').$t;
193 193
 }
194 194
 
195 195
 /**
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 = $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/action/api_transmettre.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 
94 94
 	$res = ltrim($res['texte']);
95 95
 	if (empty($res)) {
96
-		spip_log("$arg $qs resultat vide", 'transmettre' . _LOG_INFO_IMPORTANTE);
96
+		spip_log("$arg $qs resultat vide", 'transmettre'._LOG_INFO_IMPORTANTE);
97 97
 	}
98 98
 
99 99
 	echo $res;
Please login to merge, or discard this patch.
ecrire/base/connect_sql.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19 19
 	return;
20 20
 }
21
-require_once _ROOT_RESTREINT . 'base/objets.php';
21
+require_once _ROOT_RESTREINT.'base/objets.php';
22 22
 
23 23
 
24 24
 /**
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		$f = (!preg_match('/^[\w\.]*$/', $serveur))
60 60
 			? '' // nom de serveur mal ecrit
61 61
 			: ($serveur ?
62
-				(_DIR_CONNECT . $serveur . '.php') // serveur externe
62
+				(_DIR_CONNECT.$serveur.'.php') // serveur externe
63 63
 				: (_FILE_CONNECT ?: ($install ? _FILE_CONNECT_TMP // init du serveur principal
64 64
 						: ''))); // installation pas faite
65 65
 
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
 	// chargement de la version du jeu de fonctions
102 102
 	// si pas dans le fichier par defaut
103 103
 	$type = $GLOBALS['db_ok']['type'];
104
-	$jeu = 'spip_' . $type . '_functions_' . $version;
104
+	$jeu = 'spip_'.$type.'_functions_'.$version;
105 105
 	if (!isset($GLOBALS[$jeu])) {
106
-		if (!find_in_path($type . '_' . $version . '.php', 'req/', true)) {
106
+		if (!find_in_path($type.'_'.$version.'.php', 'req/', true)) {
107 107
 			spip_log("spip_connect: serveur $index version '$version' non defini pour '$type'", _LOG_HS);
108 108
 
109 109
 			// ne plus reessayer
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
 	$connexion = spip_connect($serveur);
166 166
 	$e = sql_errno($serveur);
167 167
 	$t = ($connexion['type'] ?? 'sql');
168
-	$m = "Erreur $e de $t: " . sql_error($serveur) . "\nin " . sql_error_backtrace() . "\n" . trim($connexion['last']);
169
-	$f = $t . $serveur;
170
-	spip_log($m, $f . '.' . _LOG_ERREUR);
168
+	$m = "Erreur $e de $t: ".sql_error($serveur)."\nin ".sql_error_backtrace()."\n".trim($connexion['last']);
169
+	$f = $t.$serveur;
170
+	spip_log($m, $f.'.'._LOG_ERREUR);
171 171
 }
172 172
 
173 173
 /**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	// si en cours d'installation ou si db=@test@ on ne pose rien
254 254
 	// car c'est un test de connexion
255 255
 	if (!defined('_ECRIRE_INSTALL') and $db !== '@test@') {
256
-		$f = _DIR_TMP . $type . '.' . substr(md5($host . $port . $db), 0, 8) . '.out';
256
+		$f = _DIR_TMP.$type.'.'.substr(md5($host.$port.$db), 0, 8).'.out';
257 257
 	} elseif ($db == '@test@') {
258 258
 		$db = '';
259 259
 	}
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	// En cas d'indisponibilite du serveur, eviter de le bombarder
293 293
 	if ($f) {
294 294
 		@touch($f);
295
-		spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type . '.' . _LOG_HS);
295
+		spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type.'.'._LOG_HS);
296 296
 	}
297 297
 	return null;
298 298
 }
@@ -390,11 +390,11 @@  discard block
 block discarded – undo
390 390
 	} elseif (is_array($a)) {
391 391
 		return join(',', array_map('_q', $a));
392 392
 	} elseif (is_scalar($a)) {
393
-		return ("'" . addslashes($a) . "'");
393
+		return ("'".addslashes($a)."'");
394 394
 	} elseif ($a === null) {
395 395
 		return "''";
396 396
 	}
397
-	throw new \RuntimeException('Can’t use _q with ' . gettype($a));
397
+	throw new \RuntimeException('Can’t use _q with '.gettype($a));
398 398
 }
399 399
 
400 400
 /**
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 				$next = reset($textes);
446 446
 				if (
447 447
 					strpos($next, "'") === 0
448
-					and strpos($query_echappees, $part . $next, $currentpos) === $nextpos
448
+					and strpos($query_echappees, $part.$next, $currentpos) === $nextpos
449 449
 				) {
450 450
 					$part .= array_shift($textes);
451 451
 				}
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 			$parts[$k] = [
458 458
 				'texte' => $part,
459 459
 				'position' => $nextpos,
460
-				'placeholder' => '%' . $k . '$s',
460
+				'placeholder' => '%'.$k.'$s',
461 461
 			];
462 462
 			$currentpos = $nextpos + strlen($part);
463 463
 		}
Please login to merge, or discard this patch.