Completed
Push — master ( 3aac8c...691b26 )
by cam
01:02
created
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/editer.php 1 patch
Spacing   +24 added lines, -25 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$res['message_ok'] = _T('info_modification_enregistree');
101 101
 		if ($retour) {
102 102
 			if (strncmp($retour, 'javascript:', 11) == 0) {
103
-				$res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/' . substr($retour, 11) . '/*]]>*/</script>';
103
+				$res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/'.substr($retour, 11).'/*]]>*/</script>';
104 104
 				$res['editable'] = true;
105 105
 			} else {
106 106
 				$res['redirect'] = parametre_url($retour, $id_table_objet, $id);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 				if (!isset($erreurs[$champ])) {
141 141
 					$erreurs[$champ] = '';
142 142
 				}
143
-				$erreurs[$champ] .= _T('alerte_modif_info_concourante') . "<br /><textarea readonly='readonly' class='forml'>" . entites_html($conflit['base']) . '</textarea>';
143
+				$erreurs[$champ] .= _T('alerte_modif_info_concourante')."<br /><textarea readonly='readonly' class='forml'>".entites_html($conflit['base']).'</textarea>';
144 144
 			}
145 145
 		}
146 146
 	}
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	if (
222 222
 		$config_fonc
223 223
 		and !in_array($config_fonc, ['articles_edit_config', 'rubriques_edit_config', 'auteurs_edit_config'])
224
-		and $config_fonc !== $table_objet . '_edit_config'
224
+		and $config_fonc !== $table_objet.'_edit_config'
225 225
 	) {
226 226
 		if (
227 227
 			$args = test_formulaire_inclus_par_modele()
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
 	// Appel direct dans un squelette
237 237
 	if (!$row) {
238 238
 		if (!$new or $lier_trad) {
239
-			if ($select = charger_fonction('precharger_' . $type, 'inc', true)) {
239
+			if ($select = charger_fonction('precharger_'.$type, 'inc', true)) {
240 240
 				$row = $select($id, $id_parent, $lier_trad);
241 241
 				// si on a une fonction precharger, elle pu faire un reglage de langue
242 242
 				$lang_default = (!empty($row['lang']) ? $row['lang'] : null);
243 243
 			} else {
244
-				$row = sql_fetsel('*', $table_objet_sql, $id_table_objet . '=' . intval($id));
244
+				$row = sql_fetsel('*', $table_objet_sql, $id_table_objet.'='.intval($id));
245 245
 			}
246 246
 			if (!$new) {
247 247
 				$md5 = controles_md5($row ?? []);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	if ($config_fonc) {
292 292
 		$contexte['config'] = $config = $config_fonc($contexte);
293 293
 		if (!$lang_default) {
294
-			$lang_default = $config['langue'] ?? session_get('lang') ;
294
+			$lang_default = $config['langue'] ?? session_get('lang');
295 295
 		}
296 296
 	}
297 297
 	$config = $config + [
@@ -315,13 +315,12 @@  discard block
 block discarded – undo
315 315
 		unset($contexte['lang']);
316 316
 	}
317 317
 
318
-	$contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n" .
319
-		(!$lier_trad ? '' :
320
-			("\n<input type='hidden' name='lier_trad' value='" .
321
-				$lier_trad .
322
-				"' />" .
323
-				"\n<input type='hidden' name='changer_lang' value='" .
324
-				$lang_default .
318
+	$contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n".
319
+		(!$lier_trad ? '' : ("\n<input type='hidden' name='lier_trad' value='".
320
+				$lier_trad.
321
+				"' />".
322
+				"\n<input type='hidden' name='changer_lang' value='".
323
+				$lang_default.
325 324
 				"' />"))
326 325
 		. $hidden
327 326
 		. ($md5 ?? '');
@@ -361,14 +360,14 @@  discard block
 block discarded – undo
361 360
 	$aider = charger_fonction('aider', 'inc');
362 361
 	if (strlen($texte) > 28 * 1024) {
363 362
 		$texte = str_replace("\r\n", "\n", $texte);
364
-		$pos = strpos($texte, "\n\n", 28 * 1024);  // coupe para > 28 ko
363
+		$pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko
365 364
 		if ($pos > 0 and $pos < 32 * 1024) {
366
-			$debut = substr($texte, 0, $pos) . "\n\n<!--SPIP-->\n";
365
+			$debut = substr($texte, 0, $pos)."\n\n<!--SPIP-->\n";
367 366
 			$suite = substr($texte, $pos + 2);
368 367
 		} else {
369
-			$pos = strpos($texte, ' ', 28 * 1024);  // sinon coupe espace
368
+			$pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace
370 369
 			if (!($pos > 0 and $pos < 32 * 1024)) {
371
-				$pos = 28 * 1024;  // au pire (pas d'espace trouv'e)
370
+				$pos = 28 * 1024; // au pire (pas d'espace trouv'e)
372 371
 				$decalage = 0; // si y'a pas d'espace, il ne faut pas perdre le caract`ere
373 372
 			} else {
374 373
 				$decalage = 1;
@@ -399,13 +398,13 @@  discard block
 block discarded – undo
399 398
 	}
400 399
 
401 400
 	include_spip('inc/barre');
402
-	$textes_supplement = "<br /><span style='color: red'>" . _T('info_texte_long') . "</span>\n";
401
+	$textes_supplement = "<br /><span style='color: red'>"._T('info_texte_long')."</span>\n";
403 402
 	$nombre = 0;
404 403
 
405 404
 	while (strlen($texte) > 29 * 1024) {
406 405
 		$nombre++;
407 406
 		[$texte1, $texte] = coupe_trop_long($texte);
408
-		$textes_supplement .= '<br />' .
407
+		$textes_supplement .= '<br />'.
409 408
 			"<textarea id='texte$nombre' name='texte_plus[$nombre]'$att_text>$texte1</textarea>\n";
410 409
 	}
411 410
 
@@ -488,7 +487,7 @@  discard block
 block discarded – undo
488 487
 	$ctr = [];
489 488
 	foreach ($data as $key => $val) {
490 489
 		$m = md5($val ?? '');
491
-		$k = $prefixe . $key;
490
+		$k = $prefixe.$key;
492 491
 
493 492
 		switch ($format) {
494 493
 			case 'html':
@@ -501,7 +500,7 @@  discard block
 block discarded – undo
501 500
 	}
502 501
 
503 502
 	if ($format === 'html') {
504
-		return "\n\n<!-- controles md5 -->\n" . join("\n", $ctr) . "\n\n";
503
+		return "\n\n<!-- controles md5 -->\n".join("\n", $ctr)."\n\n";
505 504
 	} else {
506 505
 		return $ctr;
507 506
 	}
@@ -653,7 +652,7 @@  discard block
 block discarded – undo
653 652
 	// On elimine les donnees non modifiees par le formulaire (mais
654 653
 	// potentiellement modifiees entre temps par un autre utilisateur)
655 654
 	foreach ($champs as $key => $val) {
656
-		if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) {
655
+		if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) {
657 656
 			if (is_scalar($val) and $m == md5($val)) {
658 657
 				unset($champs[$key]);
659 658
 			}
@@ -682,7 +681,7 @@  discard block
 block discarded – undo
682 681
 	// de conflit.
683 682
 	$ctrh = $ctrq = $conflits = [];
684 683
 	foreach (array_keys($champs) as $key) {
685
-		if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) {
684
+		if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) {
686 685
 			$ctrh[$key] = $m;
687 686
 			$ctrq[] = $key;
688 687
 		}
@@ -716,8 +715,8 @@  discard block
 block discarded – undo
716 715
  */
717 716
 function display_conflit_champ($x) {
718 717
 	if (strstr($x, "\n") or strlen($x) > 80) {
719
-		return "<textarea style='width:99%; height:10em;'>" . entites_html($x) . "</textarea>\n";
718
+		return "<textarea style='width:99%; height:10em;'>".entites_html($x)."</textarea>\n";
720 719
 	} else {
721
-		return "<input type='text' size='40' style='width:99%' value=\"" . entites_html($x) . "\" />\n";
720
+		return "<input type='text' size='40' style='width:99%' value=\"".entites_html($x)."\" />\n";
722 721
 	}
723 722
 }
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.
ecrire/public/evaluer_page.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 	ob_start();
48 48
 	if (strpos($page['texte'], '?xml') !== false) {
49
-		$page['texte'] = str_replace('<' . '?xml', "<\1?xml", $page['texte']);
49
+		$page['texte'] = str_replace('<'.'?xml', "<\1?xml", $page['texte']);
50 50
 	}
51 51
 
52 52
 	try {
53
-		$res = eval('?' . '>' . $page['texte']);
53
+		$res = eval('?'.'>'.$page['texte']);
54 54
 		$page['texte'] = ob_get_contents();
55 55
 	} catch (\Throwable $e) {
56 56
 		$code = $page['texte'];
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
 		if (!function_exists('numerote_ligne_php')) {
59 59
 			function numerote_ligne_php($match) {
60 60
 				$GLOBALS['numero_ligne_php']++;
61
-				return "\n/*" . str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/';
61
+				return "\n/*".str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT).'*/';
62 62
 			}
63 63
 		}
64
-		$code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', $code);
64
+		$code = '/*001*/'.preg_replace_callback(",\n,", 'numerote_ligne_php', $code);
65 65
 		$code = trim(highlight_string($code, true));
66
-		erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]);
66
+		erreur_squelette('L'.$e->getLine().': '.$e->getMessage().'<br />'.$code, [$page['source'], '', $e->getFile(), '', $GLOBALS['spip_lang']]);
67 67
 		$page['texte'] = '<!-- Erreur -->';
68 68
 	}
69 69
 	ob_end_clean();
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	$page['process_ins'] = 'html';
72 72
 
73 73
 	if (strpos($page['texte'], '?xml') !== false) {
74
-		$page['texte'] = str_replace("<\1?xml", '<' . '?xml', $page['texte']);
74
+		$page['texte'] = str_replace("<\1?xml", '<'.'?xml', $page['texte']);
75 75
 	}
76 76
 }
77 77
 
Please login to merge, or discard this patch.
ecrire/inc/rubriques.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
 		sql_updateq(
136 136
 			'spip_rubriques',
137 137
 			['statut' => 'publie', 'date' => date('Y-m-d H:i:s')],
138
-			'id_rubrique=' . intval($id_rubrique)
138
+			'id_rubrique='.intval($id_rubrique)
139 139
 		);
140
-		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques AS R', 'R.id_rubrique=' . intval($id_rubrique));
140
+		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques AS R', 'R.id_rubrique='.intval($id_rubrique));
141 141
 		if (!$id_parent) {
142 142
 			break;
143 143
 		}
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			return $id_pred != $id_rubrique;
173 173
 		}
174 174
 		// passer au parent si on a depublie
175
-		$r = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_pred));
175
+		$r = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id_pred));
176 176
 		$id_pred = $r['id_parent'];
177 177
 	}
178 178
 
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
 		$date = date('Y-m-d H:i:s');
198 198
 	}
199 199
 	$postdates = ($GLOBALS['meta']['post_dates'] == 'non') ?
200
-		' AND date <= ' . sql_quote($date) : '';
200
+		' AND date <= '.sql_quote($date) : '';
201 201
 
202 202
 	if (!$id_rubrique = intval($id_rubrique)) {
203 203
 		return false;
204 204
 	}
205 205
 
206 206
 	// verifier qu'elle existe et est bien publiee
207
-	$r = sql_fetsel('id_rubrique,statut', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
207
+	$r = sql_fetsel('id_rubrique,statut', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
208 208
 	if (!$r or $r['statut'] !== 'publie') {
209 209
 		return false;
210 210
 	}
@@ -214,12 +214,12 @@  discard block
 block discarded – undo
214 214
 	$compte = [
215 215
 		'articles' => sql_countsel(
216 216
 			'spip_articles',
217
-			'id_rubrique=' . intval($id_rubrique) . " AND statut='publie'$postdates"
217
+			'id_rubrique='.intval($id_rubrique)." AND statut='publie'$postdates"
218 218
 		),
219
-		'rubriques' => sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique) . " AND statut='publie'"),
219
+		'rubriques' => sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique)." AND statut='publie'"),
220 220
 		'documents' => sql_countsel(
221 221
 			'spip_documents AS D JOIN spip_documents_liens AS L ON D.id_document=L.id_document',
222
-			'L.id_objet=' . intval($id_rubrique) . " AND L.objet='rubrique' and D.mode NOT IN('logoon', 'logooff') "
222
+			'L.id_objet='.intval($id_rubrique)." AND L.objet='rubrique' and D.mode NOT IN('logoon', 'logooff') "
223 223
 		)
