Completed
Pull Request — master (#39)
by
unknown
09:06
created
ecrire/public/parametrer.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 // donc il faut l'inclure "en globals"
21 21
 if ($f = find_in_path('mes_fonctions.php')) {
22 22
 	global $dossier_squelettes;
23
-	include_once(_ROOT_CWD . $f);
23
+	include_once(_ROOT_CWD.$f);
24 24
 }
25 25
 
26 26
 if (@is_readable(_CACHE_PLUGINS_FCT)) {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	} else {
97 97
 		// Preparer l'appel de la fonction principale du squelette 
98 98
 
99
-		spip_timer($a = 'calcul page ' . rand(0, 1000));
99
+		spip_timer($a = 'calcul page '.rand(0, 1000));
100 100
 
101 101
 		// On cree un marqueur de notes unique lie a cette composition
102 102
 		// et on enregistre l'etat courant des globales de notes...
@@ -152,28 +152,28 @@  discard block
 block discarded – undo
152 152
 				$val = serialize($val);
153 153
 			}
154 154
 			if (strlen("$val") > 30) {
155
-				$val = substr("$val", 0, 27) . '..';
155
+				$val = substr("$val", 0, 27).'..';
156 156
 			}
157 157
 			if (strstr($val, ' ')) {
158 158
 				$val = "'$val'";
159 159
 			}
160
-			$infos[] = $var . '=' . $val;
160
+			$infos[] = $var.'='.$val;
161 161
 		}
162 162
 		$profile = spip_timer($a);
163 163
 		spip_log("calcul ($profile) [$skel] "
164 164
 			. join(', ', $infos)
165
-			. ' (' . strlen($page['texte']) . ' octets)');
165
+			. ' ('.strlen($page['texte']).' octets)');
166 166
 
167
-		if (defined('_CALCUL_PROFILER') AND intval($profile)>_CALCUL_PROFILER){
167
+		if (defined('_CALCUL_PROFILER') AND intval($profile) > _CALCUL_PROFILER) {
168 168
 			spip_log("calcul ($profile) [$skel] "
169 169
 				. join(', ', $infos)
170
-				.' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'],"profiler"._LOG_AVERTISSEMENT);
170
+				.' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], "profiler"._LOG_AVERTISSEMENT);
171 171
 		}
172 172
 
173 173
 		if ($debug) {
174 174
 			// si c'est ce que demande le debusqueur, lui passer la main
175 175
 			$t = strlen($page['texte']) ? $page['texte'] : " ";
176
-			$GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t;
176
+			$GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t;
177 177
 			$GLOBALS['debug_objets']['courant'] = $courant;
178 178
 			$GLOBALS['debug_objets']['profile'][$sourcefile] = $profile;
179 179
 			if ($GLOBALS['debug_objets']['sourcefile']
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		if (defined('_VAR_INCLURE') and _VAR_INCLURE) {
204 204
 			$page['sourcefile'] = $sourcefile;
205 205
 			$page['texte'] =
206
-				"<div class='inclure_blocs'><h6>" . $page['sourcefile'] . "</h6>" . $page['texte'] . "</div>"
206
+				"<div class='inclure_blocs'><h6>".$page['sourcefile']."</h6>".$page['texte']."</div>"
207 207
 				. ($js_inclus ? "" : "<script type='text/javascript'>jQuery(function(){jQuery('.inclure_blocs > h6:first-child').hover(function(){jQuery(this).parent().addClass('hover')},function(){jQuery(this).parent().removeClass('hover')})});</script>");
208 208
 			$js_inclus = true;
209 209
 		}
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 						. "?php include_spip('inc/headers');redirige_par_entete('"
284 284
 						. texte_script($url)
285 285
 						. "','',$status);"
286
-						. "?" . ">",
286
+						. "?".">",
287 287
 					'process_ins' => 'php',
288 288
 					'status' => $status
289 289
 				);
Please login to merge, or discard this patch.
ecrire/public/references.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	$select = true
96 96
 ) {
97 97
 	if (!is_string($defaut)) {
98
-		$defaut = '@$Pile[0][\'' . strtolower($nom_champ) . '\']';
98
+		$defaut = '@$Pile[0][\''.strtolower($nom_champ).'\']';
99 99
 	}
100 100
 
101 101
 	$i = 0;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 			if ($select and !in_array($t, $boucles[$idb]->select)) {
124 124
 				$boucles[$idb]->select[] = $t;
125 125
 			}
126
-			$champ = '$Pile[$SP' . ($i ? "-$i" : "") . '][\'' . $c . '\']';
126
+			$champ = '$Pile[$SP'.($i ? "-$i" : "").'][\''.$c.'\']';
127 127
 			if (!$joker) {
128 128
 				return index_compose($conditionnel, $champ);
129 129
 			}
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 function index_compose($conditionnel, $defaut) {
165 165
 	while ($c = array_pop($conditionnel)) {
166 166
 		// si on passe defaut = '', ne pas générer d'erreur de compilation.
167
-		$defaut = "($c:(" . ($defaut ? $defaut : "''") . "))";
167
+		$defaut = "($c:(".($defaut ? $defaut : "''")."))";
168 168
 	}
169 169
 
170 170
 	return $defaut;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	if (!$r) {
212 212
 		$joker = false; // indiquer a l'appelant
213 213
 		# continuer pour chercher l'erreur suivante
214
-		return array("'#" . $r . ':' . $nom_champ . "'", '');
214
+		return array("'#".$r.':'.$nom_champ."'", '');
215 215
 	}
216 216
 
217 217
 	$desc = $boucles[$idb]->show;
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
 			$t = $index_exception_derogatoire($boucle, $desc, $nom_champ, $excep);
312 312
 		}
313 313
 		if ($t == null) {
314
-			list($e, $x) = $excep;  #PHP4 affecte de gauche a droite
315
-			$excep = $x;    #PHP5 de droite a gauche !
314
+			list($e, $x) = $excep; #PHP4 affecte de gauche a droite
315
+			$excep = $x; #PHP5 de droite a gauche !
316 316
 			$j = $trouver_table($e, $boucle->sql_serveur);
317 317
 			if (!$j) {
318 318
 				return array('', '');
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 					$l = (preg_split('/\s*,\s*/', $k));
325 325
 					$k = $desc['key']['PRIMARY KEY'];
326 326
 					if (!in_array($k, $l)) {
327
-						spip_log("jointure impossible $e " . join(',', $l));
327
+						spip_log("jointure impossible $e ".join(',', $l));
328 328
 
329 329
 						return array('', '');
330 330
 					}
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	// demander a SQL de gerer le synonyme
341 341
 	// ca permet que excep soit dynamique (Cedric, 2/3/06)
342 342
 	if ($excep != $nom_champ) {
343
-		$excep .= ' AS ' . $nom_champ;
343
+		$excep .= ' AS '.$nom_champ;
344 344
 	}
345 345
 
346 346
 	return array("$t.$excep", $nom_champ);
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 		join(',', $collecte),
574 574
 		($collecte ? $param : substr($param, 1)), # virer la virgule
575 575
 		memoriser_contexte_compil($p),
576
-		(!$supp ? '' : (', ' . join(',', $supp))));
576
+		(!$supp ? '' : (', '.join(',', $supp))));
577 577
 
578 578
 	$p->interdire_scripts = false;
579 579
 
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 	$nom = $p->id_boucle;
669 669
 
670 670
 	if ($nom and trouver_nom_serveur_distant($p)) {
671
-		spip_log($nom . ':' . $p->nom_champ . ' ' . _T('zbug_distant_interdit'));
671
+		spip_log($nom.':'.$p->nom_champ.' '._T('zbug_distant_interdit'));
672 672
 
673 673
 		return false;
674 674
 	}
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 			(strpos($ps, 'typo') !== false)
738 738
 		)
