Completed
Push — master ( 6d374a...1dde8c )
by cam
01:19
created
ecrire/inc/cvt_multietapes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		$erreurs_etapes = array();
230 230
 		$derniere_etape_ok = 0;
231 231
 		$e = 0;
232
-		while ($e < max($etape, $etape_demandee -1) and $e < $etapes) {
232
+		while ($e < max($etape, $etape_demandee - 1) and $e < $etapes) {
233 233
 			$e++;
234 234
 			$erreurs_etapes[$e] = array();
235 235
 			if ($verifier = charger_fonction("verifier_$e", "formulaires/$form/", true)) {
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 		// si la derniere etape OK etait la derniere
268 268
 		// on renvoie le flux inchange et ca declenche traiter
269 269
 		if ($derniere_etape_ok == $etapes
270
-			and (!$etape_demandee or $etape_demandee>=$etapes)) {
270
+			and (!$etape_demandee or $etape_demandee >= $etapes)) {
271 271
 			return $erreurs;
272 272
 		} else {
273 273
 			$etape = $derniere_etape_ok + 1;
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
 		and ($e = $flux['args']['contexte']['_etape']) > 1
310 310
 		and $ext = $flux['args']['ext']
311 311
 		and $f = $flux['data']
312
-		and file_exists($f . "_$e.$ext")
312
+		and file_exists($f."_$e.$ext")
313 313
 	) {
314
-		$flux['data'] = $f . "_$e";
314
+		$flux['data'] = $f."_$e";
315 315
 	}
316 316
 
317 317
 	return $flux;
Please login to merge, or discard this patch.
ecrire/public/jointures.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -176,14 +176,14 @@  discard block
 block discarded – undo
176 176
 			// sache qu'il peut enlever ce where si il enleve la jointure
177 177
 			$boucle->where["JOIN-L$n"] =
178 178
 				$echap ?
179
-					array("'='","'$obj'","sql_quote('$type')")
179
+					array("'='", "'$obj'", "sql_quote('$type')")
180 180
 					:
181
-					array("=","$obj",sql_quote($type));
181
+					array("=", "$obj", sql_quote($type));
182 182
 			$boucle->join["L$n"] =
183 183
 				$echap ?
184 184
 					array("'$id_table'", "'$j2'", "'$j1'", "'$obj='.sql_quote('$type')")
185 185
 					:
186
-					array($id_table, $j2, $j1, "$obj=" . sql_quote($type));
186
+					array($id_table, $j2, $j1, "$obj=".sql_quote($type));
187 187
 		} else {
188 188
 			$boucle->join["L$n"] = $echap ? array("'$id_table'", "'$j'") : array($id_table, $j);
189 189
 		}
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	$groups = liste_champs_jointures($nom, $desc, true);
217 217
 	if (!$pk) {
218 218
 		foreach ($groups as $id_prim) {
219
-			$id_field = $nom . '.' . $id_prim;
219
+			$id_field = $nom.'.'.$id_prim;
220 220
 			if (!in_array($id_field, $boucle->group)) {
221 221
 				$boucle->group[] = $id_field;
222 222
 			}
Please login to merge, or discard this patch.
ecrire/public/parametrer.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	} else {
82 82
 		// Preparer l'appel de la fonction principale du squelette 
83 83
 
84
-		spip_timer($a = 'calcul page ' . rand(0, 1000));
84
+		spip_timer($a = 'calcul page '.rand(0, 1000));
85 85
 
86 86
 		// On cree un marqueur de notes unique lie a cette composition
87 87
 		// et on enregistre l'etat courant des globales de notes...
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 		try {
114 114
 			$page = $fonc(array('cache' => $cache), array($contexte));
115 115
 		} catch (Throwable $e) {
116
-			$msg = _T('zbug_erreur_execution_page') . " $sourcefile";
117
-			$full_msg = $msg . ' | File ' . $e->getFile() . ' Line ' . $e->getLine() . ' : ' . $e->getMessage();
116
+			$msg = _T('zbug_erreur_execution_page')." $sourcefile";
117
+			$full_msg = $msg.' | File '.$e->getFile().' Line '.$e->getLine().' : '.$e->getMessage();
118 118
 			$full_msg = str_replace(_ROOT_RACINE, '[…]/', $full_msg);
119 119
 			$corps = "<pre>$msg</pre>";
120 120
 			$page = analyse_resultat_skel($fond, array('cache' => $cache), $corps, $sourcefile);
@@ -145,17 +145,17 @@  discard block
 block discarded – undo
145 145
 
146 146
 		$profile = spip_timer($a);
147 147
 		spip_log("calcul ($profile) [$skel] $infos"
148
-			. ' (' . strlen($page['texte']) . ' octets)');
148
+			. ' ('.strlen($page['texte']).' octets)');
149 149
 
150
-		if (defined('_CALCUL_PROFILER') AND intval($profile)>_CALCUL_PROFILER){
150
+		if (defined('_CALCUL_PROFILER') AND intval($profile) > _CALCUL_PROFILER) {
151 151
 			spip_log("calcul ($profile) [$skel] $infos"
152
-				.' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'],"profiler"._LOG_AVERTISSEMENT);
152
+				.' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], "profiler"._LOG_AVERTISSEMENT);
153 153
 		}
154 154
 
155 155
 		if ($debug) {
156 156
 			// si c'est ce que demande le debusqueur, lui passer la main
157 157
 			$t = strlen($page['texte']) ? $page['texte'] : " ";
158
-			$GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t;
158
+			$GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t;
159 159
 			$GLOBALS['debug_objets']['courant'] = $courant;
160 160
 			$GLOBALS['debug_objets']['profile'][$sourcefile] = $profile;
161 161
 			if ($GLOBALS['debug_objets']['sourcefile']
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		if (defined('_VAR_INCLURE') and _VAR_INCLURE) {
186 186
 			$page['sourcefile'] = $sourcefile;
187 187
 			$page['texte'] =
188
-				"<div class='inclure_blocs'><h6>" . $page['sourcefile'] . "</h6>" . $page['texte'] . "</div>"
188
+				"<div class='inclure_blocs'><h6>".$page['sourcefile']."</h6>".$page['texte']."</div>"
189 189
 				. ($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>");
190 190
 			$js_inclus = true;
191 191
 		}
@@ -220,21 +220,21 @@  discard block
 block discarded – undo
220 220
 		}
221 221
 		if (is_array($val)) {
222 222
 			if ($profondeur_max > 0) {
223
-				$val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')';
223
+				$val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')';
224 224
 			} else {
225
-				$val = 'array:' . count($val);
225
+				$val = 'array:'.count($val);
226 226
 			}
227 227
 		} elseif (is_object($val)) {
228 228
 			$val = get_class($val);
229 229
 		} elseif (strlen("$val") > 30) {
230
-			$val = substr("$val", 0, 29) . '…';
230
+			$val = substr("$val", 0, 29).'…';
231 231
 			if (strstr($val, ' ')) {
232 232
 				$val = "'$val'";
233 233
 			}
234 234
 		} elseif (strstr($val, ' ')) {
235 235
 			$val = "'$val'";
236 236
 		}
237
-		$infos[] = $var . '=' . $val;
237
+		$infos[] = $var.'='.$val;
238 238
 	}
239 239
 	return join(', ', $infos);
240 240
 }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 						. "?php include_spip('inc/headers');redirige_par_entete('"
302 302
 						. texte_script($url)
303 303
 						. "','',$status);"
304
-						. "?" . ">",
304
+						. "?".">",
305 305
 					'process_ins' => 'php',
306 306
 					'status' => $status
307 307
 				);
Please login to merge, or discard this patch.
ecrire/public/composer.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$GLOBALS['debug_objets']['courant'] = $nom;
55 55
 	}
56 56
 
57
-	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php';
57
+	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php';
58 58
 
59 59
 	// si squelette est deja compile et perenne, le charger
60 60
 	if (!squelette_obsolete($phpfile, $source)) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		#}
68 68
 	}
69 69
 
70
-	if (file_exists($lib = $squelette . '_fonctions' . '.php')) {
70
+	if (file_exists($lib = $squelette.'_fonctions'.'.php')) {
71 71
 		include_once $lib;
72 72
 	}
73 73
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			eval("return true; $f ;");
96 96
 		} catch (\ParseError $e) {
97 97
 			// Code syntaxiquement faux (critere etc mal programme')
98
-			$msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage();
98
+			$msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage();
99 99
 			erreur_squelette($msg, $boucle);
100 100
 			// continuer pour trouver d'autres fautes eventuelles
101 101
 			// mais prevenir que c'est mort
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	if (defined('_VAR_MODE') and _VAR_MODE == 'debug') {
125 125
 
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 ($GLOBALS['debug_objets']['sourcefile']
@@ -146,13 +146,13 @@  discard block
 block discarded – undo
146 146
 		$code = "
147 147
 /*
148 148
  * Squelette : $sourcefile
149
- * Date :      " . gmdate("D, d M Y H:i:s", @filemtime($sourcefile)) . " GMT
150
- * Compile :   " . gmdate("D, d M Y H:i:s", time()) . " GMT
151
- * " . (!$boucles ? "Pas de boucle" : ("Boucles :   " . $noms)) . "
149
+ * Date :      ".gmdate("D, d M Y H:i:s", @filemtime($sourcefile))." GMT
150
+ * Compile :   " . gmdate("D, d M Y H:i:s", time())." GMT
151
+ * " . (!$boucles ? "Pas de boucle" : ("Boucles :   ".$noms))."
152 152
  */ ";
153 153
 	}
154 154
 
155
-	$code = '<' . "?php\n" . $code . join('', $boucles) . "\n?" . '>';
155
+	$code = '<'."?php\n".$code.join('', $boucles)."\n?".'>';
156 156
 	if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) {
157 157
 		ecrire_fichier($phpfile, $code);
158 158
 	}
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 			$j = join('-', array_map('ucwords', explode('-', strtolower($r[2]))));
213 213
 
214 214
 			if ($j == 'X-Spip-Filtre' and isset($headers[$j])) {
215
-				$headers[$j] .= "|" . $r[3];
215
+				$headers[$j] .= "|".$r[3];
216 216
 			} else {
217 217
 				$headers[$j] = $r[3];
218 218
 			}
@@ -220,10 +220,10 @@  discard block
 block discarded – undo
220 220
 	}
221 221
 	// S'agit-il d'un resultat constant ou contenant du code php
222 222
 	$process_ins = (
223
-		strpos($corps, '<' . '?') === false
223
+		strpos($corps, '<'.'?') === false
224 224
 		or
225
-		(strpos($corps, '<' . '?xml') !== false and
226
-			strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
225
+		(strpos($corps, '<'.'?xml') !== false and
226
+			strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
227 227
 	)
228 228
 		? 'html'
229 229
 		: 'php';
@@ -252,10 +252,10 @@  discard block
 block discarded – undo
252 252
 
253 253
 		if ($process_ins == 'html') {
254 254
 			$skel['process_ins'] = (
255
-				strpos($corps, '<' . '?') === false
255
+				strpos($corps, '<'.'?') === false
256 256
 				or
257
-				(strpos($corps, '<' . '?xml') !== false and
258
-					strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
257
+				(strpos($corps, '<'.'?xml') !== false and
258
+					strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
259 259
 			)
260 260
 				? 'html'
261 261
 				: 'php';
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 //
274 274
 
275 275
 /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */
276
-define('CODE_INCLURE_BALISE', '<' . '?php 
276
+define('CODE_INCLURE_BALISE', '<'.'?php 
277 277
 include_once("%s");
278 278
 if ($lang_select = "%s") $lang_select = lang_select($lang_select);
279 279
 inserer_balise_dynamique(balise_%s_dyn(%s), array(%s));
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 		// pas de lien symbolique sous Windows
305 305
 		and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false)
306 306
 	) {
307
-		$file = './" . _DIR_RACINE . "' . $file;
307
+		$file = './" . _DIR_RACINE . "'.$file;
308 308
 	}
309 309
 
310 310
 	$lang = $context_compil[4];
@@ -346,14 +346,14 @@  discard block
 block discarded – undo
346 346
 	if (is_object($v)) {
347 347
 		return var_export($v, true);
348 348
 	} elseif (!is_array($v)) {
349
-		return "'" . texte_script($v) . "'";
349
+		return "'".texte_script($v)."'";
350 350
 	} else {
351 351
 		$out = array();
352 352
 		foreach ($v as $k => $val) {
353
-			$out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val);
353
+			$out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val);
354 354
 		}
355 355
 
356
-		return 'array(' . join(", ", $out) . ')';
356
+		return 'array('.join(", ", $out).')';
357 357
 	}
358 358
 }
359 359
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 	}
430 430
 
431 431
 	// Y a-t-il une fonction de traitement des arguments ?
432
-	$f = 'balise_' . $nom_balise . '_stat';
432
+	$f = 'balise_'.$nom_balise.'_stat';
433 433
 
434 434
 	$r = !function_exists($f) ? $args : $f($args, $context_compil);
435 435
 
@@ -439,18 +439,18 @@  discard block
 block discarded – undo
439 439
 
440 440
 	// verifier que la fonction dyn est la, 
441 441
 	// sinon se replier sur la generique si elle existe
442
-	if (!function_exists('balise_' . $nom_balise . '_dyn')) {
442
+	if (!function_exists('balise_'.$nom_balise.'_dyn')) {
443 443
 		if (
444 444
 			$balise_generique = chercher_balise_generique($nom)
445 445
 			and $nom_balise_generique = $balise_generique['nom_generique']
446
-			and $file = include_spip("balise/" . strtolower($nom_balise_generique))
447
-			and function_exists('balise_' . $nom_balise_generique . '_dyn')
446
+			and $file = include_spip("balise/".strtolower($nom_balise_generique))
447
+			and function_exists('balise_'.$nom_balise_generique.'_dyn')
448 448
 		) {
449 449
 			// et lui injecter en premier arg le nom de la balise 
450 450
 			array_unshift($r, $nom);
451 451
 			$nom_balise = $nom_balise_generique;
452 452
 			if (!_DIR_RESTREINT) {
453
-				$file = _DIR_RESTREINT_ABS . $file;
453
+				$file = _DIR_RESTREINT_ABS.$file;
454 454
 			}
455 455
 		} else {
456 456
 			$msg = array('zbug_balise_inexistante', array('from' => 'CVT', 'balise' => $nom));
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 		$n = '';
552 552
 		foreach (explode(',', $liste) as $val) {
553 553
 			if ($a = intval($val) and $val === strval($a)) {
554
-				$n .= ',' . $val;
554
+				$n .= ','.$val;
555 555
 			}
556 556
 		}
557 557
 		if (strlen($n)) {
@@ -730,14 +730,14 @@  discard block
 block discarded – undo
730 730
 			// on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction
731 731
 			$i = 0;
732 732
 			do {
733
-				$where[$k] = remplace_sous_requete($w, "(" . calculer_select(
734
-						array($sous[1] . " AS id"),
733
+				$where[$k] = remplace_sous_requete($w, "(".calculer_select(
734
+						array($sous[1]." AS id"),
735 735
 						$from,
736 736
 						$from_type,
737 737
 						$wheresub,
738 738
 						$jsub,
739 739
 						array(), array(), '',
740
-						$having, $table, $id, $serveur, false) . ")");
740
+						$having, $table, $id, $serveur, false).")");
741 741
 				if (!$i) {
742 742
 					$i = 1;
743 743
 					$wherestring = calculer_where_to_string($where[$k]);
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
 		if ($sous[0] == 'SUBSELECT') {
757 757
 			// c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having)
758 758
 			array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ?
759
-			$where[$k] = remplace_sous_requete($w, "(" . calculer_select(
759
+			$where[$k] = remplace_sous_requete($w, "(".calculer_select(
760 760
 					$sous[1], # select
761 761
 					$sous[2], #from
762 762
 					array(), #from_type
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
 					$sous[6], #limit
769 769
 					$sous[7] ? $sous[7] : array(), #having
770 770
 					$table, $id, $serveur, false
771
-				) . ")");
771
+				).")");
772 772
 		}
773 773
 		array_pop($where_simples);
774 774
 	}
@@ -830,15 +830,15 @@  discard block
 block discarded – undo
830 830
 			// sans recours a preg_match
831 831
 			// un implode(' ',..) est fait dans reinjecte_joint un peu plus bas
832 832
 			$afrom[$t][$cle] = array(
833
-				"\n" .
834
-				(isset($from_type[$cle]) ? $from_type[$cle] : "INNER") . " JOIN",
833
+				"\n".
834
+				(isset($from_type[$cle]) ? $from_type[$cle] : "INNER")." JOIN",
835 835
 				$from[$cle],
836 836
 				"AS $cle",
837 837
 				"ON (",
838 838
 				"$cle.$c",
839 839
 				"=",
840 840
 				"$t.$carr",
841
-				($and ? "AND " . $and : "") .
841
+				($and ? "AND ".$and : "").
842 842
 				")"
843 843
 			);
844 844
 			if (isset($afrom[$cle])) {
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
 		$t = key($from);
877 877
 		$c = current($from);
878 878
 		reset($from);
879
-		$e = '/\b(' . "$t\\." . join("|" . $t . '\.', $equiv) . ')\b/';
879
+		$e = '/\b('."$t\\.".join("|".$t.'\.', $equiv).')\b/';
880 880
 		if (!(strpos($t, ' ') or // jointure des le depart cf boucle_doc
881 881
 				calculer_jointnul($t, $select, $e) or
882 882
 				calculer_jointnul($t, $join, $e) or
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
 			unset($afrom[$t][$nt]);
894 894
 			$afrom[$nt] = $afrom[$t];
895 895
 			unset($afrom[$t]);
896
-			$e = '/\b' . preg_quote($nfrom[6]) . '\b/';
896
+			$e = '/\b'.preg_quote($nfrom[6]).'\b/';
897 897
 			$t = $nfrom[4];
898 898
 			$alias = "";
899 899
 			// verifier que les deux cles sont homonymes, sinon installer un alias dans le select
@@ -904,14 +904,14 @@  discard block
 block discarded – undo
904 904
 			if ($newcle != $oldcle) {
905 905
 				// si l'ancienne cle etait deja dans le select avec un AS
906 906
 				// reprendre simplement ce AS
907
-				$as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/';
907
+				$as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/';
908 908
 				if (preg_match($as, implode(',', $select), $m)) {
909 909
 					$alias = "";
910 910
 				} else {
911
-					$alias = ", " . $nfrom[4] . " AS $oldcle";
911
+					$alias = ", ".$nfrom[4]." AS $oldcle";
912 912
 				}
913 913
 			}
914
-			$select = remplacer_jointnul($t . $alias, $select, $e);
914
+			$select = remplacer_jointnul($t.$alias, $select, $e);
915 915
 			$join = remplacer_jointnul($t, $join, $e);
916 916
 			$where = remplacer_jointnul($t, $where, $e);
917 917
 			$having = remplacer_jointnul($t, $having, $e);
@@ -952,9 +952,9 @@  discard block
 block discarded – undo
952 952
 	} else {
953 953
 		$exp = "";
954 954
 		if (strtoupper($join) === 'AND') {
955
-			return $exp . join(" $join ", array_map('calculer_where_to_string', $v));
955
+			return $exp.join(" $join ", array_map('calculer_where_to_string', $v));
956 956
 		} else {
957
-			return $exp . join($join, $v);
957
+			return $exp.join($join, $v);
958 958
 		}
959 959
 	}
960 960
 }
@@ -1020,6 +1020,6 @@  discard block
 block discarded – undo
1020 1020
 	}
1021 1021
 
1022 1022
 	return $mime_type
1023
-	. (!$connect ? '' : preg_replace('/\W/', "_", $connect)) . '_'
1024
-	. md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : ''));
1023
+	. (!$connect ? '' : preg_replace('/\W/', "_", $connect)).'_'
1024
+	. md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : ''));
1025 1025
 }
Please login to merge, or discard this patch.
ecrire/plugins/infos_paquet.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 			unset($tree['']);
48 48
 		}
49 49
 
50
-		$tree['slogan'] = $tree['prefix'] . "_slogan";
51
-		$tree['description'] = $tree['prefix'] . "_description";
50
+		$tree['slogan'] = $tree['prefix']."_slogan";
51
+		$tree['description'] = $tree['prefix']."_description";
52 52
 		paquet_readable_files($tree, "$dir_plugins$plug/");
53 53
 		if (!$tree['chemin']) {
54 54
 			$tree['chemin'] = array();
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	// Prendre les messages d'erreur sans les numeros de lignes
80 80
 	$msg = array_column($vxml->err, 0);
81 81
 	$t = _T('plugins_erreur', array('plugins' => $plug));
82
-	array_unshift($msg, $t . " <ul class='erreur_xml'><li>" . reset($msg) . "</li></ul>");
82
+	array_unshift($msg, $t." <ul class='erreur_xml'><li>".reset($msg)."</li></ul>");
83 83
 
84 84
 	return array('erreur' => $msg);
85 85
 }
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 function paquet_readable_files(&$tree, $dir) {
96 96
 	$prefix = strtolower($tree['prefix']);
97 97
 
98
-	$tree['options'] = (is_readable($dir . $f = ($prefix . '_options.php'))) ? array($f) : array();
99
-	$tree['fonctions'] = (is_readable($dir . $f = ($prefix . '_fonctions.php'))) ? array($f) : array();
100
-	$tree['install'] = (is_readable($dir . $f = ($prefix . '_administrations.php'))) ? array($f) : array();
98
+	$tree['options'] = (is_readable($dir.$f = ($prefix.'_options.php'))) ? array($f) : array();
99
+	$tree['fonctions'] = (is_readable($dir.$f = ($prefix.'_fonctions.php'))) ? array($f) : array();
100
+	$tree['install'] = (is_readable($dir.$f = ($prefix.'_administrations.php'))) ? array($f) : array();
101 101
 }
102 102
 
103 103
 /**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	$texte = trim($phraseur->versions[$n]['']);
186 186
 	$phraseur->versions[$n][''] = '';
187 187
 
188
-	$f = 'info_paquet_' . $name;
188
+	$f = 'info_paquet_'.$name;
189 189
 	if (function_exists($f)) {
190 190
 		$f($phraseur, $attrs, $texte);
191 191
 	} elseif (!$attrs) {
Please login to merge, or discard this patch.
ecrire/inc/informer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	include_spip('inc/texte');
22 22
 	$titre = $descriptif = '';
23 23
 	if ($type == "rubrique") {
24
-		$row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = " . intval($id));
24
+		$row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = ".intval($id));
25 25
 		if ($row) {
26 26
 			$titre = typo($row["titre"]);
27 27
 			$descriptif = propre($row["descriptif"]);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 				include_spip('inc/filtres_images_mini');
40 40
 				$res = image_reduire("<img src='$fid' alt='' />", 100, 48);
41 41
 				if ($res) {
42
-					$res = "<div class='informer__media' style='float: " . $GLOBALS['spip_lang_right'] . "; margin-" . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>";
42
+					$res = "<div class='informer__media' style='float: ".$GLOBALS['spip_lang_right']."; margin-".$GLOBALS['spip_lang_right'].": -5px; margin-top: -5px;'>$res</div>";
43 43
 				}
44 44
 			}
45 45
 		}
@@ -55,21 +55,21 @@  discard block
 block discarded – undo
55 55
 		str_replace('"', "&#34;", textebrut($titre))),
56 56
 		"\n\r", "  ");
57 57
 
58
-	$js_func = $do . '_selection_titre';
58
+	$js_func = $do.'_selection_titre';
59 59
 
60 60
 	return "<div style='display: none;'>"
61
-	. "<input type='text' id='" . $rac . "_sel' value='$id' />"
62
-	. "<input type='text' id='" . $rac . "_sel2' value=\""
61
+	. "<input type='text' id='".$rac."_sel' value='$id' />"
62
+	. "<input type='text' id='".$rac."_sel2' value=\""
63 63
 	. entites_html($titre)
64 64
 	. "\" />"
65 65
 	. "</div>"
66 66
 	. "<div class='informer' style='padding: 5px; border-top: 0px;'>"
67 67
 	. '<div class="informer__item">'
68 68
 	. (!$res ? '' : $res)
69
-	. "<p class='informer__titre'><b>" . safehtml($titre) . "</b></p>"
70
-	. (!$descriptif ? '' : "<div class='informer__descriptif'>" . safehtml($descriptif) . "</div>")
69
+	. "<p class='informer__titre'><b>".safehtml($titre)."</b></p>"
70
+	. (!$descriptif ? '' : "<div class='informer__descriptif'>".safehtml($descriptif)."</div>")
71 71
 	. '</div>'
72
-	. "<div class='informer__action' style='clear:both; text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
72
+	. "<div class='informer__action' style='clear:both; text-align: ".$GLOBALS['spip_lang_right'].";'>"
73 73
 	. "<input type='submit' class='fondo btn submit' value='"
74 74
 	. _T('bouton_choisir')
75 75
 	. "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />"
Please login to merge, or discard this patch.
ecrire/inc/filtres_ecrire.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	if ($objet == 'rubrique') {
116 116
 		// si c'est une rubrique-secteur contenant des breves, demander la
117 117
 		// confirmation du deplacement
118
-		$contient_breves = sql_countsel('spip_breves', "id_rubrique=" . intval($id_objet));
118
+		$contient_breves = sql_countsel('spip_breves', "id_rubrique=".intval($id_objet));
119 119
 
120 120
 		if ($contient_breves > 0) {
121 121
 			$scb = ($contient_breves > 1 ? 's' : '');
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 				));
127 127
 			$confirm .= "\n<div class='confirmer_deplacement verdana2'>"
128 128
 				. "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>"
129
-				. $scb .
129
+				. $scb.
130 130
 				"</label></div></div>\n";
131 131
 		} else {
132 132
 			$confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n";
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
 	$form .= $confirm;
136 136
 	if ($actionable) {
137 137
 		if (strpos($form, '<select') !== false) {
138
-			$form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
139
-				. '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>'
138
+			$form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>"
139
+				. '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>'
140 140
 				. "</div>";
141 141
 		}
142
-		$form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form;
142
+		$form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form;
143 143
 		if ($action = charger_fonction("editer_$objet", "action", true)) {
144 144
 			$form = generer_action_auteur("editer_$objet", $id_objet, self(), $form,
145 145
 				" method='post' class='submit_plongeur'");
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
 	include_spip('inc/presentation');
157 157
 
158
-	return debut_cadre_couleur($logo, true, "", $titre) . $form . fin_cadre_couleur(true);
158
+	return debut_cadre_couleur($logo, true, "", $titre).$form.fin_cadre_couleur(true);
159 159
 
160 160
 }
161 161
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	if ($statut == 'nouveau') {
231 231
 		if ($attente) {
232 232
 			$statut = $attente;
233
-			$plus = " (" . _T('info_statut_auteur_a_confirmer') . ")";
233
+			$plus = " ("._T('info_statut_auteur_a_confirmer').")";
234 234
 		} else {
235 235
 			return _T('info_statut_auteur_a_confirmer');
236 236
 		}
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
 		'5poubelle' => _T('texte_statut_poubelle'), // bouh
244 244
 	);
245 245
 	if (isset($recom[$statut])) {
246
-		return $recom[$statut] . $plus;
246
+		return $recom[$statut].$plus;
247 247
 	}
248 248
 
249 249
 	// retrouver directement par le statut sinon
250 250
 	if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) {
251 251
 		if (isset($recom[$t])) {
252
-			return $recom[$t] . $plus;
252
+			return $recom[$t].$plus;
253 253
 		}
254 254
 
255
-		return _T($t) . $plus;
255
+		return _T($t).$plus;
256 256
 	}
257 257
 
258 258
 	// si on a pas reussi a le traduire, retournons la chaine telle quelle
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 	if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) {
377 377
 		$in = !count($GLOBALS['connect_id_rubrique'])
378 378
 			? ''
379
-			: (" AND " . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
379
+			: (" AND ".sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
380 380
 
381 381
 		// on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement
382 382
 		if ($objet == 'rubrique') {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 		return '';
411 411
 	}
412 412
 
413
-	return propre("[->" . $virtuel . "]");
413
+	return propre("[->".$virtuel."]");
414 414
 }
415 415
 
416 416
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 	$args = param_low_sec($op, $args, $lang, 'rss');
439 439
 	$url = generer_url_public('rss', $args);
440 440
 
441
-	return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>";
441
+	return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>";
442 442
 }
443 443
 
444 444
 
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 	);
511 511
 
512 512
 	if ($alertes = array_filter($alertes)) {
513
-		return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" .
513
+		return "<div class='wrap-messages-alertes'><div class='messages-alertes'>".
514 514
 		join(' | ', $alertes)
515 515
 		. "</div></div>";
516 516
 	}
@@ -544,13 +544,13 @@  discard block
 block discarded – undo
544 544
  */
545 545
 function afficher_plus_info($lien, $titre = "+", $titre_lien = "") {
546 546
 	$titre = attribut_html($titre);
547
-	$icone = "\n<a href='$lien' title='$titre' class='plus_info'>" .
548
-		http_img_pack("information-16.png", $titre) . "</a>";
547
+	$icone = "\n<a href='$lien' title='$titre' class='plus_info'>".
548
+		http_img_pack("information-16.png", $titre)."</a>";
549 549
 
550 550
 	if (!$titre_lien) {
551 551
 		return $icone;
552 552
 	} else {
553
-		return $icone . "\n<a href='$lien'>$titre_lien</a>";
553
+		return $icone."\n<a href='$lien'>$titre_lien</a>";
554 554
 	}
555 555
 }
556 556
 
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Spacing   +130 added lines, -132 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 	if (strlen($dossier) and substr($dossier, -1) != '/') {
54 54
 		$dossier .= '/';
55 55
 	}
56
-	$f = str_replace('/', '_', $dossier) . $nom;
56
+	$f = str_replace('/', '_', $dossier).$nom;
57 57
 
58 58
 	if (function_exists($f)) {
59 59
 		return $f;
60 60
 	}
61
-	if (function_exists($g = $f . '_dist')) {
61
+	if (function_exists($g = $f.'_dist')) {
62 62
 		return $g;
63 63
 	}
64 64
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 	// passer en minuscules (cf les balises de formulaires)
80 80
 	// et inclure le fichier
81
-	if (!$inc = include_spip($dossier . ($d = strtolower($nom)))
81
+	if (!$inc = include_spip($dossier.($d = strtolower($nom)))
82 82
 		// si le fichier truc/machin/nom.php n'existe pas,
83 83
 		// la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions
84 84
 		and strlen(dirname($dossier)) and dirname($dossier) != '.'
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	// Echec : message d'erreur
100
-	spip_log("fonction $nom ($f ou $g) indisponible" .
100
+	spip_log("fonction $nom ($f ou $g) indisponible".
101 101
 		($inc ? "" : " (fichier $d absent de $dossier)"));
102 102
 
103 103
 	include_spip('inc/minipres');
104 104
 	echo minipres(_T('forum_titre_erreur'),
105
-		_T('fichier_introuvable', array('fichier' => '<b>' . spip_htmlentities($d) . '</b>')),
106
-		array('all_inline'=>true,'status'=>404));
105
+		_T('fichier_introuvable', array('fichier' => '<b>'.spip_htmlentities($d).'</b>')),
106
+		array('all_inline'=>true, 'status'=>404));
107 107
 	exit;
108 108
 }
109 109
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
  *     - string : chemin du fichier trouvé
149 149
  **/
150 150
 function include_spip($f, $include = true) {
151
-	return find_in_path($f . '.php', '', $include);
151
+	return find_in_path($f.'.php', '', $include);
152 152
 }
153 153
 
154 154
 /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
  *     - string : chemin du fichier trouvé
169 169
  **/
170 170
 function require_spip($f) {
171
-	return find_in_path($f . '.php', '', 'required');
171
+	return find_in_path($f.'.php', '', 'required');
172 172
 }
173 173
 
174 174
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		// donc il faut l'inclure "en globals"
186 186
 		if ($f = find_in_path('mes_fonctions.php')) {
187 187
 			global $dossier_squelettes;
188
-			include_once(_ROOT_CWD . $f);
188
+			include_once(_ROOT_CWD.$f);
189 189
 		}
190 190
 
191 191
 		if (@is_readable(_CACHE_PLUGINS_FCT)) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 	}
290 290
 
291 291
 	// appliquer notre fonction si elle existe
292
-	$fonc = 'execute_pipeline_' . strtolower($action);
292
+	$fonc = 'execute_pipeline_'.strtolower($action);
293 293
 	if (function_exists($fonc)) {
294 294
 		$val = $fonc($val);
295 295
 	} // plantage ?
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 function spip_log($message = null, $name = null) {
354 354
 	static $pre = array();
355 355
 	static $log;
356
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
356
+	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs);
357 357
 	if (!isset($regs[1]) or !$logname = $regs[1]) {
358 358
 		$logname = null;
359 359
 	}
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 		if (!is_string($message)) {
382 382
 			$message = print_r($message, true);
383 383
 		}
384
-		$log($pre[$niveau] . ' ' . $message, $logname);
384
+		$log($pre[$niveau].' '.$message, $logname);
385 385
 	}
386 386
 }