224 224
 	];
225 225
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 		}
245 245
 	}
246 246
 
247
-	sql_updateq('spip_rubriques', ['statut' => 'prepa'], 'id_rubrique=' . intval($id_rubrique));
247
+	sql_updateq('spip_rubriques', ['statut' => 'prepa'], 'id_rubrique='.intval($id_rubrique));
248 248
 
249 249
 #		spip_log("depublier_rubrique $id_pred");
250 250
 	return true;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
 	// Afficher les articles post-dates ?
309 309
 	$postdates = ($GLOBALS['meta']['post_dates'] == 'non') ?
310
-		'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : '';
310
+		'AND A.date <= '.sql_quote(date('Y-m-d H:i:s')) : '';
311 311
 
312 312
 	$r = sql_select(
313 313
 		'R.id_rubrique AS id, max(A.date) AS date_h',
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		sql_updateq(
320 320
 			'spip_rubriques',
321 321
 			['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']],
322
-			'id_rubrique=' . intval($row['id'])
322
+			'id_rubrique='.intval($row['id'])
323 323
 		);
324 324
 	}
325 325
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			sql_updateq(
346 346
 				'spip_rubriques',
347 347
 				['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']],
348
-				'id_rubrique=' . intval($row['id'])
348
+				'id_rubrique='.intval($row['id'])
349 349
 			);
