Completed
Push — master ( 34def0...475524 )
by cam
01:15
created
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.
ecrire/inc/filtres_boites.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
 		$titre = "<h3>$titre</h3>";
136 136
 	}
137 137
 
138
-	return '<div class="' . $class . ($id ? "\" id=\"$id" : '') . '">'
138
+	return '<div class="'.$class.($id ? "\" id=\"$id" : '').'">'
139 139
 	. ($titre ? "<div class=\"$head_class\">$titre<!--/hd--></div>" : '')
140 140
 	. '<div class="box__body clearfix">';
141 141
 }
Please login to merge, or discard this patch.
prive/themes/spip/vars.css_fonctions.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 	// Typographie
41 41
 	$vars->add('--spip-font-size', $Pile[0]['font-size']);
42
-	$vars->add('--spip-line-height',  $Pile[0]['line-height']);
42
+	$vars->add('--spip-line-height', $Pile[0]['line-height']);
43 43
 	$vars->add('--spip-text-indent', $Pile[0]['text-indent']);
44 44
 	$vars->add('--spip-font-family', $Pile[0]['font-family']);
45 45
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 	// Espacements pour le rythme vertical et les gouttières
51 51
 	// Basés sur la hauteur d'une ligne de texte à la racine du document
52
-	$vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem');
53
-	$vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem');
52
+	$vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem');
53
+	$vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem');
54 54
 	$vars->add('--spip-margin-bottom', $Pile[0]['margin-bottom']); // À déprécier
55 55
 
56 56
 	// Bordures
@@ -60,20 +60,20 @@  discard block
 block discarded – undo
60 60
 
61 61
 	// Ombres portées
62 62
 	$shadow_mini =
63
-		'0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),' .
64
-		'0 0.1em  0.15em hsla(0, 0%, 0%, 0.05),' .
63
+		'0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),'.
64
+		'0 0.1em  0.15em hsla(0, 0%, 0%, 0.05),'.
65 65
 		'0 0.1em  0.25em  hsla(0, 0%, 0%, 0.05)';
66 66
 	$shadow =
67
-		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),' .
68
-		'0 0.1em  0.25em hsla(0, 0%, 0%, 0.05),' .
67
+		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),'.
68
+		'0 0.1em  0.25em hsla(0, 0%, 0%, 0.05),'.
69 69
 		'0 0.1em  0.5em  hsla(0, 0%, 0%, 0.05)';
70 70
 	$shadow_large =
71
-		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),' .
72
-		'0 0.2em  0.5em  hsla(0, 0%, 0%, 0.1),' .
71
+		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),'.
72
+		'0 0.2em  0.5em  hsla(0, 0%, 0%, 0.1),'.
73 73
 		'0 0.2em  1em    hsla(0, 0%, 0%, 0.075)';
74 74
 	$shadow_huge =
75
-		'0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),' .
76
-		'0 0.25em  1em  hsla(0, 0%, 0%, 0.1),' .
75
+		'0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),'.
76
+		'0 0.25em  1em  hsla(0, 0%, 0%, 0.1),'.
77 77
 		'0 0.5em  2em    hsla(0, 0%, 0%, 0.075)';
78 78
 	$vars->add('--spip-box-shadow-mini', $shadow_mini);
79 79
 	$vars->add('--spip-box-shadow-mini-hover', $shadow);
Please login to merge, or discard this patch.
ecrire/action/menu_rubriques.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 	// on renvoi un 401 qui fait echouer la requete ajax silencieusement
40 40
 	if (!autoriser('ecrire')) {
41 41
 		$retour =
42
-		'<ul class="deroulant__sous-menu" data-profondeur="1">' .
43
-			'<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">' .
44
-				'<a class="deroulant__lien" href="' . generer_url_ecrire('accueil') . '" data-profondeur="1">' .
45
-					'<span class="libelle">' . _T('public:lien_connecter') . '</span>' .
46
-				'</a>' .
47
-			'</li>' .
42
+		'<ul class="deroulant__sous-menu" data-profondeur="1">'.
43
+			'<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">'.
44
+				'<a class="deroulant__lien" href="'.generer_url_ecrire('accueil').'" data-profondeur="1">'.
45
+					'<span class="libelle">'._T('public:lien_connecter').'</span>'.
46
+				'</a>'.
47
+			'</li>'.
48 48
 		'</ul>';
49 49
 		include_spip('inc/actions');
50 50
 		ajax_retour($retour);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	if ($date = intval(_request('date'))) {
55
-		header("Last-Modified: " . gmdate("D, d M Y H:i:s", $date) . " GMT");
55
+		header("Last-Modified: ".gmdate("D, d M Y H:i:s", $date)." GMT");
56 56
 	}
57 57
 
58 58
 	$r = gen_liste_rubriques();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		and !strstr($_SERVER['SERVER_SOFTWARE'], 'IIS/')
62 62
 	) {
63 63
 		include_spip('inc/headers');
64
-		header('Content-Type: text/html; charset=' . $GLOBALS['meta']['charset']);
64
+		header('Content-Type: text/html; charset='.$GLOBALS['meta']['charset']);
65 65
 		http_status(304);
66 66
 		exit;
67 67
 	} else {
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
  **/
84 84
 function menu_rubriques($complet = true) {
85 85
 	$ret = '<li class="deroulant__item deroulant__item_tout toutsite" data-profondeur="1">'
86
-		. '<a class="deroulant__lien" href="' . generer_url_ecrire('plan') . '" data-profondeur="1">'
87
-		. '<span class="libelle">' . _T('info_tout_site') . '</span>'
86
+		. '<a class="deroulant__lien" href="'.generer_url_ecrire('plan').'" data-profondeur="1">'
87
+		. '<span class="libelle">'._T('info_tout_site').'</span>'
88 88
 		. '</a>'
89 89
 		. '</li>';
90 90
 
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
 	static $zmax = 6;
144 144
 	$profondeur_next = $profondeur + 1;
145 145
 
146
-	$nav = '<a class="deroulant__lien" href="' . generer_url_entite($id_rubrique, 'rubrique', '', '', false) . "\" data-profondeur=\"$profondeur\">"
147
-		. '<span class="libelle">' . supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)) . '</span>'
146
+	$nav = '<a class="deroulant__lien" href="'.generer_url_entite($id_rubrique, 'rubrique', '', '', false)."\" data-profondeur=\"$profondeur\">"
147
+		. '<span class="libelle">'.supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)).'</span>'
148 148
 		. "</a>\n";