739 739
 	) {
740
-		$ps = 'traiter_doublons_documents($doublons, ' . $ps . ')';
740
+		$ps = 'traiter_doublons_documents($doublons, '.$ps.')';
741 741
 	}
742 742
 
743 743
 	// La protection des champs par |safehtml est assuree par les extensions
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 function compose_filtres_args($p, $args, $sep) {
856 856
 	$arglist = "";
857 857
 	foreach ($args as $arg) {
858
-		$arglist .= $sep .
858
+		$arglist .= $sep.
859 859
 			calculer_liste($arg, $p->descr, $p->boucles, $p->id_boucle);
860 860
 	}
861 861
 
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
 	while ($b != '') {
907 907
 		foreach ($p->boucles[$b]->criteres as $critere) {
908 908
 			if ($critere->op == $motif) {
909
-				$p->code = '$Pile[$SP' . (($n == 0) ? "" : "-$n") .
909
+				$p->code = '$Pile[$SP'.(($n == 0) ? "" : "-$n").
910 910
 					"]['$champ']";
911 911
 				$b = '';
912 912
 				break 2;
Please login to merge, or discard this patch.
ecrire/public/evaluer_page.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -44,44 +44,44 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 	ob_start();
46 46
 	if (strpos($page['texte'], '?xml') !== false) {
47
-		$page['texte'] = str_replace('<' . '?xml', "<\1?xml", $page['texte']);
47
+		$page['texte'] = str_replace('<'.'?xml', "<\1?xml", $page['texte']);
48 48
 	}
49 49
 
50 50
 	try {
51
-		$res = eval('?' . '>' . $page['texte']);
51
+		$res = eval('?'.'>'.$page['texte']);
52 52
 		// error catching 5.2<=PHP<7
53 53
 		if ($res === false
54 54
 		  and function_exists('error_get_last')
55
-		  and ($erreur = error_get_last()) ) {
55
+		  and ($erreur = error_get_last())) {
56 56
 			$code = $page['texte'];
57 57
 			$GLOBALS['numero_ligne_php'] = 1;
58
-			if (!function_exists('numerote_ligne_php')){
59
-				function numerote_ligne_php($match){
58
+			if (!function_exists('numerote_ligne_php')) {
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);
65
-			$code = trim(highlight_string($code,true));
66
-			erreur_squelette("L".$erreur['line'].": ".$erreur['message']."<br />".$code,array($page['source'],'',$erreur['file'],'',$GLOBALS['spip_lang']));
64
+			$code = "/*001*/".preg_replace_callback(",\n,", "numerote_ligne_php", $code);
65
+			$code = trim(highlight_string($code, true));
66
+			erreur_squelette("L".$erreur['line'].": ".$erreur['message']."<br />".$code, array($page['source'], '', $erreur['file'], '', $GLOBALS['spip_lang']));
67 67
 			$page['texte'] = "<!-- Erreur -->";
68 68
 		}
69 69
 		else {
70 70
 			$page['texte'] = ob_get_contents();
71 71
 		}
72 72
 	}
73
-	catch (Exception $e){
73
+	catch (Exception $e) {
74 74
 		$code = $page['texte'];
75 75
 		$GLOBALS['numero_ligne_php'] = 1;
76
-		if (!function_exists('numerote_ligne_php')){
77
-			function numerote_ligne_php($match){
76
+		if (!function_exists('numerote_ligne_php')) {
77
+			function numerote_ligne_php($match) {
78 78
 				$GLOBALS['numero_ligne_php']++;
79
-				return "\n/*".str_pad($GLOBALS['numero_ligne_php'],3,"0",STR_PAD_LEFT)."*/";
79
+				return "\n/*".str_pad($GLOBALS['numero_ligne_php'], 3, "0", STR_PAD_LEFT)."*/";
80 80
 			}
81 81
 		}
82
-		$code = "/*001*/".preg_replace_callback(",\n,","numerote_ligne_php",$code);
83
-		$code = trim(highlight_string($code,true));
84
-		erreur_squelette("L".$e->getLine().": ".$e->getMessage()."<br />".$code,array($page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']));
82
+		$code = "/*001*/".preg_replace_callback(",\n,", "numerote_ligne_php", $code);
83
+		$code = trim(highlight_string($code, true));
84
+		erreur_squelette("L".$e->getLine().": ".$e->getMessage()."<br />".$code, array($page['source'], '', $e->getFile(), '', $GLOBALS['spip_lang']));
85 85
 		$page['texte'] = "<!-- Erreur -->";
86 86
 	}
87 87
 	ob_end_clean();
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	$page['process_ins'] = 'html';
90 90
 
91 91
 	if (strpos($page['texte'], '?xml') !== false) {
92
-		$page['texte'] = str_replace("<\1?xml", '<' . '?xml', $page['texte']);
92
+		$page['texte'] = str_replace("<\1?xml", '<'.'?xml', $page['texte']);
93 93
 	}
94 94
 }
95 95
 
Please login to merge, or discard this patch.
ecrire/public/normaliser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 			$p->etoile = '*';
54 54
 			spip_log("filtre de logo obsolete $nom", 'vieilles_defs');
55 55
 
56
-		} elseif (preg_match("/^" . NOM_DE_CHAMP . '(.*)$/sS', $nom, $m)) {
56
+		} elseif (preg_match("/^".NOM_DE_CHAMP.'(.*)$/sS', $nom, $m)) {
57 57
 			$champ = new Champ();
58 58
 			$champ->nom_boucle = $m[2];
59 59
 			$champ->nom_champ = $m[3];
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		$p->param[0][1] = array($c);
132 132
 		$p->param[0][0] = '';
133 133
 		$p->fonctions = array();
134
-		spip_log('FORMULAIRE_RECHERCHE avec filtre ' . $c->texte, 'vieilles_defs');
134
+		spip_log('FORMULAIRE_RECHERCHE avec filtre '.$c->texte, 'vieilles_defs');
135 135
 	}
136 136
 }
137 137
 
Please login to merge, or discard this patch.
ecrire/public/tracer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 
78 78
 function chrono_requete($temps) {
79 79
 	$total = 0;
80
-	$hors = "<i>" . _T('zbug_hors_compilation') . "</i>";
80
+	$hors = "<i>"._T('zbug_hors_compilation')."</i>";
81 81
 	$t = $q = $n = $d = array();
82 82
 	// Totaliser les temps et completer le Explain
83 83
 	foreach ($temps as $key => $v) {
84 84
 		list($dt, $nb, $boucle, $query, $explain, $res, $contexte) = $v;
85 85
 		if (is_array($contexte)) {
86
-			$k = ($contexte[0] . " $boucle");
86
+			$k = ($contexte[0]." $boucle");
87 87
 			include_spip('public/compiler');
88 88
 			$env = reconstruire_contexte_compil($contexte);
89 89
 		} else {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	// Fabriquer les liens de navigations dans le tableau des temps
130 130
 	foreach ($temps as $k => $v) {
131 131
 		$titre = strip_tags($v[2]);
132
-		$href = quote_amp($GLOBALS['REQUEST_URI']) . "#req$i";
132
+		$href = quote_amp($GLOBALS['REQUEST_URI'])."#req$i";
133 133
 
134 134
 		if (!isset($t[$v[2]])) {
135 135
 			$t[$v[2]] = array();
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	unset($d['']);
150 150
 	// Fabriquer le tableau des liens de navigation dans le grand tableau
151 151
 	foreach ($d as $k => $v) {
152
-		$d[$k] = $n[$k] . "</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>"
152
+		$d[$k] = $n[$k]."</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>"
153 153
 			. join('', $t[$k]);
154 154
 	}
155 155
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		. join("</td></tr>\n<tr><td>", $d)
160 160
 		. "</td></tr>\n"
161 161
 		. (# _request('var_mode_objet') ? '' :
162
-		("<tr><td>" . count($temps) . "</td><td>" . _T('info_total') . '</td><td class="time">' . $total . "</td><td></td></tr>"))
162
+		("<tr><td>".count($temps)."</td><td>"._T('info_total').'</td><td class="time">'.$total."</td><td></td></tr>"))
163 163
 	);
164 164
 
165 165
 	return array($temps, $navigation);
Please login to merge, or discard this patch.
ecrire/public/debusquer.php 1 patch
Spacing   +83 added lines, -86 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		if (!$fonc) {
148 148
 			$fonc = $GLOBALS['debug_objets']['principal'];
149 149
 		}
150
-		$titre = !$mode ? $fonc : ($mode . (isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? " " . $GLOBALS['debug_objets']['sourcefile'][$fonc] : ""));
150
+		$titre = !$mode ? $fonc : ($mode.(isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? " ".$GLOBALS['debug_objets']['sourcefile'][$fonc] : ""));
151 151
 	}
152 152
 	if ($message === false) {
153 153
 		lang_select();
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	$fond = isset($GLOBALS['fond']) ? $GLOBALS['fond'] : "";
177 177
 	// une erreur critique sort $message en array
178 178
 	$debug = is_array($msg) ? $msg[1] : $msg;
179
-	spip_log("Debug: " . $debug . " (" . $fond . ")");
179
+	spip_log("Debug: ".$debug." (".$fond.")");
180 180
 
181 181
 	return $msg;
182 182
 }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 function debusquer_bandeau($erreurs) {
185 185
 
186 186
 	if (!empty($erreurs)) {
187
-		$n = array(count($erreurs) . ' ' . _T('zbug_erreur_squelette'));
187
+		$n = array(count($erreurs).' '._T('zbug_erreur_squelette'));
188 188
 
189 189
 		return debusquer_navigation($erreurs, $n);
190 190
 	} elseif (!empty($GLOBALS['tableau_des_temps'])) {
@@ -217,12 +217,12 @@  discard block
 block discarded – undo
217 217
 		if (is_array($valeur)) {
218 218
 			$valeur_simple = array();
219 219
 			foreach ($valeur as $v) {
220
-				$valeur_simple[] = is_array($v) ? 'array(size=' . count($v) . ')' : $v;
220
+				$valeur_simple[] = is_array($v) ? 'array(size='.count($v).')' : $v;
221 221
 			}
222
-			$valeur = '(' . count($valeur) . ' items) [' . join(',', $valeur_simple) . ']';
222
+			$valeur = '('.count($valeur).' items) ['.join(',', $valeur_simple).']';
223 223
 		}
224
-		$res .= "\n<tr><td><strong>" . nl2br(entites_html($nom))
225
-			. "</strong></td><td>:&nbsp;" . nl2br(entites_html($valeur))
224
+		$res .= "\n<tr><td><strong>".nl2br(entites_html($nom))
225
+			. "</strong></td><td>:&nbsp;".nl2br(entites_html($valeur))
226 226
 			. "</td></tr>\n";
227 227
 	}
228 228
 
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
 				$nom_code = $lieu->descr['nom'];
251 251
 				$skel = $lieu->descr['sourcefile'];
252 252
 				$h2 = parametre_url($href, 'var_mode_objet', $nom_code);
253
-				$h3 = parametre_url($h2, 'var_mode_affiche', 'squelette') . '#L' . $ligne;
253
+				$h3 = parametre_url($h2, 'var_mode_affiche', 'squelette').'#L'.$ligne;
254 254
 				$skel = "<a href='$h3'><b>$skel</b></a>";
255 255
 				if ($boucle) {
256
-					$h3 = parametre_url($h2 . $boucle, 'var_mode_affiche', 'boucle');
256
+					$h3 = parametre_url($h2.$boucle, 'var_mode_affiche', 'boucle');
257 257
 					$boucle = "<a href='$h3'><b>$boucle</b></a>";
258 258
 				}
259 259
 			}
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	}
341 341
 
342 342
 	// Requete erronee
343
-	$err = "<b>" . _T('avis_erreur_mysql') . " $errno</b><br /><tt>\n"
343
+	$err = "<b>"._T('avis_erreur_mysql')." $errno</b><br /><tt>\n"
344 344
 		. spip_htmlspecialchars($msg)
345 345
 		. "\n<br /><span style='color: red'><b>"
346 346
 		. spip_htmlspecialchars($query)
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 // http://code.spip.net/@trouve_boucle_debug
356 356
 function trouve_boucle_debug($n, $nom, $debut = 0, $boucle = "") {
357 357
 
358
-	$id = $nom . $boucle;
358
+	$id = $nom.$boucle;
359 359
 	if (is_array($GLOBALS['debug_objets']['sequence'][$id])) {
360 360
 		foreach ($GLOBALS['debug_objets']['sequence'][$id] as $v) {
361 361
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 			}
407 407
 		}
408 408
 	}
409
-	$incl = ',' . $reg[1] . '[.]\w$,';
409
+	$incl = ','.$reg[1].'[.]\w$,';
410 410
 
411 411
 	foreach ($GLOBALS['debug_objets']['sourcefile'] as $k => $v) {
412 412
 		if (preg_match($incl, $v)) {
@@ -422,16 +422,13 @@  discard block
 block discarded – undo
422 422
 	list($skel, $boucle, $ligne) = trouve_boucle_debug($n, $nom);
423 423
 
424 424
 	if (!$boucle) {
425
-		return !$ligne ? "" :
426
-			(" (" .
427
-				(($nom != $skel) ? _T('squelette_inclus_ligne') :
428
-					_T('squelette_ligne')) .
425
+		return !$ligne ? "" : (" (".
426
+				(($nom != $skel) ? _T('squelette_inclus_ligne') : _T('squelette_ligne')).
429 427
 				" <a href='$self&amp;var_mode_objet=$skel&amp;var_mode_affiche=squelette&amp;var_mode_ligne=$ligne#L$ligne'>$ligne</a>)");
430 428
 	} else {
431 429
 		$self .= "&amp;var_mode_objet=$skel$boucle&amp;var_mode_affiche=boucle";
432 430
 
433
-		return !$ligne ? " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)" :
434
-			" (boucle $boucle ligne\n<a href='$self&amp;var_mode_ligne=$ligne#L$ligne'>$ligne</a>)";
431
+		return !$ligne ? " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)" : " (boucle $boucle ligne\n<a href='$self&amp;var_mode_ligne=$ligne#L$ligne'>$ligne</a>)";
435 432
 	}
436 433
 }
437 434
 
@@ -453,13 +450,13 @@  discard block
 block discarded – undo
453 450
 	}
454 451
 
455 452
 	$s = preg_replace(',<(\w[^<>]*)>([^<]*)<br />([^<]*)</\1>,',
456
-		'<\1>\2</\1><br />' . "\n" . '<\1>\3</\1>',
453
+		'<\1>\2</\1><br />'."\n".'<\1>\3</\1>',
457 454
 		$s);
458 455
 
459 456
 
460 457
 	$tableau = explode("<br />", $s);
461 458
 
462
-	$format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: " . ($nocpt ? 'hidden' : 'visible') . ";%s' href='#T%s' title=\"%s\">%0" . strval(@strlen(count($tableau))) . "d</a></span> %s<br />\n";
459
+	$format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: ".($nocpt ? 'hidden' : 'visible').";%s' href='#T%s' title=\"%s\">%0".strval(@strlen(count($tableau)))."d</a></span> %s<br />\n";
463 460
 
464 461
 	$format10 = str_replace('white', 'lightgrey', $format);
465 462
 	$formaterr = "color: red;";
@@ -503,7 +500,7 @@  discard block
 block discarded – undo
503 500
 	. '" style="cursor: pointer;">'
504 501
 	. ($nocpt ? '' : _T('info_numero_abbreviation'))
505 502
 	. "</div>
506
-	" . $res . "</div>\n";
503
+	" . $res."</div>\n";
507 504
 }
508 505
 
509 506
 // l'environnement graphique du debuggueur 
@@ -524,14 +521,14 @@  discard block
 block discarded – undo
524 521
 			if (!empty($GLOBALS['debug_objets'][$mode][$fonc])) {
525 522
 				list($legend, $texte, $res2) = debusquer_source($fonc, $mode);
526 523
 				$texte .= $res2;
527
-			} elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc . 'tout'])) {
528
-				$legend = _T('zbug_' . $mode);
529
-				$texte = $GLOBALS['debug_objets'][$mode][$fonc . 'tout'];
524
+			} elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc.'tout'])) {
525
+				$legend = _T('zbug_'.$mode);
526
+				$texte = $GLOBALS['debug_objets'][$mode][$fonc.'tout'];
530 527
 				$texte = ancre_texte($texte, array('', ''));
531 528
 			}
532 529
 		} else {
533 530
 			if (strlen(trim($res))) {
534
-				return "<img src='" . chemin_image('compat-16.png') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>";
531
+				return "<img src='".chemin_image('compat-16.png')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>";
535 532
 			} else {
536 533
 				// cas de l'appel sur erreur: montre la page
537 534
 				return isset($GLOBALS['debug_objets']['resultat']['tout'])
@@ -541,7 +538,7 @@  discard block
 block discarded – undo
541 538
 		}
542 539
 	} else {
543 540
 		$valider = charger_fonction('valider', 'xml');
544
-		$val = $valider($GLOBALS['debug_objets']['validation'][$fonc . 'tout']);
541
+		$val = $valider($GLOBALS['debug_objets']['validation'][$fonc.'tout']);
545 542
 		// Si erreur, signaler leur nombre dans le formulaire admin
546 543
 		$GLOBALS['debug_objets']['validation'] = $val->err ? count($val->err) : '';
547 544
 		list($texte, $err) = emboite_texte($val, $fonc, $self);
@@ -552,14 +549,14 @@  discard block
 block discarded – undo
552 549
 		} else {
553 550
 			$err = ": $err";
554 551
 		}
555
-		$legend = _T('validation') . ' ' . $err;
552
+		$legend = _T('validation').' '.$err;
556 553
 		$res = $id = '';
557 554
 	}
558 555
 
559 556
 	return !trim($texte) ? '' : (
560
-		"<img src='" . chemin_image('compat-16.png') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res"
557
+		"<img src='".chemin_image('compat-16.png')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res"
561 558
 		. "<div id='debug_boucle'><fieldset$id><legend>"
562
-		. "<a href='" . $self . "#f_" . substr($fonc, 0, 37) . "'> &#8593; "
559
+		. "<a href='".$self."#f_".substr($fonc, 0, 37)."'> &#8593; "
563 560
 		. ($legend ? $legend : $mode)
564 561
 		. "</a></legend>"
565 562
 		. $texte
@@ -571,7 +568,7 @@  discard block
 block discarded – undo
571 568
 // http://code.spip.net/@emboite_texte
572 569
 function emboite_texte($res, $fonc = '', $self = '') {
573 570
 	$errs = $res->err;
574
-	$texte = $res->entete . ($errs ? '' : $res->page);
571
+	$texte = $res->entete.($errs ? '' : $res->page);
575 572
 
576 573
 	if (!$texte and !$errs) {
577 574
 		return array(ancre_texte('', array('', '')), false);
@@ -628,7 +625,7 @@  discard block
 block discarded – undo
628 625
 		$err = "<h2 style='text-align: center'>"
629 626
 			. $i
630 627
 			. "<a href='#fin_err'>"
631
-			. " " . _T('erreur_texte')
628
+			. " "._T('erreur_texte')
632 629
 			. "</a></h2><table id='debut_err' style='width: 100%'>"
633 630
 			. $err
634 631
 			. " </table><a id='fin_err'></a>";
@@ -638,9 +635,9 @@  discard block
 block discarded – undo
638 635
 		list($msg, $fermant, $ouvrant) = $errs[0];
639 636
 		$rf = reference_boucle_debug($fermant, $fonc, $self);
640 637
 		$ro = reference_boucle_debug($ouvrant, $fonc, $self);
641
-		$err = $msg .
642
-			"<a href='#L" . $fermant . "'>$fermant</a>$rf<br />" .
643
-			"<a href='#L" . $ouvrant . "'>$ouvrant</a>$ro";
638
+		$err = $msg.
639
+			"<a href='#L".$fermant."'>$fermant</a>$rf<br />".
640
+			"<a href='#L".$ouvrant."'>$ouvrant</a>$ro";
644 641
 
645 642
 		return array(ancre_texte($texte, array(array($ouvrant), array($fermant))), $err);
646 643
 	}
@@ -672,7 +669,7 @@  discard block
 block discarded – undo
672 669
 		$temps = !isset($GLOBALS['debug_objets']['profile'][$sourcefile]) ? '' : _T('zbug_profile',
673 670
 			array('time' => $GLOBALS['debug_objets']['profile'][$sourcefile]));
674 671
 
675
-		$res .= "<fieldset id='f_" . $nom . "'><legend>"
672
+		$res .= "<fieldset id='f_".$nom."'><legend>"
676 673
 			. $t_skel
677 674
 			. ' '
678 675
 			. $sourcefile
@@ -687,7 +684,7 @@  discard block
 block discarded – undo
687 684
 			. "'>"
688 685
 			. _T('zbug_calcul')
689 686
 			. "</a></legend>"
690
-			. (!$temps ? '' : ("\n<span style='display:block;float:" . $GLOBALS['spip_lang_right'] . "'>$temps</span><br />"))
687
+			. (!$temps ? '' : ("\n<span style='display:block;float:".$GLOBALS['spip_lang_right']."'>$temps</span><br />"))
691 688
 			. debusquer_contexte($contexte[$sourcefile])
692 689
 		. (!$nav ? '' : ("<table width='100%'>\n$nav</table>\n"))
693 690
 		. "</fieldset>\n";
@@ -708,33 +705,33 @@  discard block
 block discarded – undo
708 705
 			$nom = $boucle->id_boucle;
709 706
 			$req = $boucle->type_requete;
710 707
 			$crit = public_decompiler($boucle, $gram, 0, 'criteres');
711
-			$self2 = $self . "&amp;var_mode_objet=" . $objet;
712
-
713
-			$res .= "\n<tr style='background-color: " .
714
-				($i % 2 ? '#e0e0f0' : '#f8f8ff') .
715
-				"'><td  align='right'>$i</td><td>\n" .
716
-				"<a  class='debug_link_boucle' href='" .
717
-				$self2 .
718
-				"&amp;var_mode_affiche=boucle#f_$nom_skel'>" .
719
-				_T('zbug_boucle') .
720
-				"</a></td><td>\n<a class='debug_link_boucle' href='" .
721
-				$self2 .
722
-				"&amp;var_mode_affiche=resultat#f_$nom_skel'>" .
723
-				_T('zbug_resultat') .
724
-				"</a></td><td>\n<a class='debug_link_resultat' href='" .
725
-				$self2 .
726
-				"&amp;var_mode_affiche=code#f_$nom_skel'>" .
727
-				_T('zbug_code') .
728
-				"</a></td><td>\n<a class='debug_link_resultat' href='" .
729
-				str_replace('var_mode=', 'var_profile=', $self2) .
730
-				"'>" .
731
-				_T('zbug_calcul') .
732
-				"</a></td><td>\n" .
733
-				(($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom) .
734
-				"</td><td>\n" .
735
-				$req .
736
-				"</td><td>\n" .
737
-				spip_htmlspecialchars($crit) .
708
+			$self2 = $self."&amp;var_mode_objet=".$objet;
709
+
710
+			$res .= "\n<tr style='background-color: ".
711
+				($i % 2 ? '#e0e0f0' : '#f8f8ff').
712
+				"'><td  align='right'>$i</td><td>\n".
713
+				"<a  class='debug_link_boucle' href='".
714
+				$self2.
715
+				"&amp;var_mode_affiche=boucle#f_$nom_skel'>".
716
+				_T('zbug_boucle').
717
+				"</a></td><td>\n<a class='debug_link_boucle' href='".
718
+				$self2.
719
+				"&amp;var_mode_affiche=resultat#f_$nom_skel'>".
720
+				_T('zbug_resultat').
721
+				"</a></td><td>\n<a class='debug_link_resultat' href='".
722
+				$self2.
723
+				"&amp;var_mode_affiche=code#f_$nom_skel'>".
724
+				_T('zbug_code').
725
+				"</a></td><td>\n<a class='debug_link_resultat' href='".
726
+				str_replace('var_mode=', 'var_profile=', $self2).
727
+				"'>".
728
+				_T('zbug_calcul').
729
+				"</a></td><td>\n".
730
+				(($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom).
731
+				"</td><td>\n".
732
+				$req.
733
+				"</td><td>\n".
734
+				spip_htmlspecialchars($crit).
738 735
 				"</td></tr>";
739 736
 		}
740 737
 	}
@@ -761,7 +758,7 @@  discard block
 block discarded – undo
761 758
 		}
762 759
 		//  permettre le copier/coller facile
763 760
 		// $res = ancre_texte($req, array(), true);
764
-		$res = "<div id='T" . md5($req) . "'>\n<pre>\n" . $req . "</pre>\n</div>\n";
761
+		$res = "<div id='T".md5($req)."'>\n<pre>\n".$req."</pre>\n</div>\n";
765 762
 		//  formatage et affichage des resultats bruts de la requete
766 763
 		$ress_req = spip_query($req);
767 764
 		$brut_sql = '';
@@ -771,10 +768,10 @@  discard block
 block discarded – undo
771 768
 		$max_aff = defined('_MAX_DEBUG_AFF') ? _MAX_DEBUG_AFF : 50;
772 769
 		while ($retours_sql = sql_fetch($ress_req)) {
773 770
 			if ($num <= $max_aff) {
774
-				$brut_sql .= "<h3>" . ($num == 1 ? $num . " sur " . sql_count($ress_req) : $num) . "</h3>";
771
+				$brut_sql .= "<h3>".($num == 1 ? $num." sur ".sql_count($ress_req) : $num)."</h3>";
775 772
 				$brut_sql .= "<p>";
776 773
 				foreach ($retours_sql as $key => $val) {
777
-					$brut_sql .= "<strong>" . $key . "</strong> => " . spip_htmlspecialchars(couper($val, 150)) . "<br />\n";
774
+					$brut_sql .= "<strong>".$key."</strong> => ".spip_htmlspecialchars(couper($val, 150))."<br />\n";
778 775
 				}
779 776
 				$brut_sql .= "</p>";
780 777
 			}
@@ -785,15 +782,15 @@  discard block
 block discarded – undo
785 782
 			//  ne pas afficher les $contexte_inclus
786 783
 			$view = preg_replace(",<\?php.+\?[>],Uims", "", $view);
787 784
 			if ($view) {
788
-				$res2 .= "\n<br /><fieldset>" . interdire_scripts($view) . "</fieldset>";
785
+				$res2 .= "\n<br /><fieldset>".interdire_scripts($view)."</fieldset>";
789 786
 			}
790 787
 		}
791 788
 
792 789
 	} elseif ($affiche == 'code') {
793 790
 		$legend = $nom;
794
-		$res = ancre_texte("<" . "?php\n" . $quoi . "\n?" . ">");
791
+		$res = ancre_texte("<"."?php\n".$quoi."\n?".">");
795 792
 	} elseif ($affiche == 'boucle') {
796
-		$legend = _T('zbug_boucle') . ' ' . $nom;
793
+		$legend = _T('zbug_boucle').' '.$nom;
797 794
 		// Le compilateur prefixe le nom des boucles par l'extension du fichier source.
798 795
 		$gram = preg_match('/^([^_]+)_/', $objet, $r) ? $r[1] : '';
799 796
 		$res = ancre_texte(public_decompiler($quoi, $gram, 0, 'boucle'));
@@ -812,23 +809,23 @@  discard block
 block discarded – undo
812 809
 	include_spip('public/assembler'); // pour inclure_balise_dynamique
813 810
 	include_spip('inc/texte'); // pour corriger_typo
814 811
 
815
-	return _DOCTYPE_ECRIRE .
816
-	html_lang_attributes() .
817
-	"<head>\n<title>" .
818
-	('SPIP ' . $GLOBALS['spip_version_affichee'] . ' ' .
819
-		_T('admin_debug') . ' ' . $titre . ' (' .
820
-		supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))) .
821
-	")</title>\n" .
822
-	"<meta http-equiv='Content-Type' content='text/html" .
823
-	(($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') .
824
-	"' />\n" .
812
+	return _DOCTYPE_ECRIRE.
813
+	html_lang_attributes().
814
+	"<head>\n<title>".
815
+	('SPIP '.$GLOBALS['spip_version_affichee'].' '.
816
+		_T('admin_debug').' '.$titre.' ('.
817
+		supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))).
818
+	")</title>\n".
819
+	"<meta http-equiv='Content-Type' content='text/html".
820
+	(($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '').
821
+	"' />\n".
825 822
 	http_script('', 'jquery.js')
826
-	. "<link rel='stylesheet' href='" . url_absolue(find_in_path('spip_admin.css'))
827
-	. "' type='text/css' />" .
828
-	"</head>\n" .
829
-	"<body style='margin:0 10px;'>\n" .
830
-	"<div id='spip-debug-header'>" .
831
-	$corps .
832
-	inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false) .
823
+	. "<link rel='stylesheet' href='".url_absolue(find_in_path('spip_admin.css'))
824
+	. "' type='text/css' />".
825
+	"</head>\n".
826
+	"<body style='margin:0 10px;'>\n".
827
+	"<div id='spip-debug-header'>".
828
+	$corps.
829
+	inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false).
833 830
 	'</div></body></html>';