350 350
 			$continuer = true;
351 351
 		}
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 			and $rows = sql_allfetsel(
399 399
 				'A.id_rubrique AS id, R.id_secteur AS id_secteur, R.profondeur+1 as profondeur',
400 400
 				'spip_rubriques AS A JOIN spip_rubriques AS R ON A.id_parent = R.id_rubrique',
401
-				'R.profondeur=' . intval($prof) . ' AND (A.id_secteur <> R.id_secteur OR A.profondeur > R.profondeur+1)',
401
+				'R.profondeur='.intval($prof).' AND (A.id_secteur <> R.id_secteur OR A.profondeur > R.profondeur+1)',
402 402
 				'',
403 403
 				'R.id_secteur',
404 404
 				'0,100'
@@ -437,11 +437,11 @@  discard block
 block discarded – undo
437 437
 			and $rows = sql_allfetsel(
438 438
 				'id_rubrique as id',
439 439
 				'spip_rubriques',
440
-				'profondeur=' . intval($prof + 1) . ' AND id_parent NOT IN (' . sql_get_select(
440
+				'profondeur='.intval($prof + 1).' AND id_parent NOT IN ('.sql_get_select(
441 441
 					'zzz.id_rubrique',
442 442
 					'spip_rubriques AS zzz',
443
-					'zzz.profondeur=' . intval($prof)
444
-				) . ')',
443
+					'zzz.profondeur='.intval($prof)
444
+				).')',
445 445
 				'',
446 446
 				'',
447 447
 				'0,100'
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 		// si pas de rubrique a profondeur $prof+1 pas la peine de continuer
456 456
 		// si il reste des rubriques non vues, c'est une branche morte ou reference circulaire (base foireuse)
457 457
 		// on arrete les frais
458
-		if (sql_countsel('spip_rubriques', 'profondeur=' . intval($prof + 1))) {
458
+		if (sql_countsel('spip_rubriques', 'profondeur='.intval($prof + 1))) {
459 459
 			$prof++;
460 460
 			$continuer = true;
461 461
 		}
@@ -463,12 +463,12 @@  discard block
 block discarded – undo
463 463
 
464 464
 	// loger si la table des rubriques semble foireuse
465 465
 	// et mettre un id_secteur=0 sur ces rubriques pour eviter toute selection par les boucles
466
-	if (sql_countsel('spip_rubriques', 'profondeur>' . intval($prof + 1))) {
466
+	if (sql_countsel('spip_rubriques', 'profondeur>'.intval($prof + 1))) {
467 467
 		spip_log(
468
-			'Les rubriques de profondeur>' . ($prof + 1) . ' semblent suspectes (branches morte ou reference circulaire dans les parents)',
468
+			'Les rubriques de profondeur>'.($prof + 1).' semblent suspectes (branches morte ou reference circulaire dans les parents)',
469 469
 			_LOG_CRITIQUE
470 470
 		);
471
-		sql_update('spip_rubriques', ['id_secteur' => 0], 'profondeur>' . intval($prof + 1));
471
+		sql_update('spip_rubriques', ['id_secteur' => 0], 'profondeur>'.intval($prof + 1));
472 472
 	}
473 473
 
474 474
 	// reparer les articles
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 	);
480 480
 
481 481
 	while ($row = sql_fetch($r)) {
482
-		sql_update('spip_articles', ['id_secteur' => $row['secteur']], 'id_article=' . intval($row['id']));
482
+		sql_update('spip_articles', ['id_secteur' => $row['secteur']], 'id_article='.intval($row['id']));
483 483
 	}
484 484
 
485 485
 	// avertir les plugins qui peuvent faire leur mises a jour egalement
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 		$t = sql_updateq(
511 511
 			'spip_rubriques',
512 512
 			['lang' => $row['lang'], 'langue_choisie' => 'non'],
513
-			'id_rubrique=' . intval($id_rubrique)
513
+			'id_rubrique='.intval($id_rubrique)
514 514
 		);
515 515
 	}
516 516
 
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 		sql_updateq(
556 556
 			'spip_articles',
557 557
 			['lang' => $row['lang'], 'langue_choisie' => 'non'],
558
-			'id_article=' . intval($id_article)
558
+			'id_article='.intval($id_article)
559 559
 		);
560 560
 	}
561 561
 
@@ -630,11 +630,11 @@  discard block
 block discarded – undo
630 630
 				];