149 149
 
150 150
 	// Limiter volontairement le nombre de sous-menus
Please login to merge, or discard this patch.
ecrire/base/objets.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 		$infos['url_voir'] = $infos['type'];
704 704
 	}
705 705
 	if (!isset($infos['url_edit'])) {
706
-		$infos['url_edit'] = $infos['url_voir'] . ($infos['editable'] ? '_edit' : '');
706
+		$infos['url_edit'] = $infos['url_voir'].($infos['editable'] ? '_edit' : '');
707 707
 	}
708 708
 	if (!isset($infos['icone_objet'])) {
709 709
 		$infos['icone_objet'] = $infos['type'];
@@ -715,48 +715,48 @@  discard block
 block discarded – undo
715 715
 		$infos['texte_retour'] = 'icone_retour';
716 716
 	}
717 717
 	if (!isset($infos['texte_modifier'])) {
718
-		$infos['texte_modifier'] = $infos['type'] . ':' . 'icone_modifier_' . $infos['type'];
718
+		$infos['texte_modifier'] = $infos['type'].':'.'icone_modifier_'.$infos['type'];
719 719
 	}
720 720
 	if (!isset($infos['texte_creer'])) {
721
-		$infos['texte_creer'] = $infos['type'] . ':' . 'icone_creer_' . $infos['type'];
721
+		$infos['texte_creer'] = $infos['type'].':'.'icone_creer_'.$infos['type'];
722 722
 	}
723 723
 	if (!isset($infos['texte_creer_associer'])) {
724
-		$infos['texte_creer_associer'] = $infos['type'] . ':' . 'texte_creer_associer_' . $infos['type'];
724
+		$infos['texte_creer_associer'] = $infos['type'].':'.'texte_creer_associer_'.$infos['type'];
725 725
 	}
726 726
 	if (!isset($infos['texte_ajouter'])) {
727 727
 		// Ajouter un X
728
-		$infos['texte_ajouter'] = $infos['type'] . ':' . 'texte_ajouter_' . $infos['type'];
728
+		$infos['texte_ajouter'] = $infos['type'].':'.'texte_ajouter_'.$infos['type'];
729 729
 	}
730 730
 	if (!isset($infos['texte_objets'])) {
731
-		$infos['texte_objets'] = $infos['type'] . ':' . 'titre_' . $infos['table_objet'];
731
+		$infos['texte_objets'] = $infos['type'].':'.'titre_'.$infos['table_objet'];
732 732
 	}
733 733
 	if (!isset($infos['texte_objet'])) {
734
-		$infos['texte_objet'] = $infos['type'] . ':' . 'titre_' . $infos['type'];
734
+		$infos['texte_objet'] = $infos['type'].':'.'titre_'.$infos['type'];
735 735
 	}
736 736
 	if (!isset($infos['texte_logo_objet'])) {
737 737
 		// objet:titre_logo_objet "Logo de ce X"
738
-		$infos['texte_logo_objet'] = $infos['type'] . ':' . 'titre_logo_' . $infos['type'];
738
+		$infos['texte_logo_objet'] = $infos['type'].':'.'titre_logo_'.$infos['type'];
739 739
 	}
740 740
 	if (!isset($infos['texte_langue_objet'])) {
741 741
 		// objet:texte_langue_objet "Langue de ce X"
742
-		$infos['texte_langue_objet'] = $infos['type'] . ':' . 'titre_langue_' . $infos['type'];
742
+		$infos['texte_langue_objet'] = $infos['type'].':'.'titre_langue_'.$infos['type'];
743 743
 	}
744 744
 	if (!isset($infos['texte_definir_comme_traduction_objet'])) {
745 745
 		// "Ce X est une traduction du X numéro :"
746
-		$infos['texte_definir_comme_traduction_objet'] = $infos['type'] . ':' . 'texte_definir_comme_traduction_' . $infos['type'];
746
+		$infos['texte_definir_comme_traduction_objet'] = $infos['type'].':'.'texte_definir_comme_traduction_'.$infos['type'];
747 747
 	}
748 748
 
749 749
 	// objet:info_aucun_objet