387 387
 
@@ -494,9 +494,9 @@  discard block
 block discarded – undo
494 494
  * @param string $sanitize_function
495 495
  * @return array|mixed|string
496 496
  */
497
-function spip_sanitize_from_request($value, $key, $sanitize_function='entites_html') {
497
+function spip_sanitize_from_request($value, $key, $sanitize_function = 'entites_html') {
498 498
 	if (is_array($value)) {
499
-		if ($key=='*') {
499
+		if ($key == '*') {
500 500
 			$key = array_keys($value);
501 501
 		}
502 502
 		if (!is_array($key)) {
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 		$a = './';
582 582
 	}
583 583
 
584
-	$regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,';
584
+	$regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,';
585 585
 	$ajouts = array_flip(explode('|', $c));
586 586
 	$u = is_array($v) ? $v : rawurlencode($v);
587 587
 	$testv = (is_array($v) ? count($v) : strlen($v));
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 			// Ajout. Pour une variable, remplacer au meme endroit,
609 609
 			// pour un tableau ce sera fait dans la prochaine boucle
610 610
 			elseif (substr($r[1], -2) != '[]') {
611
-				$url[$n] = $r[1] . '=' . $u;
611
+				$url[$n] = $r[1].'='.$u;
612 612
 				unset($ajouts[$r[1]]);
613 613
 			}
614 614
 			// Pour les tableaux on laisse tomber les valeurs de
@@ -628,11 +628,11 @@  discard block
 block discarded – undo
628 628
 	} elseif ($testv) {
629 629
 		foreach ($ajouts as $k => $n) {
630 630
 			if (!is_array($v)) {
631
-				$url[] = $k . '=' . $u;
631
+				$url[] = $k.'='.$u;
632 632
 			} else {
633
-				$id = (substr($k, -2) == '[]') ? $k : ($k . "[]");
633
+				$id = (substr($k, -2) == '[]') ? $k : ($k."[]");
634 634
 				foreach ($v as $w) {
635
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : $w);
635
+					$url[] = $id.'='.(is_array($w) ? 'Array' : $w);
636 636
 				}
637 637
 			}
638 638
 		}
@@ -643,10 +643,10 @@  discard block
 block discarded – undo
643 643
 
644 644
 	// recomposer l'adresse
645 645
 	if ($url) {
646
-		$a .= '?' . join($sep, $url);
646
+		$a .= '?'.join($sep, $url);
647 647
 	}
648 648
 
649
-	return $a . $ancre;
649
+	return $a.$ancre;
650 650
 }
651 651
 
652 652
 /**
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 			translitteration($ancre)
679 679
 		);
680 680
 	}
681
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
681
+	return $url.(strlen($ancre) ? '#'.$ancre : '');
682 682
 }
683 683
 
684 684
 /**
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
  * @return bool
791 791
  */
792 792
 function test_plugin_actif($plugin) {
793
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
793
+	return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
794 794
 }
795 795
 
796 796
 /**
@@ -858,8 +858,7 @@  discard block
 block discarded – undo
858 858
 		// pour les chaines non traduites, assurer un service minimum
859 859
 		if (!$GLOBALS['test_i18n'] and (_request('var_mode') != 'traduction')) {
860 860
 			$text = str_replace('_', ' ',
861
-				(($n = strpos($text, ':')) === false ? $texte :
862
-					substr($texte, $n + 1)));
861
+				(($n = strpos($text, ':')) === false ? $texte : substr($texte, $n + 1)));
863 862
 		}
864 863
 		$o['class'] = null;
865 864
 
@@ -931,7 +930,7 @@  discard block
 block discarded – undo
931 930
 		// Si des variables n'ont pas ete inserees, le signaler
932 931
 		// (chaines de langues pas a jour)
933 932
 		if ($args) {
934
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
933
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
935 934
 		}
936 935
 	}
937 936
 
@@ -955,7 +954,7 @@  discard block
 block discarded – undo
955 954
 function joli_repertoire($rep) {
956 955
 	$a = substr($rep, 0, 1);
957 956
 	if ($a <> '.' and $a <> '/') {
958
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
957
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
959 958
 	}
960 959
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
961 960
 
@@ -1009,7 +1008,7 @@  discard block
 block discarded – undo
1009 1008
 			$p -= ($x * 1000);
1010 1009
 		}
1011 1010
 
1012
-		return $s . sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
1011
+		return $s.sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
1013 1012
 	}
1014 1013
 }
1015 1014
 
@@ -1078,7 +1077,7 @@  discard block
 block discarded – undo
1078 1077
 	if ($taches and count($taches) and !spip_connect()) {
1079 1078
 		return false;
1080 1079
 	}
1081
-	spip_log("cron !", 'jq' . _LOG_DEBUG);
1080
+	spip_log("cron !", 'jq'._LOG_DEBUG);
1082 1081
 	if ($genie = charger_fonction('genie', 'inc', true)) {
1083 1082
 		return $genie($taches);
1084 1083
 	}
@@ -1182,7 +1181,7 @@  discard block
 block discarded – undo
1182 1181
 
1183 1182
 	if ($queue_next_job_time == -1) {
1184 1183
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1185
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . "job_queue_next.txt");
1184
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP."job_queue_next.txt");
1186 1185
 		}
1187 1186
 		// utiliser un cache memoire si dispo
1188 1187
 		if (function_exists("cache_get") and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
@@ -1249,8 +1248,8 @@  discard block
 block discarded – undo
1249 1248
 		$src = '';
1250 1249
 	}
1251 1250
 	if ($script) {
1252
-		$script = ("/*<![CDATA[*/\n" .
1253
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1251
+		$script = ("/*<![CDATA[*/\n".
1252
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
1254 1253
 			"/*]]>*/");
1255 1254
 	}
1256 1255
 	if ($noscript) {
@@ -1336,13 +1335,13 @@  discard block
 block discarded – undo
1336 1335
 	if ($path_base == null) {
1337 1336
 		// Chemin standard depuis l'espace public
1338 1337
 		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1339
-			_DIR_RACINE . ':' .
1340
-			_DIR_RACINE . 'squelettes-dist/:' .
1341
-			_DIR_RACINE . 'prive/:' .
1338
+			_DIR_RACINE.':'.
1339
+			_DIR_RACINE.'squelettes-dist/:'.
1340
+			_DIR_RACINE.'prive/:'.
1342 1341
 			_DIR_RESTREINT;
1343 1342
 		// Ajouter squelettes/
1344
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1345
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1343
+		if (@is_dir(_DIR_RACINE.'squelettes')) {
1344
+			$path = _DIR_RACINE.'squelettes/:'.$path;
1346 1345
 		}
1347 1346
 		foreach (explode(':', $path) as $dir) {
1348 1347
 			if (strlen($dir) and substr($dir, -1) != '/') {
@@ -1354,7 +1353,7 @@  discard block
 block discarded – undo
1354 1353
 		// Et le(s) dossier(s) des squelettes nommes
1355 1354
 		if (strlen($GLOBALS['dossier_squelettes'])) {
1356 1355
 			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1357
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1356
+				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/');
1358 1357
 			}
1359 1358
 		}
1360 1359
 		$GLOBALS['path_sig'] = md5(serialize($path_full));
@@ -1365,7 +1364,7 @@  discard block
 block discarded – undo
1365 1364
 
1366 1365
 	if (is_array($dir_path) or strlen($dir_path)) {
1367 1366
 		$tete = "";
1368
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1367
+		if (reset($path_base) == _DIR_RACINE.'squelettes/') {
1369 1368
 			$tete = array_shift($path_base);
1370 1369
 		}
1371 1370
 		$dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path));
@@ -1386,7 +1385,7 @@  discard block
 block discarded – undo
1386 1385
 	// Et le(s) dossier(s) des squelettes nommes
1387 1386
 	if (strlen($GLOBALS['dossier_squelettes'])) {
1388 1387
 		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1389
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1388
+			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/');
1390 1389
 		}
1391 1390
 	}
1392 1391
 
@@ -1456,9 +1455,9 @@  discard block
 block discarded – undo
1456 1455
 	// on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
1457 1456
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1458 1457
 	if (preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1459
-	  and $file_svg_generique = substr($file,0, -strlen($m[0])) . "-xx.svg"
1458
+	  and $file_svg_generique = substr($file, 0, -strlen($m[0]))."-xx.svg"
1460 1459
 		and $f = find_in_theme("$file_svg_generique")) {
1461
-		if ($fsize = substr($f,0,-6) . $m[1] . ".svg" and file_exists($fsize)) {
1460
+		if ($fsize = substr($f, 0, -6).$m[1].".svg" and file_exists($fsize)) {
1462 1461
 			return $themefiles["$subdir$file"] = $fsize;
1463 1462
 		}
1464 1463
 		else {
@@ -1472,7 +1471,7 @@  discard block
 block discarded – undo
1472 1471
 			return $themefiles["$subdir$file"] = $f;
1473 1472
 		}
1474 1473
 	}
1475
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1474
+	spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme');
1476 1475
 
1477 1476
 	return $themefiles["$subdir$file"] = "";
1478 1477
 }
@@ -1500,7 +1499,7 @@  discard block
 block discarded – undo
1500 1499
 function chemin_image($icone) {
1501 1500
 	static $icone_renommer;
1502 1501
 	if ($p = strpos($icone, '?')) {
1503
-		$icone = substr($icone,0, $p);
1502
+		$icone = substr($icone, 0, $p);
1504 1503
 	}
1505 1504
 	// gerer le cas d'un double appel en evitant de refaire le travail inutilement
1506 1505
 	if (strpos($icone, "/") !== false and file_exists($icone)) {
@@ -1580,8 +1579,8 @@  discard block
 block discarded – undo
1580 1579
 			return false;
1581 1580
 		}
1582 1581
 		if ($include and !isset($inc[$dirname][$file])) {
1583
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1584
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1582
+			include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1583
+			$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1585 1584
 		}
1586 1585
 
1587 1586
 		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
@@ -1594,14 +1593,14 @@  discard block
 block discarded – undo
1594 1593
 	}
1595 1594
 
1596 1595
 	foreach (creer_chemin() as $dir) {
1597
-		if (!isset($dirs[$a = $dir . $dirname])) {
1598
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1596
+		if (!isset($dirs[$a = $dir.$dirname])) {
1597
+			$dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a);
1599 1598
 		}
1600 1599
 		if ($dirs[$a]) {
1601
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1600
+			if (file_exists(_ROOT_CWD.($a .= $file))) {
1602 1601
 				if ($include and !isset($inc[$dirname][$file])) {
1603
-					include_once _ROOT_CWD . $a;
1604
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1602
+					include_once _ROOT_CWD.$a;
1603
+					$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1605 1604
 				}
1606 1605
 				if (!defined('_SAUVER_CHEMIN')) {
1607 1606
 					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
@@ -1611,7 +1610,7 @@  discard block
 block discarded – undo
1611 1610
 					define('_SAUVER_CHEMIN', true);
1612 1611
 				}
1613 1612
 
1614
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1613
+				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a;
1615 1614
 			}
1616 1615
 		}
1617 1616
 	}
@@ -1637,7 +1636,7 @@  discard block
 block discarded – undo
1637 1636
 		define('_SAUVER_CHEMIN', true);
1638 1637
 	}
1639 1638
 
1640
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1639
+	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false;
1641 1640
 }