834 831
 }
Please login to merge, or discard this patch.
ecrire/public/jointures.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 				$echap ?
179 179
 					array("'$id_table'", "'$j2'", "'$j1'", "'$obj='.sql_quote('$type')")
180 180
 					:
181
-					array($id_table, $j2, $j1, "$obj=" . sql_quote($type));
181
+					array($id_table, $j2, $j1, "$obj=".sql_quote($type));
182 182
 		} else {
183 183
 			$boucle->join["L$n"] = $echap ? array("'$id_table'", "'$j'") : array($id_table, $j);
184 184
 		}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	$groups = liste_champs_jointures($nom, $desc, true);
212 212
 	if (!$pk) {
213 213
 		foreach ($groups as $id_prim) {
214
-			$id_field = $nom . '.' . $id_prim;
214
+			$id_field = $nom.'.'.$id_prim;
215 215
 			if (!in_array($id_field, $boucle->group)) {
216 216
 				$boucle->group[] = $id_field;
217 217
 			}
Please login to merge, or discard this patch.
ecrire/public/admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@
 block discarded – undo
37 37
 	include_spip('inc/filtres');
38 38
 
39 39
 	// Inserer le css d'admin
40
-	$css = "<link rel='stylesheet' href='" . url_absolue(direction_css(find_in_path('spip_admin.css')))
40
+	$css = "<link rel='stylesheet' href='".url_absolue(direction_css(find_in_path('spip_admin.css')))
41 41
 		. "' type='text/css' />\n";
42 42
 	if ($f = find_in_path('spip_admin_perso.css')) {
43 43
 		$css .= "<link rel='stylesheet' href='"
44
-			. url_absolue(direction_css($f)) . "' type='text/css' />\n";
44
+			. url_absolue(direction_css($f))."' type='text/css' />\n";
45 45
 	}
46 46
 
47 47
 	($pos = stripos($contenu, '</head>'))
Please login to merge, or discard this patch.
ecrire/public/phraser_html.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
  * Nom d'une balise #TOTO
45 45
  *
46 46
  * Écriture alambiquée pour rester compatible avec les hexadecimaux des vieux squelettes */
47
-define('NOM_DE_CHAMP', "#((" . NOM_DE_BOUCLE . "):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})");
47
+define('NOM_DE_CHAMP', "#((".NOM_DE_BOUCLE."):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})");
48 48
 /** Balise complète [...(#TOTO) ... ] */
49
-define('CHAMP_ETENDU', '/\[([^]\[]*)\(' . NOM_DE_CHAMP . '([^[)]*\)[^]\[]*)\]/S');
49
+define('CHAMP_ETENDU', '/\[([^]\[]*)\('.NOM_DE_CHAMP.'([^[)]*\)[^]\[]*)\]/S');
50 50
 
51 51
 define('BALISE_INCLURE', '/<INCLU[DR]E[[:space:]]*(\(([^)]*)\))?/S');
52 52
 define('BALISE_POLYGLOTTE', ',<multi>(.*)</multi>,Uims');
53 53
 define('BALISE_IDIOMES', ',<:(([a-z0-9_]+):)?([a-z0-9_]*)({([^\|=>]*=[^\|>]*)})?((\|[^>]*)?:/?>),iS');
54
-define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*((' . NOM_DE_CHAMP . '[{][^}]*})?[^,]*)\s*,?\s*@s');
54
+define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*(('.NOM_DE_CHAMP.'[{][^}]*})?[^,]*)\s*,?\s*@s');
55 55
 