750 750
 	if (!isset($infos['info_aucun_objet'])) {
751
-		$infos['info_aucun_objet'] = $infos['type'] . ':' . 'info_aucun_' . $infos['type'];
751
+		$infos['info_aucun_objet'] = $infos['type'].':'.'info_aucun_'.$infos['type'];
752 752
 	}
753 753
 	// objet:info_1_objet
754 754
 	if (!isset($infos['info_1_objet'])) {
755
-		$infos['info_1_objet'] = $infos['type'] . ':' . 'info_1_' . $infos['type'];
755
+		$infos['info_1_objet'] = $infos['type'].':'.'info_1_'.$infos['type'];
756 756
 	}
757 757
 	// objet:info_nb_objets
758 758
 	if (!isset($infos['info_nb_objets'])) {
759
-		$infos['info_nb_objets'] = $infos['type'] . ':' . 'info_nb_' . $infos['table_objet'];
759
+		$infos['info_nb_objets'] = $infos['type'].':'.'info_nb_'.$infos['table_objet'];
760 760
 	}
761 761
 
762 762
 	if (!isset($infos['champs_editables'])) {
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
 		}
957 957
 		$ts = sql_alltable(null, $serveur); // toutes les tables "spip_" (ou prefixe perso)
958 958
 		$connexion = $GLOBALS['connexions'][$serveur ? $serveur : 0];