1642 1641
 
1643 1642
 function clear_path_cache() {
@@ -1706,12 +1705,12 @@  discard block
 block discarded – undo
1706 1705
 	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1707 1706
 	// on a pas encore inclus flock.php
1708 1707
 	if (!function_exists('preg_files')) {
1709
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1708
+		include_once _ROOT_RESTREINT.'inc/flock.php';
1710 1709
 	}
1711 1710
 
1712 1711
 	// Parcourir le chemin
1713 1712
 	foreach (creer_chemin() as $d) {
1714
-		$f = $d . $dir;
1713
+		$f = $d.$dir;
1715 1714
 		if (@is_dir($f)) {
1716 1715
 			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? array() : $recurs);
1717 1716
 			foreach ($liste as $chemin) {
@@ -1741,9 +1740,9 @@  discard block
 block discarded – undo
1741 1740
 	static $autsanscookie = array('install', 'base_repair');
1742 1741
 
1743 1742
 	if (in_array($nom, $autsanscookie)) {
1744
-		if (test_espace_prive()){
1743
+		if (test_espace_prive()) {
1745 1744
 			include_spip('base/connect_sql');
1746
-			if (!$strict or !spip_connect()){
1745
+			if (!$strict or !spip_connect()) {
1747 1746
 				return true;
1748 1747
 			}
1749 1748
 		}
@@ -1822,7 +1821,7 @@  discard block
 block discarded – undo
1822 1821
 		return $res;
1823 1822
 	}
1824 1823
 	// Sinon c'est un raccourci ou compat SPIP < 2
1825
-	if (!function_exists($f = 'generer_url_' . $entite)) {
1824
+	if (!function_exists($f = 'generer_url_'.$entite)) {
1826 1825
 		if (!function_exists($f .= '_dist')) {
1827 1826
 			$f = '';
1828 1827
 		}
@@ -1831,8 +1830,8 @@  discard block
 block discarded – undo
1831 1830
 		$url = $f($id, $args, $ancre);
1832 1831
 		if (strlen($args)) {
1833 1832
 			$url .= strstr($url, '?')
1834
-				? '&amp;' . $args
1835
-				: '?' . $args;
1833
+				? '&amp;'.$args
1834
+				: '?'.$args;
1836 1835
 		}
1837 1836
 
1838 1837
 		return $url;
@@ -1863,8 +1862,8 @@  discard block
 block discarded – undo
1863 1862
 	include_spip('base/connect_sql');
1864 1863
 	$id_type = id_table_objet($entite, $public);
1865 1864
 
1866
-	return _DIR_RACINE . get_spip_script('./')
1867
-	. "?" . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1865
+	return _DIR_RACINE.get_spip_script('./')
1866
+	. "?"._SPIP_PAGE."=$entite&$id_type=$i&connect=$public"
1868 1867
 	. (!$args ? '' : "&$args")
1869 1868
 	. (!$ancre ? '' : "#$ancre");
1870 1869
 }
@@ -2016,7 +2015,7 @@  discard block
 block discarded – undo
2016 2015
 			if (!empty($_SERVER['QUERY_STRING'])
2017 2016
 				and !strpos($_SERVER['REQUEST_URI'], '?')
2018 2017
 			) {
2019
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2018
+				$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2020 2019
 			}
2021 2020
 		}
2022 2021
 	}
@@ -2043,17 +2042,17 @@  discard block
 block discarded – undo
2043 2042
 	list($myself) = explode('?', $myself);
2044 2043
 	// vieux mode HTTP qui envoie après le nom de la methode l'URL compléte
2045 2044
 	// protocole, "://", nom du serveur avant le path dans _SERVER["REQUEST_URI"]
2046
-	if (strpos($myself,'://') !== false) {
2047
-		$myself = explode('://',$myself);
2045
+	if (strpos($myself, '://') !== false) {
2046
+		$myself = explode('://', $myself);
2048 2047
 		array_shift($myself);
2049
-		$myself = implode('://',$myself);
2050
-		$myself = explode('/',$myself);
2048
+		$myself = implode('://', $myself);
2049
+		$myself = explode('/', $myself);
2051 2050
 		array_shift($myself);
2052
-		$myself = implode('/',$myself);
2051
+		$myself = implode('/', $myself);
2053 2052
 	}
2054
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2053
+	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/';
2055 2054
 
2056
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2055
+	$url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/');
2057 2056
 
2058 2057
 	return $url;
2059 2058
 }
@@ -2091,17 +2090,17 @@  discard block
 block discarded – undo
2091 2090
  **/
2092 2091
 function generer_url_ecrire($script = '', $args = "", $no_entities = false, $rel = false) {
2093 2092
 	if (!$rel) {
2094
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2093
+		$rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT;
2095 2094
 	} else {
2096 2095
 		if (!is_string($rel)) {
2097 2096
 			$rel = _DIR_RESTREINT ? _DIR_RESTREINT :
2098
-				('./' . _SPIP_ECRIRE_SCRIPT);
2097
+				('./'._SPIP_ECRIRE_SCRIPT);
2099 2098
 		}
2100 2099
 	}
2101 2100
 
2102 2101
 	list($script, $ancre) = array_pad(explode('#', $script), 2, null);
2103 2102
 	if ($script and ($script <> 'accueil' or $rel)) {
2104
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2103
+		$args = "?exec=$script".(!$args ? '' : "&$args");
2105 2104
 	} elseif ($args) {
2106 2105
 		$args = "?$args";
2107 2106
 	}
@@ -2109,7 +2108,7 @@  discard block
 block discarded – undo
2109 2108
 		$args .= "#$ancre";
2110 2109
 	}
2111 2110
 
2112
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2111
+	return $rel.($no_entities ? $args : str_replace('&', '&amp;', $args));
2113 2112
 }
2114 2113
 
2115 2114
 //
@@ -2179,25 +2178,25 @@  discard block
 block discarded – undo
2179 2178
 		if (is_array($args)) {
2180 2179
 			$r = '';
2181 2180
 			foreach ($args as $k => $v) {
2182
-				$r .= '&' . $k . '=' . $v;
2181
+				$r .= '&'.$k.'='.$v;
2183 2182
 			}
2184 2183
 			$args = substr($r, 1);
2185 2184
 		}
2186 2185
 		$action .=
2187
-			(strpos($action, '?') !== false ? '&' : '?') . $args;
2186
+			(strpos($action, '?') !== false ? '&' : '?').$args;
2188 2187
 	}
2189 2188
 	if (!$no_entities) {
2190 2189
 		$action = quote_amp($action);
2191 2190
 	}
2192 2191
 
2193 2192
 	// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2194
-	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(",^/[.]/,", "/", "/$action"));
2193
+	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(",^/[.]/,", "/", "/$action"));
2195 2194
 }