631 631
 				// generer un nom de fonction "anonyme" unique
632 632
 				do {
633
-					$functionname = 'f_calculer_langues_utilisees_' . $boucle->id_table . '_' . time() . '_' . random_int(0, mt_getrandmax());
633
+					$functionname = 'f_calculer_langues_utilisees_'.$boucle->id_table.'_'.time().'_'.random_int(0, mt_getrandmax());
634 634
 				} while (function_exists($functionname));
635 635
 				$code = calculer_boucle('calculer_langues_utilisees', $boucles);
636
-				$code = '$SP=0; $command=array();$command["connect"] = $connect = "' . $serveur . '"; $Pile=array(0=>array());' . "\n" . $code;
637
-				$code = 'function ' . $functionname . '(){' . $code . '};$res = ' . $functionname . '();';
636
+				$code = '$SP=0; $command=array();$command["connect"] = $connect = "'.$serveur.'"; $Pile=array(0=>array());'."\n".$code;
637
+				$code = 'function '.$functionname.'(){'.$code.'};$res = '.$functionname.'();';
638 638
 				$res = '';
639 639
 				eval($code);
640 640
 				$res = explode(',', $res);
@@ -736,11 +736,11 @@  discard block
 block discarded – undo
736 736
 		$maxiter-- and $filles = sql_allfetsel(
737 737
 			'id_rubrique',
738 738
 			'spip_rubriques',
739
-			sql_in('id_parent', $r) . ' AND ' . sql_in('id_rubrique', $r, 'NOT')
739
+			sql_in('id_parent', $r).' AND '.sql_in('id_rubrique', $r, 'NOT')
740 740
 		)