959
-		$spip = $connexion['prefixe'] . '_';
959
+		$spip = $connexion['prefixe'].'_';
960 960
 		foreach ($ts as $t) {
961 961
 			$t = substr($t, strlen($spip));
962 962
 			$tables[$serveur]["spip_$t"] = $t;
@@ -977,14 +977,14 @@  discard block
 block discarded – undo
977 977
  * @return array
978 978
  *     Couples (nom de la table SQL => même nom)
979 979
  **/
980
-function lister_toutes_tables($serveur){
980
+function lister_toutes_tables($serveur) {
981 981
 	static $tables = array();
982
-	if (!isset($tables[$serveur])){
982
+	if (!isset($tables[$serveur])) {
983 983
 		$tables[$serveur] = array();
984 984
 		if (!function_exists("sql_alltable"))
985 985
 			include_spip("base/abstract_sql");
986
-		$ts = sql_alltable('%',$serveur); // toutes les tables
987
-		foreach ($ts as $t){
986
+		$ts = sql_alltable('%', $serveur); // toutes les tables
987
+		foreach ($ts as $t) {
988 988
 			$tables[$serveur][$t] = $t;
989 989
 		}
990 990
 	}
@@ -1020,9 +1020,9 @@  discard block
 block discarded – undo
1020 1020
 	if ($serveur !== false) {
1021 1021
 		$t = lister_tables_spip($serveur);
1022 1022
 		$trouver_table = charger_fonction('trouver_table', 'base');
1023
-		$typetrim = rtrim($type, 's') . 's';
1023
+		$typetrim = rtrim($type, 's').'s';
1024 1024
 		if ((isset($t[$typetrim]) or in_array($typetrim, $t))
1025
-			and ($desc = $trouver_table(rtrim($type, 's') . 's', $serveur))
1025
+			and ($desc = $trouver_table(rtrim($type, 's').'s', $serveur))
1026 1026
 		) {
1027 1027
 			return $desc['id_table'];
1028 1028
 		} elseif ((isset($t[$type]) or in_array($type, $t))
@@ -1031,11 +1031,11 @@  discard block
 block discarded – undo
1031 1031
 			return $desc['id_table'];
1032 1032
 		}
1033 1033
 
1034
-		spip_log('table_objet(' . $type . ') calculee sans verification');
1034
+		spip_log('table_objet('.$type.') calculee sans verification');
1035 1035
 		#spip_log(debug_backtrace(),'db');
1036 1036
 	}
1037 1037
 
1038
-	return rtrim($type, 's') . 's'; # cas historique ne devant plus servir, sauf si $serveur=false
1038
+	return rtrim($type, 's').'s'; # cas historique ne devant plus servir, sauf si $serveur=false
1039 1039
 }
1040 1040
 
1041 1041
 /**
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
 	if (
1113 1113
 		in_array($t, $ts)
1114 1114
 		or in_array($t, lister_toutes_tables($serveur))
1115
-	){
1115
+	) {
1116 1116
 		$desc = $trouver_table($t, $serveur);
1117 1117
 		if (isset($desc['key']['PRIMARY KEY'])) {
1118 1118
 			return $desc['key']['PRIMARY KEY'];
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
 function objet_test_si_publie($objet, $id_objet, $serveur = '') {
1216 1216
 	// voir si une fonction est definie pour faire le boulot
1217 1217
 	// elle a la priorite dans ce cas
1218
-	if ($f = charger_fonction($objet . '_test_si_publie', 'base', true)) {
1218
+	if ($f = charger_fonction($objet.'_test_si_publie', 'base', true)) {
1219 1219
 		return $f($objet, $id_objet, $serveur);
1220 1220
 	}
1221 1221
 
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
 		$boucle->sql_serveur = $serveur;
1236 1236
 		$boucle->select[] = $id_table_objet;
1237 1237
 		$boucle->from[$table_objet] = table_objet_sql($objet, $serveur);
1238
-		$boucle->where[] = $id_table . '.' . $id_table_objet . '=' . intval($id_objet);
1238
+		$boucle->where[] = $id_table.'.'.$id_table_objet.'='.intval($id_objet);
1239 1239
 
1240 1240
 		$boucle->descr['nom'] = 'objet_test_si_publie'; // eviter notice php
1241 1241
 		$boucle->descr['sourcefile'] = 'internal';
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
 						? "{$parent_methode['source_champ']} = $id_objet"
1364 1364
 						: "${cle_objet} = $id_objet";
1365 1365
 					if (isset($parent_methode['source_champ_type'])) {
1366
-						$where[] = "{$parent_methode['source_champ_type']} = " . sql_quote($objet);
1366
+						$where[] = "{$parent_methode['source_champ_type']} = ".sql_quote($objet);
1367 1367
 					}
1368 1368
 					// -- Condition supplémentaire sur la détection du parent
1369 1369
 					if (isset($parent_methode['table_condition'])) {
@@ -1377,7 +1377,7 @@  discard block
 block discarded – undo
1377 1377
 			if (
1378 1378
 				!$condition_objet_invalide
1379 1379
 				and $where
1380
-				and ($lignes = sql_allfetsel( $is_table_lien ? '*' : $select, $table, $where))
1380
+				and ($lignes = sql_allfetsel($is_table_lien ? '*' : $select, $table, $where))
1381 1381
 			) {
1382 1382
 				foreach ($lignes as $ligne) {
1383 1383
 					// Si le type est fixe
@@ -1487,11 +1487,11 @@  discard block
 block discarded – undo
1487 1487
 			$where = array();
1488 1488
 			// -- L'identifiant du parent
1489 1489
 			if (isset($_methode_parent['champ'])) {
1490
-				$where[] = $_methode_parent['champ'] . ' = ' . $id_objet;
1490
+				$where[] = $_methode_parent['champ'].' = '.$id_objet;
1491 1491
 			}
1492 1492
 			// -- Si le parent est variable
1493 1493
 			if (isset($_methode_parent['champ_type'])) {
1494
-				$where[] = $_methode_parent['champ_type'] . ' = ' . sql_quote($objet);
1494
+				$where[] = $_methode_parent['champ_type'].' = '.sql_quote($objet);
1495 1495
 			}
1496 1496
 
1497 1497
 			// On détermine la table, le champ id des enfants et on complète éventuellement les conditions
Please login to merge, or discard this patch.
ecrire/inc_version.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../');
50 50
 
51 51
 /** chemin absolu vers la racine */
52
-define('_ROOT_RACINE', dirname(__DIR__) . '/');
52
+define('_ROOT_RACINE', dirname(__DIR__).'/');
53 53
 /** chemin absolu vers le repertoire de travail */
54
-define('_ROOT_CWD', getcwd() . '/');
54
+define('_ROOT_CWD', getcwd().'/');
55 55
 /** chemin absolu vers ecrire */
56
-define('_ROOT_RESTREINT', _ROOT_CWD . _DIR_RESTREINT);
56
+define('_ROOT_RESTREINT', _ROOT_CWD._DIR_RESTREINT);
57 57
 
58 58
 // Icones
59 59
 if (!defined('_NOM_IMG_PACK')) {
@@ -61,17 +61,17 @@  discard block
 block discarded – undo
61 61
 	define('_NOM_IMG_PACK', 'images/');
62 62
 }
63 63
 /** le chemin http (relatif) vers les images standard */
64
-define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK));
64
+define('_DIR_IMG_PACK', (_DIR_RACINE.'prive/'._NOM_IMG_PACK));
65 65
 
66 66
 /** le chemin php (absolu) vers les images standard (pour hebergement centralise) */
67
-define('_ROOT_IMG_PACK', dirname(__DIR__) . '/prive/' . _NOM_IMG_PACK);
67
+define('_ROOT_IMG_PACK', dirname(__DIR__).'/prive/'._NOM_IMG_PACK);
68 68
 
69 69
 if (!defined('_JAVASCRIPT')) {
70 70
 	/** Nom du repertoire des  bibliotheques JavaScript */
71 71
 	define('_JAVASCRIPT', 'javascript/');
72 72
 } // utilisable avec #CHEMIN et find_in_path
73 73
 /** le nom du repertoire des  bibliotheques JavaScript du prive */
74
-define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT));
74
+define('_DIR_JAVASCRIPT', (_DIR_RACINE.'prive/'._JAVASCRIPT));
75 75
 
76 76
 # Le nom des 4 repertoires modifiables par les scripts lances par httpd
77 77
 # Par defaut ces 4 noms seront suffixes par _DIR_RACINE (cf plus bas)
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 }
102 102
 
103 103
 // Son emplacement absolu si on le trouve
104
-if (@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')
105
-	or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
104
+if (@file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php')
105
+	or (@file_exists($f = _ROOT_RESTREINT._NOM_CONFIG.'.php'))
106 106
 ) {
107 107
 	/** Emplacement absolu du fichier d'option */
108 108
 	define('_FILE_OPTIONS', $f);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 // Inclure l'ecran de securite
127 127
 if (!defined('_ECRAN_SECURITE')
128
-	and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')
128
+	and @file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES.'ecran_securite.php')
129 129
 ) {
130 130
 	include $f;
131 131
 }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			. 'MSIE 6\.0|'
145 145
 			// UA plus cibles
146 146
 			. '80legs|accoona|AltaVista|ASPSeek|Baidu|Charlotte|EC2LinkFinder|eStyle|facebook|flipboard|hootsuite|FunWebProducts|Google|Genieo|INA dlweb|InfegyAtlas|Java VM|LiteFinder|Lycos|MetaURI|Moreover|Rambler|Scooter|ScrubbyBloglines|Yahoo|Yeti'
147
-			. ',i', (string)$_SERVER['HTTP_USER_AGENT'])
147
+			. ',i', (string) $_SERVER['HTTP_USER_AGENT'])
148 148
 	);