2196 2195
 
2197 2196
 // https://code.spip.net/@generer_url_prive
2198 2197
 function generer_url_prive($script, $args = "", $no_entities = false) {
2199 2198
 
2200
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2199
+	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php');
2201 2200
 }
2202 2201
 
2203 2202
 // Pour les formulaires en methode POST,
@@ -2232,8 +2231,7 @@  discard block
 block discarded – undo
2232 2231
 	. "><div>\n"
2233 2232
 	. "<input type='hidden' name='exec' value='$script1' />"
2234 2233
 	. $corps
2235
-	. (!$submit ? '' :
2236
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . "\" /></div>"))
2234
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit)."\" /></div>"))
2237 2235
 	. "</div></form>\n";
2238 2236
 }
2239 2237
 
@@ -2258,14 +2256,14 @@  discard block
 block discarded – undo
2258 2256
 		? generer_url_ecrire(_request('exec'))
2259 2257
 		: generer_url_public();
2260 2258
 
2261
-	return "\n<form action='" .
2262
-	$h .
2263
-	"'" .
2264
-	$atts .
2265
-	">\n" .
2266
-	"<div>" .
2267
-	"\n<input type='hidden' name='action' value='$script' />" .
2268
-	$corps .
2259
+	return "\n<form action='".
2260
+	$h.
2261
+	"'".
2262
+	$atts.
2263
+	">\n".
2264
+	"<div>".
2265
+	"\n<input type='hidden' name='action' value='$script' />".
2266
+	$corps.
2269 2267
 	"</div></form>";
