Completed
Push — master ( cb4c97...2f20ec )
by cam
01:18
created
ecrire/public/references.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	$select = true
125 125
 ) {
126 126
 	if (!is_string($defaut)) {
127
-		$defaut = '($Pile[0][\'' . strtolower($nom_champ) . '\'] ?? null)';
127
+		$defaut = '($Pile[0][\''.strtolower($nom_champ).'\'] ?? null)';
128 128
 	}
129 129
 
130 130
 	$idb_origine = $idb;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			}
158 158
 			// renseigner la boucle source de ce champ pour les traitements
159 159
 			$boucles[$idb_origine]->index_champ[$nom_champ_origine] = $idb;
160
-			$champ = '$Pile[$SP' . ($i ? "-$i" : '') . '][\'' . $c . '\']';
160
+			$champ = '$Pile[$SP'.($i ? "-$i" : '').'][\''.$c.'\']';
161 161
 			if (!$joker) {
162 162
 				return index_compose($conditionnel, $champ);
163 163
 			}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 function index_compose($conditionnel, $defaut) {
199 199
 	while ($c = array_pop($conditionnel)) {
200 200
 		// si on passe defaut = '', ne pas générer d'erreur de compilation.
201
-		$defaut = "($c:(" . ($defaut ?: "''") . '))';
201
+		$defaut = "($c:(".($defaut ?: "''").'))';
202 202
 	}
203 203
 
204 204
 	return $defaut;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	if (!$r) {
246 246
 		$joker = false; // indiquer a l'appelant
247 247
 		# continuer pour chercher l'erreur suivante
248
-		return ["'#" . $r . ':' . $nom_champ . "'", ''];
248
+		return ["'#".$r.':'.$nom_champ."'", ''];
249 249
 	}
250 250
 
251 251
 	$desc = $boucles[$idb]->show;
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	if (preg_match('/^(.*)\.(.*)$/', $nom_champ, $r)) {
288 288
 		[, $_table, $_nom_champ] = $r;
289 289
 		if ($cle = trouver_jointure_champ($_nom_champ, $boucles[$idb], [$_table])) {
290
-			$_alias = $cle . '_' . $_nom_champ;
290
+			$_alias = $cle.'_'.$_nom_champ;
291 291
 			return index_exception(
292 292
 				$boucles[$idb],
293 293
 				$desc,
@@ -367,8 +367,8 @@  discard block
 block discarded – undo
367 367
 			$t = $index_exception_derogatoire($boucle, $desc, $nom_champ, $excep);
368 368
 		}
369 369
 		if ($t == null) {
370
-			[$e, $x] = $excep;  #PHP4 affecte de gauche a droite
371
-			$excep = $x;    #PHP5 de droite a gauche !
370
+			[$e, $x] = $excep; #PHP4 affecte de gauche a droite
371
+			$excep = $x; #PHP5 de droite a gauche !
372 372
 			$j = $trouver_table($e, $boucle->sql_serveur);
373 373
 			if (!$j) {
374 374
 				return ['', ''];
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 					$l = (preg_split('/\s*,\s*/', $k));
381 381
 					$k = $desc['key']['PRIMARY KEY'];
382 382
 					if (!in_array($k, $l)) {
383
-						spip_log("jointure impossible $e " . join(',', $l));
383
+						spip_log("jointure impossible $e ".join(',', $l));
384 384
 
385 385
 						return ['', ''];
386 386
 					}
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	// demander a SQL de gerer le synonyme
397 397
 	// ca permet que excep soit dynamique (Cedric, 2/3/06)
398 398
 	if ($excep != $nom_champ) {
399
-		$excep .= ' AS ' . $nom_champ;
399
+		$excep .= ' AS '.$nom_champ;
400 400
 	}
401 401
 
402 402
 	return ["$t.$excep", $nom_champ];
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 		join(',', $collecte),
631 631
 		($collecte ? $param : substr($param, 1)), # virer la virgule
632 632
 		memoriser_contexte_compil($p),
633
-		(!$supp ? '' : (', ' . join(',', $supp)))
633
+		(!$supp ? '' : (', '.join(',', $supp)))
634 634
 	);
635 635
 
636 636
 	$p->interdire_scripts = false;
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 	$nom = $p->id_boucle;
733 733
 
734 734
 	if ($nom and trouver_nom_serveur_distant($p)) {
735
-		spip_log($nom . ':' . $p->nom_champ . ' ' . _T('zbug_distant_interdit'));
735
+		spip_log($nom.':'.$p->nom_champ.' '._T('zbug_distant_interdit'));
736 736
 
737 737
 		return false;
738 738
 	}
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 			(strpos($ps, 'typo') !== false)
818 818
 		)
819 819
 	) {
820
-		$ps = 'traiter_doublons_documents($doublons, ' . $ps . ')';
820
+		$ps = 'traiter_doublons_documents($doublons, '.$ps.')';
821 821
 	}
822 822
 
823 823
 	// La protection des champs par |safehtml est assuree par les extensions
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
 function compose_filtres_args($p, $args, $sep) {
936 936
 	$arglist = '';
937 937
 	foreach ($args as $arg) {
938
-		$arglist .= $sep .
938
+		$arglist .= $sep.
939 939
 			calculer_liste($arg, $p->descr, $p->boucles, $p->id_boucle);
940 940
 	}
941 941
 
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
 	while ($b != '') {
986 986
 		foreach ($p->boucles[$b]->criteres as $critere) {
987 987
 			if ($critere->op == $motif) {
988
-				$p->code = '$Pile[$SP' . (($n == 0) ? '' : "-$n") .
988
+				$p->code = '$Pile[$SP'.(($n == 0) ? '' : "-$n").
989 989
 					"]['$champ']";
990 990
 				$b = '';
991 991
 				break 2;
@@ -1013,6 +1013,6 @@  discard block
 block discarded – undo
1013 1013
  */
1014 1014
 function zbug_presenter_champ($p, $champ = '') {
1015 1015
 	$balise = $champ ?: $p->nom_champ;
1016
-	$explicite = $p->nom_boucle ? $p->nom_boucle . ':' : '';
1016
+	$explicite = $p->nom_boucle ? $p->nom_boucle.':' : '';
1017 1017
 	return "#{$explicite}{$balise}";
1018 1018
 }
Please login to merge, or discard this patch.