149 149
 }
150 150
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 //
275 275
 // Prendre en compte les entetes HTTP_X_FORWARDED_XX
276 276
 //
277
-if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
277
+if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
278 278
 	if (empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
279 279
 		$_SERVER['HTTP_X_FORWARDED_HOST'] = $_SERVER['HTTP_HOST'];
280 280
 	}
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
 		$_SERVER['HTTP_X_FORWARDED_PORT'] = 443;
283 283
 	}
284 284
 }
285
-if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])){
286
-	if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])){
285
+if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
286
+	if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])) {
287 287
 		$_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT'];
288
-		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
288
+		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
289 289
 			$_SERVER['HTTPS'] = 'on';
290 290
 			if (isset($_SERVER['REQUEST_SCHEME'])) {
291 291
 				$_SERVER['REQUEST_SCHEME'] = 'https';
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
 		}
294 294
 	}
295 295
 	$host = $_SERVER['HTTP_X_FORWARDED_HOST'];
296
-	if (strpos($host,',')!==false){
297
-		$h = explode(',',$host);
296
+	if (strpos($host, ',') !== false) {
297
+		$h = explode(',', $host);
298 298
 		$host = trim(reset($h));
299 299
 	}
300 300
 	// securite sur le contenu de l'entete
@@ -306,12 +306,12 @@  discard block
 block discarded – undo
306 306
 //
307 307
 if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
308 308
 	$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
309
-	if (strpos($ip,',')!==false){
310
-		$ip = explode(',',$ip);
309
+	if (strpos($ip, ',') !== false) {
310
+		$ip = explode(',', $ip);
311 311
 		$ip = reset($ip);
312 312
 	}
313 313
 	// ecraser $_SERVER['REMOTE_ADDR'] si elle est en localhost
314
-	if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR']==='127.0.0.1'){
314
+	if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR'] === '127.0.0.1') {
315 315
 		$_SERVER['REMOTE_ADDR'] = $ip;
316 316
 	}
317 317
 }
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 # la matrice standard (fichiers definissant les fonctions a inclure)
385 385
 $spip_matrice = array();
386 386
 # les plugins a activer
387
-$plugins = array();  // voir le contenu du repertoire /plugins/
387
+$plugins = array(); // voir le contenu du repertoire /plugins/
388 388
 # les surcharges de include_spip()
389 389
 $surcharges = array(); // format 'inc_truc' => '/plugins/chose/inc_truc2.php'
390 390
 
@@ -462,8 +462,8 @@  discard block
 block discarded – undo
462 462
 //
463 463
 // Charger les fonctions liees aux serveurs Http et Sql.
464 464
 //
465
-require_once _ROOT_RESTREINT . 'inc/utils.php';
466
-require_once _ROOT_RESTREINT . 'base/connect_sql.php';
465
+require_once _ROOT_RESTREINT.'inc/utils.php';
466
+require_once _ROOT_RESTREINT.'base/connect_sql.php';
467 467
 
468 468
 // Definition personnelles eventuelles
469 469
 
@@ -486,10 +486,10 @@  discard block
 block discarded – undo
486 486
 // ===> on execute en neutralisant les messages d'erreur
487 487
 
488 488
 spip_initialisation_core(
489
-	(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
490
-	(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
491
-	(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
492
-	(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
489
+	(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
490
+	(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
491
+	(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
492
+	(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
493 493
 );
494 494
 
495 495
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 		// Si on est dans le site public, dire que qq s'en occupe
545 545
 		include_spip('inc/minipres');
546 546
 		utiliser_langue_visiteur();
547
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . "</p>", array('status' => 503));
547
+		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>"._T('info_travaux_texte')."</p>", array('status' => 503));
548 548
 		exit;
549 549
 	}
550 550
 	// autrement c'est une install ad hoc (spikini...), on sait pas faire
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 	if (!function_exists('session_set')) {
559 559
 		include_spip('inc/session');
560 560
 	}
561
-	$t = preg_replace(",\W,","_", $t);
561
+	$t = preg_replace(",\W,", "_", $t);
562 562
 	if ($v = _request($t)) {
563 563
 		session_set($t, $v);
564 564
 	}
@@ -582,12 +582,12 @@  discard block
 block discarded – undo
582 582
 	}
583 583
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
584 584
 		include_spip('inc/filtres_mini');
585
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . "config.txt"));
585
+		header(_HEADER_COMPOSED_BY." $spip_version_affichee @ www.spip.net + ".url_absolue(_DIR_VAR."config.txt"));
586 586
 	} else {
587 587
 		// header minimal
588
-		header(_HEADER_COMPOSED_BY . " @ www.spip.net");
588
+		header(_HEADER_COMPOSED_BY." @ www.spip.net");
589 589
 	}
590 590
 }
591 591
 
592 592
 $methode = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ((php_sapi_name() == 'cli') ? 'cli' : ''));