2270 2268
 }
2271 2269
 
@@ -2293,7 +2291,7 @@  discard block
 block discarded – undo
2293 2291
 		: generer_url_public('', '', false, false);
2294 2292
 	$url = parametre_url($url, 'action', $script);
2295 2293
 	if ($args) {
2296
-		$url .= quote_amp('&' . $args);
2294
+		$url .= quote_amp('&'.$args);
2297 2295
 	}
2298 2296
 
2299 2297
 	if ($no_entities) {
@@ -2343,17 +2341,17 @@  discard block
 block discarded – undo
2343 2341
 
2344 2342
 	// le nom du repertoire plugins/ activables/desactivables
2345 2343
 	if (!defined('_DIR_PLUGINS')) {
2346
-		define('_DIR_PLUGINS', _DIR_RACINE . "plugins/");
2344
+		define('_DIR_PLUGINS', _DIR_RACINE."plugins/");
2347 2345
 	}
2348 2346
 
2349 2347
 	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2350 2348
 	if (!defined('_DIR_PLUGINS_DIST')) {
2351
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . "plugins-dist/");
2349
+		define('_DIR_PLUGINS_DIST', _DIR_RACINE."plugins-dist/");
2352 2350
 	}
2353 2351
 
2354 2352
 	// le nom du repertoire des librairies