741 741
 	) {
742 742
 		$r = join(',', array_column($filles, 'id_rubrique'));
743
-		$branche .= ',' . $r;
743
+		$branche .= ','.$r;
744 744
 	}
745 745
 
746 746
 	# securite pour ne pas plomber la conso memoire sur les sites prolifiques
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 
781 781
 	if (isset($b[$id])) {
782 782
 		// Notre branche commence par la rubrique de depart si $tout=true
783
-		return $tout ? (strlen($b[$id]) ? $b[$id] . ",$id" : $id) : $b[$id];
783
+		return $tout ? (strlen($b[$id]) ? $b[$id].",$id" : $id) : $b[$id];
784 784
 	}
785 785
 
786 786
 	$hier = '';
@@ -793,11 +793,11 @@  discard block
 block discarded – undo
793 793
 		$maxiter-- and $parents = sql_allfetsel(
794 794
 			'id_parent',
795 795
 			'spip_rubriques',
796
-			sql_in('id_rubrique', $ids_nouveaux_parents) . ' AND ' . sql_in('id_parent', $hier, 'NOT')
796
+			sql_in('id_rubrique', $ids_nouveaux_parents).' AND '.sql_in('id_parent', $hier, 'NOT')
797 797
 		)
798 798
 	) {
799 799
 		$ids_nouveaux_parents = join(',', array_column($parents, 'id_parent'));
800
-		$hier = $ids_nouveaux_parents . (strlen($hier) ? ',' . $hier : '');
800
+		$hier = $ids_nouveaux_parents.(strlen($hier) ? ','.$hier : '');
801 801
 	}
802 802
 
803 803
 	# securite pour ne pas plomber la conso memoire sur les sites prolifiques
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
 	include_spip('base/abstract_sql');