593
-spip_log($methode . ' ' . self() . ' - ' . _FILE_CONNECT, _LOG_DEBUG);
593
+spip_log($methode.' '.self().' - '._FILE_CONNECT, _LOG_DEBUG);
Please login to merge, or discard this patch.
ecrire/inc/plugin.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 /** l'adresse du repertoire de telechargement et de decompactage des plugins */
24 24
 if (!defined('_DIR_PLUGINS_AUTO')) {
25
-	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/');
25
+	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/');
26 26
 }
27 27
 
28 28
 #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins.
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 				if ($dir) {
371 371
 					$dir .= "/";
372 372
 				}
373
-				$dir .= "procure:" . $procure['nom'];
373
+				$dir .= "procure:".$procure['nom'];
374 374
 
375 375
 				$procure['etat'] = '?';
376 376
 				$procure['dir_type'] = $resume['dir_type'];
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 		$plug = $resume['dir'];
552 552
 		$k = $infos[$dir_type][$plug];
553 553
 
554
-		$plug = constant($dir_type) . $plug;
554
+		$plug = constant($dir_type).$plug;
555 555
 		if (!isset($msg[$p])) {
556 556
 			if (isset($resume['erreur']) and $resume['erreur']) {
557 557
 				$msg[$p] = array($resume['erreur']);
@@ -594,10 +594,10 @@  discard block
 block discarded – undo
594 594
 		$list = $raw ? array() : $GLOBALS['meta']['plugin_erreur_activation'];
595 595
 	} elseif (!$raw) {
596 596
 		foreach ($list as $plug => $msg) {
597
-			$list[$plug] = "<li>" . _T('plugin_impossible_activer', array('plugin' => $plug))
598
-				. "<ul><li>" . implode("</li><li>", $msg) . "</li></ul></li>";
597
+			$list[$plug] = "<li>"._T('plugin_impossible_activer', array('plugin' => $plug))
598
+				. "<ul><li>".implode("</li><li>", $msg)."</li></ul></li>";
599 599
 		}
600
-		$list = "<ul>" . join("\n", $list) . "</ul>";
600
+		$list = "<ul>".join("\n", $list)."</ul>";
601 601
 	}
602 602
 	if ($raz) {
603 603
 		effacer_meta('plugin_erreur_activation');
@@ -711,13 +711,13 @@  discard block
 block discarded – undo
711 711
 			if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
712 712
 				return _T("plugin_${balise}_${type}", array(
713 713
 					'plugin' => $nom,
714
-					'version' => ' &ge; ' . $minimum
714
+					'version' => ' &ge; '.$minimum
715 715
 				));
716 716
 			}
717 717
 			if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
718 718
 				return _T("plugin_${balise}_${type}", array(
719 719
 					'plugin' => $nom,
720
-					'version' => ' &gt; ' . $minimum
720
+					'version' => ' &gt; '.$minimum
721 721
 				));
722 722
 			}
723 723
 		}
@@ -726,13 +726,13 @@  discard block
 block discarded – undo
726 726
 			if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
727 727
 				return _T("plugin_${balise}_${type}", array(
728 728
 					'plugin' => $nom,
729
-					'version' => ' &le; ' . $maximum
729
+					'version' => ' &le; '.$maximum
730 730
 				));
731 731
 			}
732 732
 			if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
733 733
 				return _T("plugin_${balise}_plugin", array(
734 734
 					'plugin' => $nom,
735
-					'version' => ' &lt; ' . $maximum
735
+					'version' => ' &lt; '.$maximum
736 736
 				));
737 737
 			}
738 738
 		}
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 		include_spip('inc/charger_plugin');
752 752
 		$url = '<br />'	. bouton_telechargement_plugin($url, 'lib');
753 753
 	}*/
754
-	return _T('plugin_necessite_lib', array('lib' => $lib)) . " <a href='$url'>$url</a>";
754
+	return _T('plugin_necessite_lib', array('lib' => $lib))." <a href='$url'>$url</a>";
755 755
 }
756 756
 
757 757
 
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 	foreach ($plugin_valides as $p => $resume) {
851 851
 		// Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
852 852
 		if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') {
853
-			$header[] = $p . ($resume['version'] ? "(" . $resume['version'] . ")" : "");
853
+			$header[] = $p.($resume['version'] ? "(".$resume['version'].")" : "");
854 854
 		}