2355 2353
 	if (!defined('_DIR_LIB')) {
2356
-		define('_DIR_LIB', _DIR_RACINE . "lib/");
2354
+		define('_DIR_LIB', _DIR_RACINE."lib/");
2357 2355
 	}
2358 2356
 
2359 2357
 	if (!defined('_DIR_IMG')) {
@@ -2363,29 +2361,29 @@  discard block
 block discarded – undo
2363 2361
 		define('_DIR_LOGOS', $pa);
2364 2362
 	}
2365 2363
 	if (!defined('_DIR_IMG_ICONES')) {
2366
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . "icones/");
2364
+		define('_DIR_IMG_ICONES', _DIR_LOGOS."icones/");
2367 2365
 	}
2368 2366
 
2369 2367
 	if (!defined('_DIR_DUMP')) {
2370
-		define('_DIR_DUMP', $ti . "dump/");
2368
+		define('_DIR_DUMP', $ti."dump/");
2371 2369
 	}
2372 2370
 	if (!defined('_DIR_SESSIONS')) {
2373
-		define('_DIR_SESSIONS', $ti . "sessions/");
2371
+		define('_DIR_SESSIONS', $ti."sessions/");
2374 2372
 	}
2375 2373
 	if (!defined('_DIR_TRANSFERT')) {
2376
-		define('_DIR_TRANSFERT', $ti . "upload/");
2374
+		define('_DIR_TRANSFERT', $ti."upload/");
2377 2375
 	}