830 830
 	if ($check) {
831 831
 		$postdates = ($GLOBALS['meta']['post_dates'] == 'non') ?
832
-			'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : '';
832
+			'AND A.date <= '.sql_quote(date('Y-m-d H:i:s')) : '';
833 833
 
834 834
 		$r = sql_select(
835 835
 			'DISTINCT A.id_rubrique AS id',
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	$t = sql_fetsel(
847 847
 		'date',
848 848
 		'spip_articles',
849
-		"statut='publie' AND date > " . sql_quote(date('Y-m-d H:i:s')),
849
+		"statut='publie' AND date > ".sql_quote(date('Y-m-d H:i:s')),
850 850
 		'',
851 851
 		'date',
852 852
 		'1'
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 		$r = sql_getfetsel(
903 903
 			'id_rubrique',
904 904
 			'spip_rubriques',
905
-			'titre = ' . sql_quote($titre) . ' AND id_parent=' . intval($id_parent),
905
+			'titre = '.sql_quote($titre).' AND id_parent='.intval($id_parent),
906 906
 			$groupby = [],
907 907
 			$orderby = [],
908 908
 			$limit = '',
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 			sql_updateq(
939 939
 				'spip_rubriques',
940 940
 				['id_secteur' => $id_secteur, 'lang' => $lang],
941
-				'id_rubrique=' . intval($id_rubrique),
941
+				'id_rubrique='.intval($id_rubrique),
942 942
 				[],
943 943
 				$serveur
944 944
 			);
Please login to merge, or discard this patch.
ecrire/inc/modifier.php 1 patch
Spacing   +13 added lines, -13 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
 	}
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	$champs = array_map('corriger_caracteres', $champs);
147 147
 
148 148
 	// On récupère l'état avant toute modification
149
-	$row = sql_fetsel('*', $spip_table_objet, $id_table_objet . '=' . $id_objet);
149
+	$row = sql_fetsel('*', $spip_table_objet, $id_table_objet.'='.$id_objet);
150 150
 
151 151
 	// Envoyer aux plugins
152 152
 	$champs = pipeline(
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 				$id_rubrique = 0;
201 201
 				if (isset($desc['field']['id_rubrique'])) {
202 202
 					$parent = ($objet == 'rubrique') ? 'id_parent' : 'id_rubrique';
203
-					$id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=" . intval($id_objet));
203
+					$id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=".intval($id_objet));
204 204
 				}
205 205
 				$instituer_langue_objet = charger_fonction('instituer_langue_objet', 'action');
206 206
 				$champs['lang'] = $instituer_langue_objet($objet, $id_objet, $id_rubrique, $changer_lang, $serveur);
@@ -222,13 +222,13 @@  discard block
 block discarded – undo
222 222
 		}
223 223
 
224 224
 		// allez on commit la modif
225
-		sql_updateq($spip_table_objet, $champs, "$id_table_objet=" . intval($id_objet), [], $serveur);
225
+		sql_updateq($spip_table_objet, $champs, "$id_table_objet=".intval($id_objet), [], $serveur);
226 226
 
227 227
 		// on verifie si elle est bien passee
228 228
 		$moof = sql_fetsel(
229 229
 			array_keys($champs),
230 230
 			$spip_table_objet,
231
-			"$id_table_objet=" . intval($id_objet),
231
+			"$id_table_objet=".intval($id_objet),
232 232
 			[],
233 233
 			[],
234 234
 			'',
@@ -264,13 +264,13 @@  discard block
 block discarded – undo
264 264
 			// c'est un cas exceptionnel
265 265
 			if (count($liste)) {
266 266
 				spip_log(
267
-					"Erreur enregistrement en base $objet/$id_objet champs :" . var_export($conflits, true),
268
-					'modifier.' . _LOG_CRITIQUE
267
+					"Erreur enregistrement en base $objet/$id_objet champs :".var_export($conflits, true),
268
+					'modifier.'._LOG_CRITIQUE
269 269
 				);
270 270
 
271 271
 				return _T(
272 272
 					'erreur_technique_enregistrement_champs',
273
-					['champs' => "<i>'" . implode("'</i>,<i>'", $liste) . "'</i>"]
273
+					['champs' => "<i>'".implode("'</i>,<i>'", $liste)."'</i>"]
274 274
 				);
275 275
 			}
276 276
 		}
@@ -312,18 +312,18 @@  discard block
 block discarded – undo
312 312
 	include_spip('inc/filtres_mini');
313 313
 	$qui = '';
314 314
 	if (!empty($GLOBALS['visiteur_session']['id_auteur'])) {
315
-		$qui .= ' #id_auteur:' . $GLOBALS['visiteur_session']['id_auteur'] . '#';
315
+		$qui .= ' #id_auteur:'.$GLOBALS['visiteur_session']['id_auteur'].'#';
316 316
 	}
317 317
 	if (!empty($GLOBALS['visiteur_session']['nom'])) {
318
-		$qui .= ' #nom:' . $GLOBALS['visiteur_session']['nom'] . '#';
318
+		$qui .= ' #nom:'.$GLOBALS['visiteur_session']['nom'].'#';
319 319
 	}
320 320
 	if ($qui == '') {
321
-		$qui = '#ip:' . $GLOBALS['ip'] . '#';
321
+		$qui = '#ip:'.$GLOBALS['ip'].'#';
322 322
 	}
323
-	journal(_L($qui . ' a édité ' . $objet . ' ' . $id_objet . ' (' . join(
323
+	journal(_L($qui.' a édité '.$objet.' '.$id_objet.' ('.join(
324 324
 		'+',
325 325
 		array_diff(array_keys($champs), ['date_modif'])
326
-	) . ')'), [
326
+	).')'), [
327 327
 		'faire' => 'modifier',
328 328
 		'quoi' => $objet,
329 329
 		'id' => $id_objet
Please login to merge, or discard this patch.
ecrire/public/composer.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$GLOBALS['debug_objets']['courant'] = $nom;
56 56
 	}
57 57
 
58
-	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php';
58
+	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php';
59 59
 
60 60
 	// si squelette est deja compile et perenne, le charger
61 61
 	if (!squelette_obsolete($phpfile, $source)) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		#}
69 69
 	}
70 70
 
71
-	if (file_exists($lib = $squelette . '_fonctions' . '.php')) {
71
+	if (file_exists($lib = $squelette.'_fonctions'.'.php')) {
72 72
 		include_once $lib;
73 73
 	}
74 74
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 			eval("return true; $f ;");
97 97
 		} catch (\ParseError $e) {
98 98
 			// Code syntaxiquement faux (critere etc mal programme')
99
-			$msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage();
99
+			$msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage();
100 100
 			erreur_squelette($msg, $boucle);
101 101
 			// continuer pour trouver d'autres fautes eventuelles
102 102
 			// mais prevenir que c'est mort
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
 	if (defined('_VAR_MODE') and _VAR_MODE == 'debug') {
126 126
 		// Tracer ce qui vient d'etre compile
127
-		$GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code;
127
+		$GLOBALS['debug_objets']['code'][$nom.'tout'] = $code;
128 128
 
129 129
 		// si c'est ce que demande le debusqueur, lui passer la main
130 130
 		if (
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
 		$code = "
149 149
 /*
150 150
  * Squelette : $sourcefile
151
- * Date :      " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT
152
- * Compile :   ' . gmdate('D, d M Y H:i:s', time()) . ' GMT
153
- * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   ' . $noms)) . '
151
+ * Date :      ".gmdate('D, d M Y H:i:s', @filemtime($sourcefile)).' GMT
152
+ * Compile :   ' . gmdate('D, d M Y H:i:s', time()).' GMT
153
+ * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   '.$noms)).'
154 154
  */ ';
155 155
 	}
156 156
 
157
-	$code = '<' . "?php\n" . $code . join('', $boucles) . "\n";
157
+	$code = '<'."?php\n".$code.join('', $boucles)."\n";
158 158
 	if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) {
159 159
 		ecrire_fichier($phpfile, $code);
160 160
 	}
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 			$j = join('-', array_map('ucwords', explode('-', strtolower($r[2]))));
217 217
 
218 218
 			if ($j == 'X-Spip-Filtre' and isset($headers[$j])) {
219
-				$headers[$j] .= '|' . $r[3];
219
+				$headers[$j] .= '|'.$r[3];
220 220
 			} else {
221 221
 				$headers[$j] = $r[3];
222 222
 			}
@@ -224,10 +224,10 @@  discard block
 block discarded – undo
224 224
 	}
225 225
 	// S'agit-il d'un resultat constant ou contenant du code php
226 226
 	$process_ins = (
227
-		strpos($corps, '<' . '?') === false
227
+		strpos($corps, '<'.'?') === false
228 228
 		or
229
-		(strpos($corps, '<' . '?xml') !== false and
230
-			strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
229
+		(strpos($corps, '<'.'?xml') !== false and
230
+			strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
231 231
 	)
232 232
 		? 'html'
233 233
 		: 'php';
@@ -256,10 +256,10 @@  discard block
 block discarded – undo
256 256
 
257 257
 		if ($process_ins == 'html') {
258 258
 			$skel['process_ins'] = (
259
-				strpos($corps, '<' . '?') === false
259
+				strpos($corps, '<'.'?') === false
260 260
 				or
261
-				(strpos($corps, '<' . '?xml') !== false and
262
-					strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
261
+				(strpos($corps, '<'.'?xml') !== false and
262
+					strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
263 263
 			)
264 264
 				? 'html'
265 265
 				: 'php';
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 //
278 278
 
279 279
 /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */
280
-define('CODE_INCLURE_BALISE', '<' . '?php
280
+define('CODE_INCLURE_BALISE', '<'.'?php
281 281
 include_once("%s");
282 282
 if ($lang_select = "%s") $lang_select = lang_select($lang_select);
283 283
 inserer_balise_dynamique(balise_%s_dyn(%s), array(%s));
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 		// pas de lien symbolique sous Windows
309 309
 		and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false)
310 310
 	) {
311
-		$file = './" . _DIR_RACINE . "' . $file;
311
+		$file = './" . _DIR_RACINE . "'.$file;
312 312
 	}
313 313
 
314 314
 	$lang = $context_compil[4];
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 	$args = array_map('argumenter_squelette', $args);
320 320
 	if (!empty($context_compil['appel_php_depuis_modele'])) {
321
-		$args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')';
321
+		$args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')';
322 322
 	}
323 323
 	$args = join(', ', $args);
324 324
 
@@ -352,14 +352,14 @@  discard block
 block discarded – undo
352 352
 	if (is_object($v)) {
353 353
 		return var_export($v, true);
354 354
 	} elseif (!is_array($v)) {
355
-		return "'" . texte_script((string) $v) . "'";
355
+		return "'".texte_script((string) $v)."'";
356 356
 	} else {
357 357
 		$out = [];
358 358
 		foreach ($v as $k => $val) {
359
-			$out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val);
359
+			$out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val);
360 360
 		}
361 361
 
362
-		return 'array(' . join(', ', $out) . ')';
362
+		return 'array('.join(', ', $out).')';
363 363
 	}
364 364
 }
365 365
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 	}
438 438
 
439 439
 	// Y a-t-il une fonction de traitement des arguments ?
440
-	$f = 'balise_' . $nom_balise . '_stat';
440
+	$f = 'balise_'.$nom_balise.'_stat';
441 441
 
442 442
 	$r = !function_exists($f) ? $args : $f($args, $context_compil);
443 443
 
@@ -447,18 +447,18 @@  discard block
 block discarded – undo
447 447
 
448 448
 	// verifier que la fonction dyn est la,
449 449
 	// sinon se replier sur la generique si elle existe
450
-	if (!function_exists('balise_' . $nom_balise . '_dyn')) {
450
+	if (!function_exists('balise_'.$nom_balise.'_dyn')) {
451 451
 		if (
452 452
 			$balise_generique = chercher_balise_generique($nom)
453 453
 			and $nom_balise_generique = $balise_generique['nom_generique']
454
-			and $file = include_spip('balise/' . strtolower($nom_balise_generique))
455
-			and function_exists('balise_' . $nom_balise_generique . '_dyn')
454
+			and $file = include_spip('balise/'.strtolower($nom_balise_generique))
455
+			and function_exists('balise_'.$nom_balise_generique.'_dyn')
456 456
 		) {
457 457
 			// et lui injecter en premier arg le nom de la balise
458 458
 			array_unshift($r, $nom);
459 459
 			$nom_balise = $nom_balise_generique;
460 460
 			if (!_DIR_RESTREINT) {
461
-				$file = _DIR_RESTREINT_ABS . $file;
461
+				$file = _DIR_RESTREINT_ABS.$file;
462 462
 			}
463 463
 		} else {
464 464
 			$msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]];
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 		$n = '';
560 560
 		foreach (explode(',', $liste) as $val) {
561 561
 			if ($a = intval($val) and $val === strval($a)) {
562
-				$n .= ',' . $val;
562
+				$n .= ','.$val;
563 563
 			}
564 564
 		}
565 565
 		if (strlen($n)) {
@@ -738,8 +738,8 @@  discard block
 block discarded – undo
738 738
 			// on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction
739 739
 			$i = 0;
740 740
 			do {
741
-				$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
742
-					[$sous[1] . ' AS id'],
741
+				$where[$k] = remplace_sous_requete($w, '('.calculer_select(
742
+					[$sous[1].' AS id'],
743 743
 					$from,
744 744
 					$from_type,
745 745
 					$wheresub,
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 					$id,
753 753
 					$serveur,
754 754
 					false
755
-				) . ')');
755
+				).')');
756 756
 				if (!$i) {
757 757
 					$i = 1;
758 758
 					$wherestring = calculer_where_to_string($where[$k]);
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
 		if ($sous[0] == 'SUBSELECT') {
773 773
 			// c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having)
774 774
 			array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ?
775
-			$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
775
+			$where[$k] = remplace_sous_requete($w, '('.calculer_select(
776 776
 				$sous[1], # select
777 777
 				$sous[2], #from
778 778
 				[], #from_type
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 				$id,
788 788
 				$serveur,
789 789
 				false
790
-			) . ')');
790
+			).')');
791 791
 		}
792 792
 		array_pop($where_simples);
793 793
 	}
@@ -850,15 +850,15 @@  discard block
 block discarded – undo
850 850
 			// sans recours a preg_match
851 851
 			// un implode(' ',..) est fait dans reinjecte_joint un peu plus bas
852 852
 			$afrom[$t][$cle] = [
853
-				"\n" .
854
-				($from_type[$cle] ?? 'INNER') . ' JOIN',
853
+				"\n".
854
+				($from_type[$cle] ?? 'INNER').' JOIN',
855 855
 				$from[$cle],
856 856
 				"AS $cle",
857 857
 				'ON (',
858 858
 				"$cle.$c",
859 859
 				'=',
860 860
 				"$t.$carr",
861
-				($and ? 'AND ' . $and : '') .
861
+				($and ? 'AND '.$and : '').
862 862
 				')'
863 863
 			];
864 864
 			if (isset($afrom[$cle])) {
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 		$t = key($from);
897 897
 		$c = current($from);
898 898
 		reset($from);
899
-		$e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/';
899
+		$e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/';
900 900
 		if (
901 901
 			!(strpos($t, ' ') or // jointure des le depart cf boucle_doc
902 902
 				calculer_jointnul($t, $select, $e) or
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
 			unset($afrom[$t][$nt]);
915 915
 			$afrom[$nt] = $afrom[$t];
916 916
 			unset($afrom[$t]);
917
-			$e = '/\b' . preg_quote($nfrom[6]) . '\b/';
917
+			$e = '/\b'.preg_quote($nfrom[6]).'\b/';
918 918
 			$t = $nfrom[4];
919 919
 			$alias = '';
920 920
 			// verifier que les deux cles sont homonymes, sinon installer un alias dans le select
@@ -925,14 +925,14 @@  discard block
 block discarded – undo
925 925
 			if ($newcle != $oldcle) {
926 926
 				// si l'ancienne cle etait deja dans le select avec un AS
927 927
 				// reprendre simplement ce AS
928
-				$as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/';
928
+				$as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/';
929 929
 				if (preg_match($as, implode(',', $select), $m)) {
930 930
 					$alias = '';
931 931
 				} else {
932
-					$alias = ', ' . $nfrom[4] . " AS $oldcle";
932
+					$alias = ', '.$nfrom[4]." AS $oldcle";
933 933
 				}
934 934
 			}
935
-			$select = remplacer_jointnul($t . $alias, $select, $e);
935
+			$select = remplacer_jointnul($t.$alias, $select, $e);
936 936
 			$join = remplacer_jointnul($t, $join, $e);
937 937
 			$where = remplacer_jointnul($t, $where, $e);
938 938
 			$having = remplacer_jointnul($t, $having, $e);
@@ -982,9 +982,9 @@  discard block
 block discarded – undo
982 982
 	} else {
983 983
 		$exp = '';
984 984
 		if (strtoupper($join) === 'AND') {
985
-			return $exp . join(" $join ", array_map('calculer_where_to_string', $v));
985
+			return $exp.join(" $join ", array_map('calculer_where_to_string', $v));
986 986
 		} else {
987
-			return $exp . join($join, $v);
987
+			return $exp.join($join, $v);
988 988
 		}
989 989
 	}
990 990
 }
@@ -1046,6 +1046,6 @@  discard block
 block discarded – undo
1046 1046
 	}
1047 1047
 
1048 1048
 	return $mime_type
1049
-	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_'
1050
-	. md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : ''));
1049
+	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_'
1050
+	. md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : ''));
1051 1051
 }
Please login to merge, or discard this patch.