855 855
 		if ($resume['dir']) {
856 856
 			foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
@@ -874,10 +874,10 @@  discard block
 block discarded – undo
874 874
 	ecrire_meta('plugin_attente', serialize($liste));
875 875
 	$header = strtolower(implode(",", $header));
876 876
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
877
-		ecrire_fichier(_DIR_VAR . "config.txt",
878
-			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP") . ' ' . $GLOBALS['spip_version_affichee'] . " @ www.spip.net + " . $header);
877
+		ecrire_fichier(_DIR_VAR."config.txt",
878
+			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP").' '.$GLOBALS['spip_version_affichee']." @ www.spip.net + ".$header);
879 879
 	} else {
880
-		@unlink(_DIR_VAR . "config.txt");
880
+		@unlink(_DIR_VAR."config.txt");
881 881
 	}
882 882
 	// generer charger_plugins_chemin.php
883 883
 	plugins_precompile_chemin($plugin_valides, $ordre);
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
 			// definir le plugin, donc le path avant l'include du fichier options
932 932
 			// permet de faire des include_spip pour attraper un inc_ du plugin
933 933
 
934
-			$dir = $dir_type . ".'" . $plug . "/'";
934
+			$dir = $dir_type.".'".$plug."/'";
935 935
 
936 936
 			$prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
937 937
 			if (
@@ -942,11 +942,11 @@  discard block
 block discarded – undo
942 942
 				if (!$info['chemin']) {
943 943
 					$chemins['public'][] = "_DIR_PLUGIN_$prefix";
944 944
 					$chemins['prive'][] = "_DIR_PLUGIN_$prefix";
945
-					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
945
+					if (is_dir(constant($dir_type).$plug.'/squelettes/')) {
946 946
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
947 947
 					}
948 948
 				}
949
-				else{
949
+				else {
950 950
 					foreach ($info['chemin'] as $chemin) {
951 951
 						if (!isset($chemin['version']) or plugin_version_compatible($chemin['version'],
952 952
 								$GLOBALS['spip_version_branche'], 'spip')
@@ -959,13 +959,13 @@  discard block
 block discarded – undo
959 959
 								$dir = '';
960 960
 							}
961 961
 							if (strlen($dir)) {
962
-								$dir = rtrim($dir, '/') . '/';
962
+								$dir = rtrim($dir, '/').'/';
963 963
 							}
964 964
 							if (!isset($chemin['type']) or $chemin['type'] == 'public') {
965
-								$chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : "");
965
+								$chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : "");
966 966
 							}
967 967
 							if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
968
-								$chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : "");
968
+								$chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : "");
969 969
 							}
970 970
 						}
971 971
 					}
@@ -974,9 +974,9 @@  discard block
 block discarded – undo
974 974
 		}
975 975
 	}
976 976
 	if (count($chemins['public']) or count($chemins['prive'])) {
977
-		$contenu .= "if (_DIR_RESTREINT) _chemin([" . implode(',',
978
-				array_reverse($chemins['public'])) . "]);\n"
979
-			. "else _chemin([" . implode(',', array_reverse($chemins['prive'])) . "]);\n";
977
+		$contenu .= "if (_DIR_RESTREINT) _chemin([".implode(',',
978
+				array_reverse($chemins['public']))."]);\n"
979
+			. "else _chemin([".implode(',', array_reverse($chemins['prive']))."]);\n";
980 980
 	}
981 981
 
982 982
 	ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
 					and strpos($dir, ":") === false // exclure le cas des procure:
1025 1025
 					and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1026 1026
 				) {
1027
-					if (is_readable("$dir$plug/" . ($file = $info['prefix'] . "_" . $charge . ".php"))) {
1027
+					if (is_readable("$dir$plug/".($file = $info['prefix']."_".$charge.".php"))) {
1028 1028
 						$info[$charge] = array($file);
1029 1029
 					}
1030 1030
 				}
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 						) {
1041 1041
 							unset($info[$charge][$k]);
1042 1042
 						} else {
1043
-							$_file = $root_dir_type . ".'$plug/$file'";
1043
+							$_file = $root_dir_type.".'$plug/$file'";
1044 1044
 							$contenu[$charge] .= "include_once_check($_file);\n";
1045 1045
 						}
1046 1046
 					}
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
 		}
1051 1051
 	}
1052 1052
 
1053
-	$contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1053
+	$contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options'];
1054 1054
 	$contenu['fonctions'] .= plugin_ongletbouton("boutons_plugins", $boutons)
1055 1055
 		. plugin_ongletbouton("onglets_plugins", $onglets);
1056 1056
 
@@ -1085,12 +1085,12 @@  discard block
 block discarded – undo
1085 1085
 		define("_UPDATED_$nom", $val);
1086 1086
 		define("_UPDATED_md5_$nom", $md5);
1087 1087
 	}
1088
-	$val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1088
+	$val = "unserialize('".str_replace("'", "\'", $val)."')";
1089 1089
 
1090 1090
 	return
1091 1091
 		"if (!function_exists('$nom')) {\n"
1092 1092
 		. "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1093
-		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1093
+		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n"
1094 1094
 		. "}\n";
1095 1095
 }
1096 1096
 
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
 	if (@is_readable(_CACHE_PLUGINS_OPT)) {
1114 1114
 		include_once(_CACHE_PLUGINS_OPT);
1115 1115
 	} else {
1116
-		spip_log("pipelines desactives: impossible de produire " . _CACHE_PLUGINS_OPT);
1116
+		spip_log("pipelines desactives: impossible de produire "._CACHE_PLUGINS_OPT);
1117 1117
 	}
1118 1118
 }
1119 1119
 
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
 			$dir_type = $plugin_valides[$p]['dir_type'];
1151 1151
 			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1152 1152
 			$plug = $plugin_valides[$p]['dir'];
1153
-			$prefix = (($info['prefix'] == "spip") ? "" : $info['prefix'] . "_");
1153
+			$prefix = (($info['prefix'] == "spip") ? "" : $info['prefix']."_");
1154 1154
 			if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1155 1155
 				foreach ($info['pipeline'] as $pipe) {
1156 1156
 					$nom = $pipe['nom'];
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
 						}
1181 1181
 						if (isset($pipe['inclure'])) {
1182 1182
 							$GLOBALS['spip_matrice']["$prefix$action"] =
1183
-								"$root_dir_type:$plug/" . $pipe['inclure'];
1183
+								"$root_dir_type:$plug/".$pipe['inclure'];
1184 1184
 						}