56 56
 /** Champ sql dans parenthèse ex: (id_article) */
57 57
 define('SQL_ARGS', '(\([^)]*\))');
58 58
 /** Fonction SQL sur un champ ex: SUM(visites) */
59
-define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)' . SQL_ARGS . '?`?');
59
+define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)'.SQL_ARGS.'?`?');
60 60
 
61 61
 // http://code.spip.net/@phraser_inclure
62 62
 function phraser_inclure($texte, $ligne, $result) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
  * @return array
212 212
  **/
213 213
 function phraser_champs($texte, $ligne, $result) {
214
-	while (preg_match("/" . NOM_DE_CHAMP . "/S", $texte, $match)) {
214
+	while (preg_match("/".NOM_DE_CHAMP."/S", $texte, $match)) {
215 215
 		$p = strpos($texte, $match[0]);
216 216
 		// texte après la balise
217 217
 		$suite = substr($texte, $p + strlen($match[0]));
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 			$collecte[] = $champ;
349 349
 			$args = ltrim($regs[count($regs) - 1]);
350 350
 		} else {
351
-			if (!preg_match("/" . NOM_DE_CHAMP . "([{|])/", $arg, $r)) {
351
+			if (!preg_match("/".NOM_DE_CHAMP."([{|])/", $arg, $r)) {
352 352
 				// 0 est un aveu d'impuissance. A completer
353 353
 				$arg = phraser_champs_exterieurs($arg, 0, $sep, $result);
354 354
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 function phraser_champs_exterieurs($texte, $ligne, $sep, $nested) {
434 434
 	$res = array();
435 435
 	while (($p = strpos($texte, "%$sep")) !== false) {
436
-		if (!preg_match(',^%' . preg_quote($sep) . '([0-9]+)@,', substr($texte, $p), $m)) {
436
+		if (!preg_match(',^%'.preg_quote($sep).'([0-9]+)@,', substr($texte, $p), $m)) {
437 437
 			break;
438 438
 		}
439 439
 		$debut = substr($texte, 0, $p);
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 					// une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"}
602 602
 					if (preg_match(',^(["\'])(.*)\1$,', $m[4])) {
603 603
 						$c = null;
604
-						eval('$c = ' . $m[4] . ';');
604
+						eval('$c = '.$m[4].';');
605 605
 						if (isset($c)) {
606 606
 							$m[4] = $c;
607 607
 						}
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 
680 680
 					if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', $param, $m)) {
681 681
 						$crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', '');
682
-					} elseif (preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC .
682
+					} elseif (preg_match(',^([!]?)('.CHAMP_SQL_PLUS_FONC.
683 683
 						')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', $param, $m)) {
684 684
 						$a2 = trim($m[8]);
685 685
 						if ($a2 and ($a2[0] == "'" or $a2[0] == '"') and ($a2[0] == substr($a2, -1))) {
@@ -689,8 +689,8 @@  discard block
 block discarded – undo
689 689
 							(($m[2] == 'lang_select') ? $m[2] : $m[7]),
690 690
 							$m[6], $m[5]);
691 691
 						$crit->exclus = $m[1];
692
-					} elseif (preg_match("/^([!]?)\s*(" .
693
-						CHAMP_SQL_PLUS_FONC .
692
+					} elseif (preg_match("/^([!]?)\s*(".
693
+						CHAMP_SQL_PLUS_FONC.
694 694
 						")\s*(\??)(.*)$/is", $param, $m)) {
695 695
 						// contient aussi les comparaisons implicites !
696 696
 						// Comme ci-dessus: 
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
 		$result->descr = $descr;
770 770
 # attention: reperer la premiere des 2 balises: pre_boucle ou boucle
771 771
 
772
-		if (!preg_match("," . BALISE_PRE_BOUCLE . '[0-9_],', $texte, $r)
772
+		if (!preg_match(",".BALISE_PRE_BOUCLE.'[0-9_],', $texte, $r)
773 773
 			or ($n = strpos($texte, $r[0])) === false
774 774
 			or ($n > $pos_boucle)
775 775
 		) {
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
 				strlen(BALISE_PRE_BOUCLE),
790 790
 				$k - strlen(BALISE_PRE_BOUCLE));
791 791
 
792
-			if (!preg_match("," . BALISE_BOUCLE . $id_boucle . "[[:space:]]*\(,", $milieu, $r)) {
792
+			if (!preg_match(",".BALISE_BOUCLE.$id_boucle."[[:space:]]*\(,", $milieu, $r)) {
793 793
 				$err_b = array('zbug_erreur_boucle_syntaxe', array('id' => $id_boucle));
794 794
 				erreur_squelette($err_b, $result);
795 795
 				$texte = substr($texte, $n + 1);
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
 			$milieu = '';
839 839
 		} else {
840 840
 			$milieu = substr($milieu, 1);
841
-			$s = BALISE_FIN_BOUCLE . $id_boucle . ">";
841
+			$s = BALISE_FIN_BOUCLE.$id_boucle.">";
842 842
 			$p = strpos($milieu, $s);
843 843
 			if ($p === false) {
844 844
 				$err_b = array(
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 		//
858 858
 		// 1. Recuperer la partie conditionnelle apres
859 859
 		//
860
-		$s = BALISE_POST_BOUCLE . $id_boucle . ">";
860
+		$s = BALISE_POST_BOUCLE.$id_boucle.">";
861 861
 		$p = strpos($suite, $s);
862 862
 		if ($p !== false) {
863 863
 			$result->apres = substr($suite, 0, $p);
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
 		//
868 868
 		// 2. Recuperer la partie alternative
869 869
 		//
870
-		$s = BALISE_ALT_BOUCLE . $id_boucle . ">";
870
+		$s = BALISE_ALT_BOUCLE.$id_boucle.">";
871 871
 		$p = strpos($suite, $s);
872 872
 		if ($p !== false) {
873 873
 			$result->altern = substr($suite, 0, $p);
Please login to merge, or discard this patch.