2378 2376
 	if (!defined('_DIR_CACHE')) {
2379
-		define('_DIR_CACHE', $ti . "cache/");
2377
+		define('_DIR_CACHE', $ti."cache/");
2380 2378
 	}
2381 2379
 	if (!defined('_DIR_CACHE_XML')) {
2382
-		define('_DIR_CACHE_XML', _DIR_CACHE . "xml/");
2380
+		define('_DIR_CACHE_XML', _DIR_CACHE."xml/");
2383 2381
 	}
2384 2382
 	if (!defined('_DIR_SKELS')) {
2385
-		define('_DIR_SKELS', _DIR_CACHE . "skel/");
2383
+		define('_DIR_SKELS', _DIR_CACHE."skel/");
2386 2384
 	}
2387 2385
 	if (!defined('_DIR_AIDE')) {
2388
-		define('_DIR_AIDE', _DIR_CACHE . "aide/");
2386
+		define('_DIR_AIDE', _DIR_CACHE."aide/");
2389 2387
 	}
2390 2388
 	if (!defined('_DIR_TMP')) {
2391 2389
 		define('_DIR_TMP', $ti);
@@ -2415,27 +2413,27 @@  discard block
 block discarded – undo
2415 2413
 	// Declaration des fichiers
2416 2414
 
2417 2415
 	if (!defined('_CACHE_PLUGINS_PATH')) {
2418
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . "charger_plugins_chemins.php");
2416
+		define('_CACHE_PLUGINS_PATH', _DIR_CACHE."charger_plugins_chemins.php");
2419 2417
 	}
2420 2418
 	if (!defined('_CACHE_PLUGINS_OPT')) {
2421
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . "charger_plugins_options.php");
2419
+		define('_CACHE_PLUGINS_OPT', _DIR_CACHE."charger_plugins_options.php");
2422 2420
 	}
2423 2421
 	if (!defined('_CACHE_PLUGINS_FCT')) {
2424
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . "charger_plugins_fonctions.php");
2422
+		define('_CACHE_PLUGINS_FCT', _DIR_CACHE."charger_plugins_fonctions.php");
2425 2423
 	}
2426 2424
 	if (!defined('_CACHE_PIPELINES')) {
2427
-		define('_CACHE_PIPELINES', _DIR_CACHE . "charger_pipelines.php");
2425
+		define('_CACHE_PIPELINES', _DIR_CACHE."charger_pipelines.php");
2428 2426
 	}
2429 2427
 	if (!defined('_CACHE_CHEMIN')) {
2430
-		define('_CACHE_CHEMIN', _DIR_CACHE . "chemin.txt");
2428
+		define('_CACHE_CHEMIN', _DIR_CACHE."chemin.txt");
2431 2429
 	}
2432 2430
 
2433 2431
 	# attention .php obligatoire pour ecrire_fichier_securise
2434 2432
 	if (!defined('_FILE_META')) {
2435
-		define('_FILE_META', $ti . 'meta_cache.php');
2433
+		define('_FILE_META', $ti.'meta_cache.php');
2436 2434
 	}
2437 2435
 	if (!defined('_DIR_LOG')) {
2438
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2436
+		define('_DIR_LOG', _DIR_TMP.'log/');
2439 2437
 	}
2440 2438
 	if (!defined('_FILE_LOG')) {
2441 2439
 		define('_FILE_LOG', 'spip');
@@ -2451,8 +2449,8 @@  discard block
 block discarded – undo
2451 2449
 	}
2452 2450
 	if (!defined('_FILE_CONNECT')) {
2453 2451
 		define('_FILE_CONNECT',
2454
-		(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2455
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2452
+		(@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f
2453
+			: (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f
2456 2454
 				: false)));
2457 2455
 	}
2458 2456
 
@@ -2462,7 +2460,7 @@  discard block
 block discarded – undo
2462 2460
 	}
2463 2461
 	if (!defined('_FILE_CHMOD')) {
2464 2462
 		define('_FILE_CHMOD',
2465
-		(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2463
+		(@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f
2466 2464
 			: false));
2467 2465
 	}
2468 2466
 
@@ -2474,10 +2472,10 @@  discard block
 block discarded – undo
2474 2472
 		define('_FILE_TMP_SUFFIX', '.tmp.php');
2475 2473
 	}
2476 2474
 	if (!defined('_FILE_CONNECT_TMP')) {
2477
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2475
+		define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX);
2478 2476
 	}
2479 2477
 	if (!defined('_FILE_CHMOD_TMP')) {
2480
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2478
+		define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX);
2481 2479
 	}
2482 2480
 
2483 2481
 	// Definition des droits d'acces en ecriture
@@ -2495,13 +2493,13 @@  discard block
 block discarded – undo
2495 2493
 		define('_DEFAULT_CHARSET', 'utf-8');
2496 2494
 	}
2497 2495
 	if (!defined('_ROOT_PLUGINS')) {
2498
-		define('_ROOT_PLUGINS', _ROOT_RACINE . "plugins/");
2496
+		define('_ROOT_PLUGINS', _ROOT_RACINE."plugins/");
2499 2497
 	}
2500 2498
 	if (!defined('_ROOT_PLUGINS_DIST')) {
2501
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . "plugins-dist/");
2499
+		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE."plugins-dist/");
2502 2500
 	}