1185 1185
 					}
1186 1186
 				}
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
 					$prepend_code['taches_generales_cron'] = "";
1191 1191
 				}
1192 1192
 				foreach ($info['genie'] as $genie) {
1193
-					$nom = $prefix . $genie['nom'];
1193
+					$nom = $prefix.$genie['nom'];
1194 1194
 					$periode = max(60, intval($genie['periode']));
1195 1195
 					if (charger_fonction($nom, "genie", true)) {
1196 1196
 						$prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
@@ -1208,13 +1208,13 @@  discard block
 block discarded – undo
1208 1208
 				}
1209 1209
 				foreach ($info['style'] as $style) {
1210 1210
 					if (isset($style['path']) and $style['path']) {
1211
-						$code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1211
+						$code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) ";
1212 1212
 					} else {
1213
-						$code = "if (\$f='" . addslashes($style['url']) . "') ";
1213
+						$code = "if (\$f='".addslashes($style['url'])."') ";
1214 1214
 					}
1215 1215
 					$code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1216 1216
 					if (isset($style['media']) and strlen($style['media'])) {
1217
-						$code .= " media=\"" . addslashes($style['media']) . "\"";
1217
+						$code .= " media=\"".addslashes($style['media'])."\"";
1218 1218
 					}
1219 1219
 					$code .= "/>';\n";
1220 1220
 					if ($style['type'] != 'prive') {
@@ -1234,9 +1234,9 @@  discard block
 block discarded – undo
1234 1234
 			if (isset($info['script']) and count($info['script'])) {
1235 1235
 				foreach ($info['script'] as $script) {
1236 1236
 					if (isset($script['path']) and $script['path']) {
1237
-						$code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1237
+						$code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) ";
1238 1238
 					} else {
1239
-						$code = "if (\$f='" . addslashes($script['url']) . "') ";
1239
+						$code = "if (\$f='".addslashes($script['url'])."') ";
1240 1240
 					}
1241 1241
 					$code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1242 1242
 					if ($script['type'] != 'prive') {
@@ -1299,10 +1299,10 @@  discard block
 block discarded – undo
1299 1299
 		unset($GLOBALS['spip_pipeline']['all']);
1300 1300
 		$all_pipes = trim(array_shift($a));
1301 1301
 		if ($all_pipes) {
1302
-			$all_pipes = '|' . ltrim($all_pipes, '|');
1302
+			$all_pipes = '|'.ltrim($all_pipes, '|');
1303 1303
 		}
1304 1304
 		if (count($a)) {
1305
-			$all_pipes_end = '||' . array_shift($a);
1305
+			$all_pipes_end = '||'.array_shift($a);
1306 1306
 		}
1307 1307
 	}
1308 1308
 	$content = "";
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
 		// Eclater le pipeline en filtres et appliquer chaque filtre
1320 1320
 		foreach ($pipe as $fonc) {
1321 1321
 			$fonc = trim($fonc);
1322
-			$s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1322
+			$s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n";
1323 1323
 			if (isset($GLOBALS['spip_matrice'][$fonc])) {
1324 1324
 				$file = $GLOBALS['spip_matrice'][$fonc];
1325 1325
 				$file = "'$file'";
@@ -1330,7 +1330,7 @@  discard block
 block discarded – undo
1330 1330
 					if (defined($root_dir)) {
1331 1331
 						$dir = $root_dir;
1332 1332
 					}
1333
-					$file = str_replace($regs[0], "'." . $dir . ".'", $file);
1333
+					$file = str_replace($regs[0], "'.".$dir.".'", $file);
1334 1334
 					$file = str_replace("''.", "", $file);
1335 1335
 					$file = str_replace(constant($dir), '', $file);
1336 1336
 				}
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
 		$content .= "// Pipeline $action \n"
1344 1344
 			. "function execute_pipeline_$action(&\$val){\n"
1345 1345
 			. $s_inc
1346
-			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1346
+			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '')
1347 1347
 			. $s_call
1348 1348
 			. "return \$val;\n}\n";
1349 1349
 	}
@@ -1427,18 +1427,18 @@  discard block
 block discarded – undo
1427 1427
 		$GLOBALS['fichier_php_compile_recent'] = 0;
1428 1428
 	}
1429 1429
 
1430
-	$contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1430
+	$contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>';
1431 1431
 	// si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1432 1432
 	// si pas de modif on ne touche pas au fichier initial
1433 1433
 	if (file_exists($nom)) {
1434 1434
 		if (substr($nom, -4) == '.php') {
1435
-			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1435
+			$fichier_tmp = substr($nom, 0, -4).'.tmp.php';
1436 1436
 		}
1437 1437
 		else {
1438
-			$fichier_tmp = $nom . '.tmp';
1438
+			$fichier_tmp = $nom.'.tmp';
1439 1439
 		}
1440 1440
 		file_put_contents($fichier_tmp, $contenu);
1441
-		if(md5_file($nom) == md5_file($fichier_tmp)) {
1441
+		if (md5_file($nom) == md5_file($fichier_tmp)) {
1442 1442
 			$GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom));
1443 1443
 			@unlink($fichier_tmp);
1444 1444
 			return;
Please login to merge, or discard this patch.