2503 2501
 	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2504
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2502
+		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2505 2503
 	}
2506 2504
 
2507 2505
 	// La taille des Log
@@ -2538,7 +2536,7 @@  discard block
 block discarded – undo
2538 2536
 	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2539 2537
 	// pour le rendre surchargeable, on va provoquer un reecriture
2540 2538
 	// systematique du noyau ou une baisse de perfs => a etudier)
2541
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2539
+	include_once _ROOT_RESTREINT.'inc/flock.php';
2542 2540
 
2543 2541
 	// charger tout de suite le path et son cache
2544 2542
 	load_path_cache();
@@ -2585,7 +2583,7 @@  discard block
 block discarded – undo
2585 2583
 		if (!empty($_SERVER['QUERY_STRING'])
2586 2584
 			and !strpos($_SERVER['REQUEST_URI'], '?')
2587 2585
 		) {
2588
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2586
+			$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2589 2587
 		}
2590 2588
 	}
2591 2589
 
@@ -2621,7 +2619,7 @@  discard block
 block discarded – undo
2621 2619
 
2622 2620
 			if (isset($GLOBALS['meta']['adresse_site'])) {
2623 2621
 				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2624
-				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '') . '/';
2622
+				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '').'/';
2625 2623
 			} else {
2626 2624
 				$uri_ref = "";
2627 2625
 			}
@@ -2709,7 +2707,7 @@  discard block
 block discarded – undo
2709 2707
 	}
2710 2708
 	if (!defined('_CACHE_RUBRIQUES')) {
2711 2709
 		/** Fichier cache pour le navigateur de rubrique du bandeau */
2712
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2710
+		define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
2713 2711
 	}
2714 2712
 	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2715 2713
 		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
@@ -2808,7 +2806,7 @@  discard block
 block discarded – undo
2808 2806
 					$memory *= 1024;
2809 2807
 			}
2810 2808
 			if ($memory < _MEMORY_LIMIT_MIN * 1024 * 1024) {
2811
-				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN . 'M');
2809
+				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN.'M');
2812 2810
 				if (trim(ini_get('memory_limit')) != $m) {
2813 2811
 					if (!defined('_INTERDIRE_COMPACTE_HEAD_ECRIRE')) {
2814 2812
 						define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true);
@@ -2958,7 +2956,7 @@  discard block
 block discarded – undo
2958 2956
 					}
2959 2957
 					if (isset($GLOBALS['visiteur_session']['nom'])) {
2960 2958
 						spip_log($GLOBALS['visiteur_session']['nom']
2961
-							. " " . _VAR_MODE);
2959
+							. " "._VAR_MODE);
2962 2960
 					}
2963 2961
 				} // pas autorise ?
2964 2962
 				else {
@@ -2971,7 +2969,7 @@  discard block
 block discarded – undo
2971 2969
 						if (strpos($self, 'page=login') === false) {
2972 2970
 							include_spip('inc/headers');
2973 2971
 							$redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&');
2974
-							redirige_par_entete(generer_url_public('login','url=' . rawurlencode($redirect), true));
2972
+							redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true));
2975 2973
 						}
2976 2974
 					}
2977 2975
 					// sinon tant pis
@@ -3015,10 +3013,10 @@  discard block
 block discarded – undo
3015 3013
 	// mais on risque de perturber des plugins en initialisant trop tot
3016 3014
 	// certaines constantes
3017 3015
 	@spip_initialisation_core(
3018
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3019
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3020
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3021
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3016
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
3017
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
3018
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
3019
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
3022 3020
 	);
3023 3021
 
3024 3022
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -3051,7 +3049,7 @@  discard block
 block discarded – undo
3051 3049
 	}
3052 3050
 
3053 3051
 	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3054
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3052
+	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
3055 3053
 
3056 3054
 		$session = charger_fonction('session', 'inc');
3057 3055
 		if ($session()) {
@@ -3131,7 +3129,7 @@  discard block
 block discarded – undo
3131 3129
 		$s = pipeline('definir_session',
3132 3130
 			$GLOBALS['visiteur_session']
3133 3131
 				? serialize($GLOBALS['visiteur_session'])
3134
-				. '_' . @$_COOKIE['spip_session']
3132
+				. '_'.@$_COOKIE['spip_session']
3135 3133
 				: ''
3136 3134
 		);
3137 3135
 		$session = $s ? substr(md5($s), 0, 8) : '';
@@ -3287,12 +3285,12 @@  discard block
 block discarded – undo
3287 3285
 	$GLOBALS['_INC_PUBLIC']++;
3288 3286
 
3289 3287
 	// fix #4235
3290
-	$cache_utilise_session_appelant	= (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3288
+	$cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3291 3289
 
3292 3290
 
3293 3291
 	foreach (is_array($fond) ? $fond : array($fond) as $f) {
3294 3292
 		
3295
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3293
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
3296 3294
 
3297 3295
 		$page = evaluer_fond($f, $contexte, $connect);
3298 3296
 		if ($page === '') {
@@ -3331,7 +3329,7 @@  discard block
 block discarded – undo
3331 3329
 		}
3332 3330
 		
3333 3331
 		// contamination de la session appelante, pour les inclusions statiques
3334
-		if (isset($page['invalideurs']['session'])){
3332
+		if (isset($page['invalideurs']['session'])) {
3335 3333
 			$cache_utilise_session_appelant = $page['invalideurs']['session'];
3336 3334
 		}
3337 3335
 	}
@@ -3377,7 +3375,7 @@  discard block
 block discarded – undo
3377 3375
  * @return array|string
3378 3376
  */
3379 3377
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3380
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3378
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
3381 3379
 	if (!$pathinfo) {
3382 3380
 		return $f;
3383 3381
 	}
Please login to merge, or discard this patch.
ecrire/inc/chercher_rubrique.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	{
147 147
 		$r = "<option$selected value='$root' class='$class' style='$style'>$espace"
148 148
 			. $data[$root]
149
-			. '</option>' . "\n";
149
+			. '</option>'."\n";
150 150
 	} else {
151 151
 		$r = '';
152 152
 	}
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	}
167 167
 
168 168
 	// et voila le travail
169
-	return $r . $sous;
169
+	return $r.$sous;
170 170
 }
171 171
 
172 172
 /**
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
 	while ($r = sql_fetch($q)) {
209 209
 		if (autoriser('voir', 'rubrique', $r['id_rubrique'])) {
210 210
 			// titre largeur maxi a 50
211
-			$titre = couper(supprimer_tags(typo($r['titre'])) . " ", 50);
211
+			$titre = couper(supprimer_tags(typo($r['titre']))." ", 50);
212 212
 			if ($GLOBALS['meta']['multi_rubriques'] == 'oui'
213 213
 				and ($r['langue_choisie'] == "oui" or $r['id_parent'] == 0)
214 214
 			) {
215
-				$titre .= ' [' . traduire_nom_langue($r['lang']) . ']';
215
+				$titre .= ' ['.traduire_nom_langue($r['lang']).']';
216 216
 			}
217 217
 			$data[$r['id_rubrique']] = $titre;
218 218
 			$enfants[$r['id_parent']][] = $r['id_rubrique'];
@@ -238,9 +238,9 @@  discard block
 block discarded – undo
238 238
 	$att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'";
239 239
 
240 240
 	if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) {
241
-		$r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2];
241
+		$r = "<input$att type='hidden' value='".$r[1]."' />".$r[2];
242 242
 	} else {
243
-		$r = "<select" . $att . " size='1'>\n$opt</select>\n";
243
+		$r = "<select".$att." size='1'>\n$opt</select>\n";
244 244
 	}
245 245
 
246 246
 	# message pour neuneus (a supprimer ?)
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') {
283 283
 
284 284
 	if ($id_rubrique) {
285
-		$titre = sql_getfetsel("titre", "spip_rubriques", "id_rubrique=" . intval($id_rubrique));
285
+		$titre = sql_getfetsel("titre", "spip_rubriques", "id_rubrique=".intval($id_rubrique));
286 286
 	} else {
287 287
 		if ($type == 'auteur') {
288 288
 			$titre = '&nbsp;';
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	}
293 293
 
294 294
 	$titre = str_replace('&amp;', '&', entites_html(textebrut(typo($titre))));
295
-	$init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'";
295
+	$init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'";
296 296
 
297 297
 	$url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do"
298 298
 		. (!$idem ? '' : "&exclus=$idem")
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 		. " jQuery(this).toggleClass('toggled'); "
342 342
 		. "return charger_node_url_si_vide('"
343 343
 		. $url
344
-		. "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>"
344
+		. "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>"
345 345
 		. $img_icone
346 346
 		. "</a><img src='"
347 347
 		. chemin_image('loader.svg')
Please login to merge, or discard this patch.