Completed
Push — master ( f0405e...7791a8 )
by cam
05:00
created
ecrire/public/parametrer.php 1 patch
Spacing   +11 added lines, -11 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...
@@ -135,17 +135,17 @@  discard block
 block discarded – undo
135 135
 
136 136
 		$profile = spip_timer($a);
137 137
 		spip_log("calcul ($profile) [$skel] $infos"
138
-			. ' (' . strlen($page['texte']) . ' octets)');
138
+			. ' ('.strlen($page['texte']).' octets)');
139 139
 
140
-		if (defined('_CALCUL_PROFILER') AND intval($profile)>_CALCUL_PROFILER){
140
+		if (defined('_CALCUL_PROFILER') AND intval($profile) > _CALCUL_PROFILER) {
141 141
 			spip_log("calcul ($profile) [$skel] $infos"
142
-				.' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'],"profiler"._LOG_AVERTISSEMENT);
142
+				.' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], "profiler"._LOG_AVERTISSEMENT);
143 143
 		}
144 144
 
145 145
 		if ($debug) {
146 146
 			// si c'est ce que demande le debusqueur, lui passer la main
147 147
 			$t = strlen($page['texte']) ? $page['texte'] : " ";
148
-			$GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t;
148
+			$GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t;
149 149
 			$GLOBALS['debug_objets']['courant'] = $courant;
150 150
 			$GLOBALS['debug_objets']['profile'][$sourcefile] = $profile;
151 151
 			if ($GLOBALS['debug_objets']['sourcefile']
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		if (defined('_VAR_INCLURE') and _VAR_INCLURE) {
176 176
 			$page['sourcefile'] = $sourcefile;
177 177
 			$page['texte'] =
178
-				"<div class='inclure_blocs'><h6>" . $page['sourcefile'] . "</h6>" . $page['texte'] . "</div>"
178
+				"<div class='inclure_blocs'><h6>".$page['sourcefile']."</h6>".$page['texte']."</div>"
179 179
 				. ($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>");
180 180
 			$js_inclus = true;
181 181
 		}
@@ -210,21 +210,21 @@  discard block
 block discarded – undo
210 210
 		}
211 211
 		if (is_array($val)) {
212 212
 			if ($profondeur_max > 0) {
213
-				$val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')';
213
+				$val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')';
214 214
 			} else {
215
-				$val = 'array:' . count($val);
215
+				$val = 'array:'.count($val);
216 216
 			}
217 217
 		} elseif (is_object($val)) {
218 218
 			$val = get_class($val);
219 219
 		} elseif (strlen("$val") > 30) {
220
-			$val = substr("$val", 0, 29) . '…';
220
+			$val = substr("$val", 0, 29).'…';
221 221
 			if (strstr($val, ' ')) {
222 222
 				$val = "'$val'";
223 223
 			}
224 224
 		} elseif (strstr($val, ' ')) {
225 225
 			$val = "'$val'";
226 226
 		}
227
-		$infos[] = $var . '=' . $val;
227
+		$infos[] = $var.'='.$val;
228 228
 	}
229 229
 	return join(', ', $infos);
230 230
 }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 						. "?php include_spip('inc/headers');redirige_par_entete('"
291 291
 						. texte_script($url)
292 292
 						. "','',$status);"
293
-						. "?" . ">",
293
+						. "?".">",
294 294
 					'process_ins' => 'php',
295 295
 					'status' => $status
296 296
 				);
Please login to merge, or discard this patch.
ecrire/base/dump.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
  * @return string
39 39
  **/
40 40
 function base_dump_meta_name($rub) {
41
-	return $meta = "status_dump_{$rub}_" . abs($GLOBALS['visiteur_session']['id_auteur']);
41
+	return $meta = "status_dump_{$rub}_".abs($GLOBALS['visiteur_session']['id_auteur']);
42 42
 }
43 43
 
44 44
 /**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	$connexion = $GLOBALS['connexions'][$serveur ? $serveur : 0];
85 85
 	$prefixe = $connexion['prefixe'];
86 86
 
87
-	$p = '/^' . $prefixe . '/';
87
+	$p = '/^'.$prefixe.'/';
88 88
 	$res = $tables;
89 89
 	foreach (sql_alltable(null, $serveur) as $t) {
90 90
 		if (preg_match($p, $t)) {
@@ -343,8 +343,8 @@  discard block
 block discarded – undo
343 343
 function base_vider_tables_destination_copie($tables, $exclure_tables = array(), $serveur = '') {
344 344
 	$trouver_table = charger_fonction('trouver_table', 'base');
345 345
 
346
-	spip_log('Vider ' . count($tables) . " tables sur serveur '$serveur' : " . join(', ', $tables),
347
-		'base.' . _LOG_INFO_IMPORTANTE);
346
+	spip_log('Vider '.count($tables)." tables sur serveur '$serveur' : ".join(', ', $tables),
347
+		'base.'._LOG_INFO_IMPORTANTE);
348 348
 	foreach ($tables as $table) {
349 349
 		if (!in_array($table, $exclure_tables)) {
350 350
 			// sur le serveur principal, il ne faut pas supprimer l'auteur loge !
@@ -381,14 +381,14 @@  discard block
 block discarded – undo
381 381
 function base_conserver_copieur($move = true, $serveur = '') {
382 382
 	// s'asurer qu'on a pas deja fait la manip !
383 383
 	if ($GLOBALS['visiteur_session']['id_auteur'] > 0 and sql_countsel("spip_auteurs", "id_auteur>0")) {
384
-		spip_log('Conserver copieur dans id_auteur=' . $GLOBALS['visiteur_session']['id_auteur'] . " pour le serveur '$serveur'",
385
-			'dump.' . _LOG_INFO_IMPORTANTE);
384
+		spip_log('Conserver copieur dans id_auteur='.$GLOBALS['visiteur_session']['id_auteur']." pour le serveur '$serveur'",
385
+			'dump.'._LOG_INFO_IMPORTANTE);
386 386
 		sql_delete("spip_auteurs", "id_auteur<0", $serveur);
387 387
 		if ($move) {
388 388
 			sql_updateq('spip_auteurs', array('id_auteur' => -$GLOBALS['visiteur_session']['id_auteur']),
389
-				"id_auteur=" . intval($GLOBALS['visiteur_session']['id_auteur']), array(), $serveur);
389
+				"id_auteur=".intval($GLOBALS['visiteur_session']['id_auteur']), array(), $serveur);
390 390
 		} else {
391
-			$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $GLOBALS['visiteur_session']['id_auteur'], '', '', '', '',
391
+			$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$GLOBALS['visiteur_session']['id_auteur'], '', '', '', '',
392 392
 				$serveur);
393 393
 			$row['id_auteur'] = -$GLOBALS['visiteur_session']['id_auteur'];
394 394
 			sql_insertq('spip_auteurs', $row, array(), $serveur);
@@ -411,15 +411,15 @@  discard block
 block discarded – undo
411 411
 	// rien a faire si ce n'est pas le serveur principal !
412 412
 	if ($serveur == '') {
413 413
 		if (sql_countsel("spip_auteurs", "id_auteur>0")) {
414
-			spip_log("Detruire copieur id_auteur<0 pour le serveur '$serveur'", 'dump.' . _LOG_INFO_IMPORTANTE);
414
+			spip_log("Detruire copieur id_auteur<0 pour le serveur '$serveur'", 'dump.'._LOG_INFO_IMPORTANTE);
415 415
 			sql_delete("spip_auteurs", "id_auteur<0", $serveur);
416 416
 		} else {
417 417
 			spip_log("Restaurer copieur id_auteur<0 pour le serveur '$serveur' (aucun autre auteur en base)",
418
-				'dump.' . _LOG_INFO_IMPORTANTE);
418
+				'dump.'._LOG_INFO_IMPORTANTE);
419 419
 			sql_update('spip_auteurs', array('id_auteur' => '-id_auteur'), "id_auteur<0");
420 420
 		}
421 421
 	} else {
422
-		spip_log("Pas de destruction copieur sur serveur '$serveur'", 'dump.' . _LOG_INFO_IMPORTANTE);
422
+		spip_log("Pas de destruction copieur sur serveur '$serveur'", 'dump.'._LOG_INFO_IMPORTANTE);
423 423
 	}
424 424
 }
425 425
 
@@ -453,19 +453,19 @@  discard block
 block discarded – undo
453 453
 			}
454 454
 		} else {
455 455
 			sql_drop_table($table, '', $serveur_dest);
456
-			spip_log("drop table '$table' sur serveur '$serveur_dest'", 'dump.' . _LOG_INFO_IMPORTANTE);
456
+			spip_log("drop table '$table' sur serveur '$serveur_dest'", 'dump.'._LOG_INFO_IMPORTANTE);
457 457
 		}
458 458
 		$desc_dest = false;
459 459
 	}
460 460
 	// si la table n'existe pas dans la destination, la creer a l'identique !
461 461
 	if (!$desc_dest) {
462
-		spip_log("creation '$table' sur serveur '$serveur_dest'", 'dump.' . _LOG_INFO_IMPORTANTE);
462
+		spip_log("creation '$table' sur serveur '$serveur_dest'", 'dump.'._LOG_INFO_IMPORTANTE);
463 463
 		include_spip('base/create');
464 464
 		creer_ou_upgrader_table($table, $desc, 'auto', $upgrade, $serveur_dest);
465 465
 		$desc_dest = sql_showtable($table, true, $serveur_dest);
466 466
 	}
467 467
 	if (!$desc_dest) {
468
-		spip_log("Erreur creation '$table' sur serveur '$serveur_dest'" . var_export($desc, 1), 'dump.' . _LOG_ERREUR);
468
+		spip_log("Erreur creation '$table' sur serveur '$serveur_dest'".var_export($desc, 1), 'dump.'._LOG_ERREUR);
469 469
 	}
470 470
 
471 471
 	return $desc_dest;
@@ -524,16 +524,16 @@  discard block
 block discarded – undo
524 524
 	$racine_fonctions = (isset($options['racine_fonctions_dest']) ? $options['racine_fonctions_dest'] : 'base');
525 525
 	$data_pool = (isset($options['data_pool']) ? $options['data_pool'] : 50 * 1024);
526 526
 
527
-	spip_log("Copier " . count($tables) . " tables de '$serveur_source' vers '$serveur_dest'",
528
-		'dump.' . _LOG_INFO_IMPORTANTE);
527
+	spip_log("Copier ".count($tables)." tables de '$serveur_source' vers '$serveur_dest'",
528
+		'dump.'._LOG_INFO_IMPORTANTE);
529 529
 
530 530
 	if (!$inserer_copie = charger_fonction($fonction_base_inserer, $racine_fonctions, true)) {
531
-		spip_log("Fonction '{$racine_fonctions}_$fonction_base_inserer' inconnue. Abandon", 'dump.' . _LOG_INFO_IMPORTANTE);
531
+		spip_log("Fonction '{$racine_fonctions}_$fonction_base_inserer' inconnue. Abandon", 'dump.'._LOG_INFO_IMPORTANTE);
532 532
 
533 533
 		return true; // echec mais on a fini, donc true
534 534
 	}
535 535
 	if (!$preparer_table_dest = charger_fonction('preparer_table_dest', $racine_fonctions, true)) {
536
-		spip_log("Fonction '{$racine_fonctions}_$preparer_table_dest' inconnue. Abandon", 'dump.' . _LOG_INFO_IMPORTANTE);
536
+		spip_log("Fonction '{$racine_fonctions}_$preparer_table_dest' inconnue. Abandon", 'dump.'._LOG_INFO_IMPORTANTE);
537 537
 
538 538
 		return true; // echec mais on a fini, donc true
539 539
 	}
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 			true)
556 556
 		) {
557 557
 			spip_log("Fonction '{$racine_fonctions}_vider_tables_destination_copie' inconnue. Abandon",
558
-				'dump.' . _LOG_INFO_IMPORTANTE);
558
+				'dump.'._LOG_INFO_IMPORTANTE);
559 559
 
560 560
 			return true; // echec mais on a fini, donc true
561 561
 		}
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 		$tables = array_diff($tables, array('spip_meta'));
574 574
 		$tables[] = 'spip_meta';
575 575
 	}
576
-	spip_log("Tables a copier :" . implode(", ", $tables), 'dump.' . _LOG_INFO);
576
+	spip_log("Tables a copier :".implode(", ", $tables), 'dump.'._LOG_INFO);
577 577
 
578 578
 	$trouver_table = charger_fonction('trouver_table', 'base');
579 579
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 						// mais si ca renvoie false c'est une erreur fatale => abandon
628 628
 						if ($inserer_copie($table, $rows, $desc_dest, $serveur_dest) === false) {
629 629
 							// forcer la sortie, charge a l'appelant de gerer l'echec
630
-							spip_log("Erreur fatale dans $inserer_copie table $table", "dump" . _LOG_ERREUR);
630
+							spip_log("Erreur fatale dans $inserer_copie table $table", "dump"._LOG_ERREUR);
631 631
 							$status['errors'][] = "Erreur fatale  lors de la copie de la table $table";
632 632
 							ecrire_fichier($status_file, serialize($status));
633 633
 
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 					if ($n == $status['tables_copiees'][$table]) {
643 643
 						break;
644 644
 					}
645
-					spip_log("recopie $table " . $status['tables_copiees'][$table], 'dump.' . _LOG_INFO_IMPORTANTE);
645
+					spip_log("recopie $table ".$status['tables_copiees'][$table], 'dump.'._LOG_INFO_IMPORTANTE);
646 646
 					if ($callback_progression) {
647 647
 						$callback_progression($status['tables_copiees'][$table], 0, $table);
648 648
 					}
@@ -653,43 +653,43 @@  discard block
 block discarded – undo
653 653
 				}
654 654
 				if ($drop_source) {
655 655
 					sql_drop_table($table, '', $serveur_source);
656
-					spip_log("drop $table sur serveur source '$serveur_source'", 'dump.' . _LOG_INFO_IMPORTANTE);
656
+					spip_log("drop $table sur serveur source '$serveur_source'", 'dump.'._LOG_INFO_IMPORTANTE);
657 657
 				}
658 658
 				$status['tables_copiees'][$table] = ($status['tables_copiees'][$table] ? -$status['tables_copiees'][$table] : "zero");
659 659
 				ecrire_fichier($status_file, serialize($status));
660
-				spip_log("tables_recopiees " . implode(',', array_keys($status['tables_copiees'])), 'dump.' . _LOG_INFO);
660
+				spip_log("tables_recopiees ".implode(',', array_keys($status['tables_copiees'])), 'dump.'._LOG_INFO);
661 661
 				if ($callback_progression) {
662 662
 					$callback_progression($status['tables_copiees'][$table], $status['tables_copiees'][$table], $table);
663 663
 				}
664 664
 			} else {
665 665
 				if ($status['tables_copiees'][$table] < 0) {
666
-					spip_log("Table $table deja copiee : " . $status['tables_copiees'][$table], "dump." . _LOG_INFO);
666
+					spip_log("Table $table deja copiee : ".$status['tables_copiees'][$table], "dump."._LOG_INFO);
667 667
 				}
668 668
 				if ($callback_progression) {
669 669
 					$callback_progression(0, $status['tables_copiees'][$table],
670
-						"$table" . ((is_numeric($status['tables_copiees'][$table]) and $status['tables_copiees'][$table] >= 0) ? "[Echec]" : ""));
670
+						"$table".((is_numeric($status['tables_copiees'][$table]) and $status['tables_copiees'][$table] >= 0) ? "[Echec]" : ""));
671 671
 				}
672 672
 			}
673 673
 		} else {
674 674
 			$status['errors'][] = "Impossible de lire la description de la table $table";
675 675
 			ecrire_fichier($status_file, serialize($status));
676
-			spip_log("Impossible de lire la description de la table $table", "dump." . _LOG_ERREUR);
676
+			spip_log("Impossible de lire la description de la table $table", "dump."._LOG_ERREUR);
677 677
 		}
678 678
 	}
679 679
 
680 680
 	// si le nombre de tables envoyees n'est pas egal au nombre de tables demandees
681 681
 	// abandonner
682 682
 	if (count($status['tables_copiees']) < count($tables)) {
683
-		spip_log("Nombre de tables copiees incorrect : " . count($status['tables_copiees']) . "/" . count($tables),
684
-			"dump." . _LOG_ERREUR);
685
-		$status['errors'][] = "Nombre de tables copiees incorrect : " . count($status['tables_copiees']) . "/" . count($tables);
683
+		spip_log("Nombre de tables copiees incorrect : ".count($status['tables_copiees'])."/".count($tables),
684
+			"dump."._LOG_ERREUR);
685
+		$status['errors'][] = "Nombre de tables copiees incorrect : ".count($status['tables_copiees'])."/".count($tables);
686 686
 		ecrire_fichier($status_file, serialize($status));
687 687
 	}
688 688
 
689 689
 	if ($detruire_copieur_si_besoin = charger_fonction('detruire_copieur_si_besoin', $racine_fonctions, true)) {
690 690
 		$detruire_copieur_si_besoin($serveur_dest);
691 691
 	} else {
692
-		spip_log("Fonction '{$racine_fonctions}_detruire_copieur_si_besoin' inconnue.", 'dump.' . _LOG_INFO_IMPORTANTE);
692
+		spip_log("Fonction '{$racine_fonctions}_detruire_copieur_si_besoin' inconnue.", 'dump.'._LOG_INFO_IMPORTANTE);
693 693
 	}
694 694
 
695 695
 	// OK, copie complete
@@ -713,8 +713,8 @@  discard block
 block discarded – undo
713 713
 	$r = sql_insertq_multi($table, $rows, $desc_dest, $serveur_dest);
714 714
 	$nb = sql_countsel($table, '', '', '', $serveur_dest);
715 715
 	if ($nb - $nb1 < count($rows)) {
716
-		spip_log("base_inserer_copie : " . ($nb - $nb1) . " insertions au lieu de " . count($rows) . ". On retente 1 par 1",
717
-			"dump" . _LOG_INFO_IMPORTANTE);
716
+		spip_log("base_inserer_copie : ".($nb - $nb1)." insertions au lieu de ".count($rows).". On retente 1 par 1",
717
+			"dump"._LOG_INFO_IMPORTANTE);
718 718
 		foreach ($rows as $row) {
719 719
 			// si l'enregistrement est deja en base, ca fera un echec ou un doublon
720 720
 			$r = sql_insertq($table, $row, $desc_dest, $serveur_dest);
@@ -723,8 +723,8 @@  discard block
 block discarded – undo
723 723
 		$r = 0;
724 724
 		$nb = sql_countsel($table, '', '', '', $serveur_dest);
725 725
 		if ($nb - $nb1 < count($rows)) {
726
-			spip_log("base_inserer_copie : " . ($nb - $nb1) . " insertions au lieu de " . count($rows) . " apres insertion 1 par 1",
727
-				"dump" . _LOG_ERREUR);
726
+			spip_log("base_inserer_copie : ".($nb - $nb1)." insertions au lieu de ".count($rows)." apres insertion 1 par 1",
727
+				"dump"._LOG_ERREUR);
728 728
 			$r = false;
729 729
 		}
730 730
 	}
Please login to merge, or discard this patch.
ecrire/inc/filtres.php 1 patch
Spacing   +146 added lines, -146 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	}
95 95
 
96 96
 	include_fichiers_fonctions();
97
-	foreach (array('filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc) as $f) {
97
+	foreach (array('filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc) as $f) {
98 98
 		trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels
99 99
 		// fonction ou name\space\fonction
100 100
 		if (is_callable($f)) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	// affichage "GIT [master: abcdef]"
188 188
 	$commit = isset($desc['commit_short']) ? $desc['commit_short'] : $desc['commit'];
189 189
 	if ($desc['branch']) {
190
-		$commit = $desc['branch'] . ': ' . $commit;
190
+		$commit = $desc['branch'].': '.$commit;
191 191
 	}
192 192
 	return "{$desc['vcs']} [$commit]";
193 193
 }
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
 	}
207 207
 
208 208
 	// version installee par GIT
209
-	if (lire_fichier($dir . '/.git/HEAD', $c)) {
209
+	if (lire_fichier($dir.'/.git/HEAD', $c)) {
210 210
 		$currentHead = trim(substr($c, 4));
211
-		if (lire_fichier($dir . '/.git/' . $currentHead, $hash)) {
211
+		if (lire_fichier($dir.'/.git/'.$currentHead, $hash)) {
212 212
 			return [
213 213
 				'vcs' => 'GIT',
214 214
 				'branch' => basename($currentHead),
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 		$dir = '.';
236 236
 	}
237 237
 	// version installee par SVN
238
-	if (file_exists($dir . '/.svn/wc.db') && class_exists('SQLite3')) {
239
-		$db = new SQLite3($dir . '/.svn/wc.db');
238
+	if (file_exists($dir.'/.svn/wc.db') && class_exists('SQLite3')) {
239
+		$db = new SQLite3($dir.'/.svn/wc.db');
240 240
 		$result = $db->query('SELECT changed_revision FROM nodes WHERE local_relpath = "" LIMIT 1');
241 241
 		if ($result) {
242 242
 			$row = $result->fetchArray();
@@ -275,11 +275,11 @@  discard block
 block discarded – undo
275 275
 
276 276
 // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images
277 277
 // et laisser passer les fonctions personnelles baptisees image_...
278
-$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php';
279
-$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php';
280
-$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php';
281
-$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php';
282
-$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php';
278
+$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php';
279
+$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php';
280
+$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php';
281
+$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php';
282
+$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php';
283 283
 
284 284
 $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php';
285 285
 $GLOBALS['spip_matrice']['couleur_foncer'] = 'inc/filtres_images_mini.php';
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
  */
437 437
 function filtre_debug($val, $key = null) {
438 438
 	$debug = (
439
-		is_null($key) ? '' : (var_export($key, true) . " = ")
440
-		) . var_export($val, true);
439
+		is_null($key) ? '' : (var_export($key, true)." = ")
440
+		).var_export($val, true);
441 441
 
442 442
 	include_spip('inc/autoriser');
443 443
 	if (autoriser('webmestre')) {
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 						if (preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match)) {
526 526
 							$srcover = $match[1];
527 527
 							array_shift($args);
528
-							array_unshift($args, "<img src='" . $match[1] . "' />");
528
+							array_unshift($args, "<img src='".$match[1]."' />");
529 529
 							$srcover_filter = call_user_func_array($filtre, $args);
530 530
 							$srcover_filter = extraire_attribut($srcover_filter, 'src');
531 531
 							$reduit = str_replace($srcover, $srcover_filter, $reduit);
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 	// " -> &quot; et tout ce genre de choses
876 876
 	$u = $GLOBALS['meta']['pcre_u'];
877 877
 	$texte = str_replace("&nbsp;", " ", $texte);
878
-	$texte = preg_replace('/\s{2,}/S' . $u, " ", $texte);
878
+	$texte = preg_replace('/\s{2,}/S'.$u, " ", $texte);
879 879
 	// ne pas echapper les sinqle quotes car certains outils de syndication gerent mal
880 880
 	$texte = entites_html($texte, false, false);
881 881
 	// mais bien echapper les double quotes !
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
  **/
936 936
 function supprimer_numero($texte) {
937 937
 	return preg_replace(
938
-		",^[[:space:]]*([0-9]+)([.)]|" . chr(194) . '?' . chr(176) . ")[[:space:]]+,S",
938
+		",^[[:space:]]*([0-9]+)([.)]|".chr(194).'?'.chr(176).")[[:space:]]+,S",
939 939
 		"", $texte);
940 940
 }
941 941
 
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
  **/
961 961
 function recuperer_numero($texte) {
962 962
 	if (preg_match(
963
-		",^[[:space:]]*([0-9]+)([.)]|" . chr(194) . '?' . chr(176) . ")[[:space:]]+,S",
963
+		",^[[:space:]]*([0-9]+)([.)]|".chr(194).'?'.chr(176).")[[:space:]]+,S",
964 964
 		$texte, $regs)) {
965 965
 		return strval($regs[1]);
966 966
 	} else {
@@ -1045,8 +1045,8 @@  discard block
 block discarded – undo
1045 1045
  **/
1046 1046
 function textebrut($texte) {
1047 1047
 	$u = $GLOBALS['meta']['pcre_u'];
1048
-	$texte = preg_replace('/\s+/S' . $u, " ", $texte);
1049
-	$texte = preg_replace("/<(p|br)( [^>]*)?" . ">/iS", "\n\n", $texte);
1048
+	$texte = preg_replace('/\s+/S'.$u, " ", $texte);
1049
+	$texte = preg_replace("/<(p|br)( [^>]*)?".">/iS", "\n\n", $texte);
1050 1050
 	$texte = preg_replace("/^\n+/", "", $texte);
1051 1051
 	$texte = preg_replace("/\n+$/", "", $texte);
1052 1052
 	$texte = preg_replace("/\n +/", "\n", $texte);
@@ -1074,7 +1074,7 @@  discard block
 block discarded – undo
1074 1074
 	if (preg_match_all(",(<a\s+[^>]*https?://[^>]*class=[\"']spip_(out|url)\b[^>]+>),imsS",
1075 1075
 		$texte, $liens, PREG_PATTERN_ORDER)) {
1076 1076
 		foreach ($liens[0] as $a) {
1077
-			$rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel');
1077
+			$rel = 'noopener noreferrer '.extraire_attribut($a, 'rel');
1078 1078
 			$ablank = inserer_attribut($a, 'rel', $rel);
1079 1079
 			$ablank = inserer_attribut($ablank, 'target', '_blank');
1080 1080
 			$texte = str_replace($a, $ablank, $texte);
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
 		foreach ($regs[0] as $a) {
1100 1100
 			$rel = extraire_attribut($a, "rel");
1101 1101
 			if (strpos($rel, "nofollow") === false) {
1102
-				$rel = "nofollow" . ($rel ? " $rel" : "");
1102
+				$rel = "nofollow".($rel ? " $rel" : "");
1103 1103
 				$anofollow = inserer_attribut($a, "rel", $rel);
1104 1104
 				$texte = str_replace($a, $anofollow, $texte);
1105 1105
 			}
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
 	$u = $GLOBALS['meta']['pcre_u'];
1129 1129
 	$texte = preg_replace("@</p>@iS", "\n", $texte);
1130 1130
 	$texte = preg_replace("@<p\b.*>@UiS", "<br />", $texte);
1131
-	$texte = preg_replace("@^\s*<br />@S" . $u, "", $texte);
1131
+	$texte = preg_replace("@^\s*<br />@S".$u, "", $texte);
1132 1132
 
1133 1133
 	return $texte;
1134 1134
 }
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
 		return $texte;
1159 1159
 	}
1160 1160
 	include_spip('inc/texte');
1161
-	$tag = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $texte) ?
1161
+	$tag = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $texte) ?
1162 1162
 		'div' : 'span';
1163 1163
 
1164 1164
 	return "<$tag style='word-wrap:break-word;'>$texte</$tag>";
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
 function attribut_html($texte, $textebrut = true) {
1268 1268
 	$u = $GLOBALS['meta']['pcre_u'];
1269 1269
 	if ($textebrut) {
1270
-		$texte = preg_replace(array(",\n,", ",\s(?=\s),msS" . $u), array(" ", ""), textebrut($texte));
1270
+		$texte = preg_replace(array(",\n,", ",\s(?=\s),msS".$u), array(" ", ""), textebrut($texte));
1271 1271
 	}
1272 1272
 	$texte = texte_backend($texte);
1273 1273
 	$texte = str_replace(array("'", '"'), array('&#039;', '&#034;'), $texte);
@@ -1296,7 +1296,7 @@  discard block
 block discarded – undo
1296 1296
 	# un message pour abs_url
1297 1297
 	$GLOBALS['mode_abs_url'] = 'url';
1298 1298
 	$url = trim($url);
1299
-	$r = ",^(?:" . _PROTOCOLES_STD . '):?/?/?$,iS';
1299
+	$r = ",^(?:"._PROTOCOLES_STD.'):?/?/?$,iS';
1300 1300
 
1301 1301
 	return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url);
1302 1302
 }
@@ -1498,14 +1498,14 @@  discard block
 block discarded – undo
1498 1498
 	if (strpos($texte, "<") !== false) {
1499 1499
 		include_spip('inc/lien');
1500 1500
 		if (defined('_PREG_MODELE')) {
1501
-			$preg_modeles = "@" . _PREG_MODELE . "@imsS";
1501
+			$preg_modeles = "@"._PREG_MODELE."@imsS";
1502 1502
 			$texte = echappe_html($texte, '', true, $preg_modeles);
1503 1503
 		}
1504 1504
 	}
1505 1505
 
1506 1506
 	$debut = '';
1507 1507
 	$suite = $texte;
1508
-	while ($t = strpos('-' . $suite, "\n", 1)) {
1508
+	while ($t = strpos('-'.$suite, "\n", 1)) {
1509 1509
 		$debut .= substr($suite, 0, $t - 1);
1510 1510
 		$suite = substr($suite, $t);
1511 1511
 		$car = substr($suite, 0, 1);
@@ -1522,11 +1522,11 @@  discard block
 block discarded – undo
1522 1522
 			$suite = substr($suite, strlen($regs[0]));
1523 1523
 		}
1524 1524
 	}
1525
-	$texte = $debut . $suite;
1525
+	$texte = $debut.$suite;
1526 1526
 
1527 1527
 	$texte = echappe_retour($texte);
1528 1528
 
1529
-	return $texte . $fin;
1529
+	return $texte.$fin;
1530 1530
 }
1531 1531
 
1532 1532
 
@@ -1587,7 +1587,7 @@  discard block
 block discarded – undo
1587 1587
 		}
1588 1588
 
1589 1589
 		foreach ($regs as $reg) {
1590
-			$cle = ($reg[1] ? $reg[1] . ':' : '') . $reg[2];
1590
+			$cle = ($reg[1] ? $reg[1].':' : '').$reg[2];
1591 1591
 			$desc = $traduire($cle, $lang, true);
1592 1592
 			$l = $desc->langue;
1593 1593
 			// si pas de traduction, on laissera l'écriture de l'idiome entier dans le texte.
@@ -1700,7 +1700,7 @@  discard block
 block discarded – undo
1700 1700
 					// il ne faut pas echapper en div si propre produit un seul paragraphe
1701 1701
 					include_spip('inc/texte');
1702 1702
 					$trad_propre = preg_replace(",(^<p[^>]*>|</p>$),Uims", "", propre($trad));
1703
-					$mode = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $trad_propre) ? 'div' : 'span';
1703
+					$mode = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $trad_propre) ? 'div' : 'span';
1704 1704
 					$trad = code_echappement($trad, 'multi', false, $mode);
1705 1705
 					$trad = str_replace("'", '"', inserer_attribut($trad, 'lang', $l));
1706 1706
 					if (lang_dir($l) !== lang_dir($lang)) {
@@ -1893,7 +1893,7 @@  discard block
 block discarded – undo
1893 1893
 	if (is_array($balise)) {
1894 1894
 		array_walk(
1895 1895
 			$balise,
1896
-			function(&$a, $key, $t){
1896
+			function(&$a, $key, $t) {
1897 1897
 				$a = extraire_attribut($a, $t);
1898 1898
 			},
1899 1899
 			$attribut
@@ -1980,14 +1980,14 @@  discard block
 block discarded – undo
1980 1980
 
1981 1981
 	if ($old !== null) {
1982 1982
 		// Remplacer l'ancien attribut du meme nom
1983
-		$balise = $r[1] . $insert . $r[5];
1983
+		$balise = $r[1].$insert.$r[5];
1984 1984
 	} else {
1985 1985
 		// preferer une balise " />" (comme <img />)
1986 1986
 		if (preg_match(',/>,', $balise)) {
1987
-			$balise = preg_replace(",\s?/>,S", $insert . " />", $balise, 1);
1987
+			$balise = preg_replace(",\s?/>,S", $insert." />", $balise, 1);
1988 1988
 		} // sinon une balise <a ...> ... </a>
1989 1989
 		else {
1990
-			$balise = preg_replace(",\s?>,S", $insert . ">", $balise, 1);
1990
+			$balise = preg_replace(",\s?>,S", $insert.">", $balise, 1);
1991 1991
 		}
1992 1992
 	}
1993 1993
 
@@ -2029,8 +2029,8 @@  discard block
 block discarded – undo
2029 2029
 //
2030 2030
 // Quelques fonctions de calcul arithmetique
2031 2031
 //
2032
-function floatstr($a) { return str_replace(',','.',(string)floatval($a)); }
2033
-function strize($f, $a, $b) { return floatstr($f(floatstr($a),floatstr($b))); }
2032
+function floatstr($a) { return str_replace(',', '.', (string) floatval($a)); }
2033
+function strize($f, $a, $b) { return floatstr($f(floatstr($a), floatstr($b))); }
2034 2034
 
2035 2035
 /**
2036 2036
  * Additionne 2 nombres
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
 function plus($a, $b) {
2051 2051
 	return $a + $b;
2052 2052
 }
2053
-function strplus($a, $b) {return strize('plus', $a, $b);}
2053
+function strplus($a, $b) {return strize('plus', $a, $b); }
2054 2054
 /**
2055 2055
  * Soustrait 2 nombres
2056 2056
  *
@@ -2069,7 +2069,7 @@  discard block
 block discarded – undo
2069 2069
 function moins($a, $b) {
2070 2070
 	return $a - $b;
2071 2071
 }
2072
-function strmoins($a, $b) {return strize('moins', $a, $b);}
2072
+function strmoins($a, $b) {return strize('moins', $a, $b); }
2073 2073
 
2074 2074
 /**
2075 2075
  * Multiplie 2 nombres
@@ -2090,7 +2090,7 @@  discard block
 block discarded – undo
2090 2090
 function mult($a, $b) {
2091 2091
 	return $a * $b;
2092 2092
 }
2093
-function strmult($a, $b) {return strize('mult', $a, $b);}
2093
+function strmult($a, $b) {return strize('mult', $a, $b); }
2094 2094
 
2095 2095
 /**
2096 2096
  * Divise 2 nombres
@@ -2111,7 +2111,7 @@  discard block
 block discarded – undo
2111 2111
 function div($a, $b) {
2112 2112
 	return $b ? $a / $b : 0;
2113 2113
 }
2114
-function strdiv($a, $b) {return strize('div', $a, $b);}
2114
+function strdiv($a, $b) {return strize('div', $a, $b); }
2115 2115
 
2116 2116
 /**
2117 2117
  * Retourne le modulo 2 nombres
@@ -2152,13 +2152,13 @@  discard block
 block discarded – undo
2152 2152
 	if (!defined('_TAGS_NOM_AUTEUR')) {
2153 2153
 		define('_TAGS_NOM_AUTEUR', '');
2154 2154
 	}
2155
-	$tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR));
2155
+	$tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR));
2156 2156
 	foreach ($tags_acceptes as $tag) {
2157 2157
 		if (strlen($tag)) {
2158
-			$remp1[] = '<' . trim($tag) . '>';
2159
-			$remp1[] = '</' . trim($tag) . '>';
2160
-			$remp2[] = '\x60' . trim($tag) . '\x61';
2161
-			$remp2[] = '\x60/' . trim($tag) . '\x61';
2158
+			$remp1[] = '<'.trim($tag).'>';
2159
+			$remp1[] = '</'.trim($tag).'>';
2160
+			$remp2[] = '\x60'.trim($tag).'\x61';
2161
+			$remp2[] = '\x60/'.trim($tag).'\x61';
2162 2162
 		}
2163 2163
 	}
2164 2164
 	$v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom)));
@@ -2221,7 +2221,7 @@  discard block
 block discarded – undo
2221 2221
 			$s[] = preg_replace(',>[^<]+</a>,S',
2222 2222
 				'>'
2223 2223
 				. http_img_pack('attachment-16.png', $t,
2224
-					'title="' . attribut_html($t) . '"')
2224
+					'title="'.attribut_html($t).'"')
2225 2225
 				. '</a>', $tag);
2226 2226
 		}
2227 2227
 	}
@@ -2282,10 +2282,10 @@  discard block
 block discarded – undo
2282 2282
 	$fichier = basename($url);
2283 2283
 
2284 2284
 	return '<a rel="enclosure"'
2285
-	. ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '')
2286
-	. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2287
-	. ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '')
2288
-	. '>' . $fichier . '</a>';
2285
+	. ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '')
2286
+	. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2287
+	. ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '')
2288
+	. '>'.$fichier.'</a>';
2289 2289
 }
2290 2290
 
2291 2291
 /**
@@ -2313,9 +2313,9 @@  discard block
 block discarded – undo
2313 2313
 			} # vieux data
2314 2314
 			$fichier = basename($url);
2315 2315
 			$enclosures[] = '<enclosure'
2316
-				. ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '')
2317
-				. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2318
-				. ($length ? ' length="' . $length . '"' : '')
2316
+				. ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '')
2317
+				. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2318
+				. ($length ? ' length="'.$length.'"' : '')
2319 2319
 				. ' />';
2320 2320
 		}
2321 2321
 	}
@@ -2341,7 +2341,7 @@  discard block
 block discarded – undo
2341 2341
 		if (extraire_attribut($e, rel) == 'tag') {
2342 2342
 			$subjects .= '<dc:subject>'
2343 2343
 				. texte_backend(textebrut($e))
2344
-				. '</dc:subject>' . "\n";
2344
+				. '</dc:subject>'."\n";
2345 2345
 		}
2346 2346
 	}
2347 2347
 
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
 	if (is_array($texte)) {
2378 2378
 		array_walk(
2379 2379
 			$texte,
2380
-			function(&$a, $key, $t){
2380
+			function(&$a, $key, $t) {
2381 2381
 				$a = extraire_balise($a, $t);
2382 2382
 			},
2383 2383
 			$tag
@@ -2421,7 +2421,7 @@  discard block
 block discarded – undo
2421 2421
 	if (is_array($texte)) {
2422 2422
 		array_walk(
2423 2423
 			$texte,
2424
-			function(&$a, $key, $t){
2424
+			function(&$a, $key, $t) {
2425 2425
 				$a = extraire_balises($a, $t);
2426 2426
 			},
2427 2427
 			$tag
@@ -2547,7 +2547,7 @@  discard block
 block discarded – undo
2547 2547
 		if ($fond != '404') {
2548 2548
 			$contexte = array_shift($p);
2549 2549
 			$contexte['page'] = $fond;
2550
-			$action = preg_replace('/([?]' . preg_quote($fond) . '[^&=]*[0-9]+)(&|$)/', '?&', $action);
2550
+			$action = preg_replace('/([?]'.preg_quote($fond).'[^&=]*[0-9]+)(&|$)/', '?&', $action);
2551 2551
 		}
2552 2552
 	}
2553 2553
 	// defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url
@@ -2602,9 +2602,9 @@  discard block
 block discarded – undo
2602 2602
 			. '"'
2603 2603
 			. (is_null($val)
2604 2604
 				? ''
2605
-				: ' value="' . entites_html($val) . '"'
2605
+				: ' value="'.entites_html($val).'"'
2606 2606
 			)
2607
-			. ' type="hidden"' . "\n/>";
2607
+			. ' type="hidden"'."\n/>";
2608 2608
 	}
2609 2609
 
2610 2610
 	return join("", $hidden);
@@ -2767,12 +2767,12 @@  discard block
 block discarded – undo
2767 2767
 	if ($pas < 1) {
2768 2768
 		return '';
2769 2769
 	}
2770
-	$ancre = 'pagination' . $nom; // #pagination_articles
2771
-	$debut = 'debut' . $nom; // 'debut_articles'
2770
+	$ancre = 'pagination'.$nom; // #pagination_articles
2771
+	$debut = 'debut'.$nom; // 'debut_articles'
2772 2772
 
2773 2773
 	// n'afficher l'ancre qu'une fois
2774 2774
 	if (!isset($ancres[$ancre])) {
2775
-		$bloc_ancre = $ancres[$ancre] = "<a name='" . $ancre . "' id='" . $ancre . "'></a>";
2775
+		$bloc_ancre = $ancres[$ancre] = "<a name='".$ancre."' id='".$ancre."'></a>";
2776 2776
 	} else {
2777 2777
 		$bloc_ancre = '';
2778 2778
 	}
@@ -2803,7 +2803,7 @@  discard block
 block discarded – undo
2803 2803
 	}
2804 2804
 
2805 2805
 	if ($modele) {
2806
-		$modele = '_' . $modele;
2806
+		$modele = '_'.$modele;
2807 2807
 	}
2808 2808
 
2809 2809
 	return recuperer_fond("modeles/pagination$modele", $pagination, array('trim' => true), $connect);
@@ -2828,7 +2828,7 @@  discard block
 block discarded – undo
2828 2828
 	return preg_replace_callback(
2829 2829
 		",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims",
2830 2830
 		function($x) use ($path) {
2831
-			return "url('" . suivre_lien($path, $x[1]) . "')";
2831
+			return "url('".suivre_lien($path, $x[1])."')";
2832 2832
 		},
2833 2833
 		$contenu
2834 2834
 	);
@@ -2890,14 +2890,14 @@  discard block
 block discarded – undo
2890 2890
 	) {
2891 2891
 		$distant = true;
2892 2892
 		$cssf = parse_url($css);
2893
-		$cssf = $cssf['path'] . ($cssf['query'] ? "?" . $cssf['query'] : "");
2893
+		$cssf = $cssf['path'].($cssf['query'] ? "?".$cssf['query'] : "");
2894 2894
 		$cssf = preg_replace(',[?:&=],', "_", $cssf);
2895 2895
 	} else {
2896 2896
 		$distant = false;
2897 2897
 		$cssf = $css;
2898 2898
 		// 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi
2899 2899
 		//propose (rien a faire dans ce cas)
2900
-		$f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css);
2900
+		$f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css);
2901 2901
 		if (@file_exists($f)) {
2902 2902
 			return $f;
2903 2903
 		}
@@ -2907,7 +2907,7 @@  discard block
 block discarded – undo
2907 2907
 	$dir_var = sous_repertoire(_DIR_VAR, 'cache-css');
2908 2908
 	$f = $dir_var
2909 2909
 		. preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf)
2910
-		. '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css';
2910
+		. '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css';
2911 2911
 
2912 2912
 	// la css peut etre distante (url absolue !)
2913 2913
 	if ($distant) {
@@ -2952,8 +2952,8 @@  discard block
 block discarded – undo
2952 2952
 		} // si la css_direction commence par $dir_var on la fait passer pour une absolue
2953 2953
 		elseif (substr($css_direction, 0, strlen($dir_var)) == $dir_var) {
2954 2954
 			$css_direction = substr($css_direction, strlen($dir_var));
2955
-			$src_faux_abs["/@@@@@@/" . $css_direction] = $css_direction;
2956
-			$css_direction = "/@@@@@@/" . $css_direction;
2955
+			$src_faux_abs["/@@@@@@/".$css_direction] = $css_direction;
2956
+			$css_direction = "/@@@@@@/".$css_direction;
2957 2957
 		}
2958 2958
 		$src[] = $regs[0][$k];
2959 2959
 		$src_direction_css[] = str_replace($import_css, $css_direction, $regs[0][$k]);
@@ -3002,7 +3002,7 @@  discard block
 block discarded – undo
3002 3002
 
3003 3003
 	$f = basename($css, '.css');
3004 3004
 	$f = sous_repertoire(_DIR_VAR, 'cache-css')
3005
-		. preg_replace(",(.*?)(_rtl|_ltr)?$,", "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f)
3005
+		. preg_replace(",(.*?)(_rtl|_ltr)?$,", "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f)
3006 3006
 		. '.css';
3007 3007
 
3008 3008
 	if ((@filemtime($f) > @filemtime($css)) and (_VAR_MODE != 'recalcul')) {
@@ -3011,7 +3011,7 @@  discard block
 block discarded – undo
3011 3011
 
3012 3012
 	if ($url_absolue_css == $css) {
3013 3013
 		if (strncmp($GLOBALS['meta']['adresse_site'], $css, $l = strlen($GLOBALS['meta']['adresse_site'])) != 0
3014
-			or !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu)
3014
+			or !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu)
3015 3015
 		) {
3016 3016
 			include_spip('inc/distant');
3017 3017
 			if (!$contenu = recuperer_page($css)) {
@@ -3121,7 +3121,7 @@  discard block
 block discarded – undo
3121 3121
 	$expression = str_replace("\/", "/", $expression);
3122 3122
 	$expression = str_replace("/", "\/", $expression);
3123 3123
 
3124
-	if (preg_match('/' . $expression . '/' . $modif, $texte, $r)) {
3124
+	if (preg_match('/'.$expression.'/'.$modif, $texte, $r)) {
3125 3125
 		if (isset($r[$capte])) {
3126 3126
 			return $r[$capte];
3127 3127
 		} else {
@@ -3159,7 +3159,7 @@  discard block
 block discarded – undo
3159 3159
 	$expression = str_replace("\/", "/", $expression);
3160 3160
 	$expression = str_replace("/", "\/", $expression);
3161 3161
 
3162
-	return preg_replace('/' . $expression . '/' . $modif, $replace, $texte);
3162
+	return preg_replace('/'.$expression.'/'.$modif, $replace, $texte);
3163 3163
 }
3164 3164
 
3165 3165
 
@@ -3178,7 +3178,7 @@  discard block
 block discarded – undo
3178 3178
 function traiter_doublons_documents(&$doublons, $letexte) {
3179 3179
 
3180 3180
 	// Verifier dans le texte & les notes (pas beau, helas)
3181
-	$t = $letexte . $GLOBALS['les_notes'];
3181
+	$t = $letexte.$GLOBALS['les_notes'];
3182 3182
 
3183 3183
 	if (strstr($t, 'spip_document_') // evite le preg_match_all si inutile
3184 3184
 		and preg_match_all(
@@ -3188,7 +3188,7 @@  discard block
 block discarded – undo
3188 3188
 		if (!isset($doublons['documents'])) {
3189 3189
 			$doublons['documents'] = "";
3190 3190
 		}
3191
-		$doublons['documents'] .= "," . join(',', $matches[1]);
3191
+		$doublons['documents'] .= ",".join(',', $matches[1]);
3192 3192
 	}
3193 3193
 
3194 3194
 	return $letexte;
@@ -3245,7 +3245,7 @@  discard block
 block discarded – undo
3245 3245
 	if ($env) {
3246 3246
 		foreach ($env as $i => $j) {
3247 3247
 			if (is_string($j) and !in_array($i, $ignore_params)) {
3248
-				$texte .= "<param name='" . attribut_html($i) . "'\n\tvalue='" . attribut_html($j) . "' />";
3248
+				$texte .= "<param name='".attribut_html($i)."'\n\tvalue='".attribut_html($j)."' />";
3249 3249
 			}
3250 3250
 		}
3251 3251
 	}
@@ -3284,7 +3284,7 @@  discard block
 block discarded – undo
3284 3284
 	if ($env) {
3285 3285
 		foreach ($env as $i => $j) {
3286 3286
 			if (is_string($j) and !in_array($i, $ignore_params)) {
3287
-				$texte .= attribut_html($i) . "='" . attribut_html($j) . "' ";
3287
+				$texte .= attribut_html($i)."='".attribut_html($j)."' ";
3288 3288
 			}
3289 3289
 		}
3290 3290
 	}
@@ -3368,19 +3368,19 @@  discard block
 block discarded – undo
3368 3368
 
3369 3369
 	$img_file = $img;
3370 3370
 	if ($p = strpos($img_file, '?')) {
3371
-		$img_file = substr($img_file,0, $p);
3371
+		$img_file = substr($img_file, 0, $p);
3372 3372
 	}
3373 3373
 	if (!isset($options['chemin_image']) or $options['chemin_image'] == true) {
3374 3374
 		$img_file = chemin_image($img);
3375 3375
 	}
3376 3376
 	else {
3377
-		if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true){
3377
+		if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true) {
3378 3378
 			// on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
3379 3379
 			// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
3380 3380
 			if (preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m)
3381
-			  and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . "-xx.svg"
3381
+			  and $variante_svg_generique = substr($img_file, 0, -strlen($m[0]))."-xx.svg"
3382 3382
 			  and file_exists($variante_svg_generique)) {
3383
-				if ($variante_svg_size = substr($variante_svg_generique,0,-6) . $m[1] . ".svg" and file_exists($variante_svg_size)) {
3383
+				if ($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].".svg" and file_exists($variante_svg_size)) {
3384 3384
 					$img_file = $variante_svg_size;
3385 3385
 				}
3386 3386
 				else {
@@ -3405,15 +3405,15 @@  discard block
 block discarded – undo
3405 3405
 				return "";
3406 3406
 			}
3407 3407
 		}
3408
-		$atts .= " width='" . $largeur . "' height='" . $hauteur . "'";
3408
+		$atts .= " width='".$largeur."' height='".$hauteur."'";
3409 3409
 	}
3410 3410
 
3411 3411
 	if (file_exists($img_file)) {
3412 3412
 		$img_file = timestamp($img_file);
3413 3413
 	}
3414
-	return "<img src='$img_file' alt='" . attribut_html($alt ? $alt : $title) . "'"
3415
-	. ($title ? ' title="' . attribut_html($title) . '"' : '')
3416
-	. " " . ltrim($atts)
3414
+	return "<img src='$img_file' alt='".attribut_html($alt ? $alt : $title)."'"
3415
+	. ($title ? ' title="'.attribut_html($title).'"' : '')
3416
+	. " ".ltrim($atts)
3417 3417
 	. " />";
3418 3418
 }
3419 3419
 
@@ -3425,12 +3425,12 @@  discard block
 block discarded – undo
3425 3425
  * @param string $size
3426 3426
  * @return string
3427 3427
  */
3428
-function http_style_background($img, $att = '', $size=null) {
3429
-	if ($size and is_numeric($size)){
3430
-		$size = trim($size) . "px";
3428
+function http_style_background($img, $att = '', $size = null) {
3429
+	if ($size and is_numeric($size)) {
3430
+		$size = trim($size)."px";
3431 3431
 	}
3432
-	return " style='background" .
3433
-		($att ? "" : "-image") . ": url(\"" . chemin_image($img) . "\")" . ($att ? (' ' . $att) : '') . ";"
3432
+	return " style='background".
3433
+		($att ? "" : "-image").": url(\"".chemin_image($img)."\")".($att ? (' '.$att) : '').";"
3434 3434
 		. ($size ? "background-size:{$size};" : '')
3435 3435
 		. "'";
3436 3436
 }
@@ -3447,8 +3447,8 @@  discard block
 block discarded – undo
3447 3447
  * @return string
3448 3448
  *     Code HTML de la balise IMG
3449 3449
  */
3450
-function filtre_balise_img_dist($img, $alt = "", $class = "", $width=null) {
3451
-	$atts = $class ? " class='" . attribut_html($class) . "'" : '';
3450
+function filtre_balise_img_dist($img, $alt = "", $class = "", $width = null) {
3451
+	$atts = $class ? " class='".attribut_html($class)."'" : '';
3452 3452
 	// ecriture courte : on donne le width en 2e arg
3453 3453
 	if (empty($width) and is_numeric($alt)) {
3454 3454
 		$width = $alt;
@@ -3476,7 +3476,7 @@  discard block
 block discarded – undo
3476 3476
 function filtre_balise_svg_dist($img, $alt = "", $class = "") {
3477 3477
 	$img_file = $img;
3478 3478
 	if ($p = strpos($img_file, '?')) {
3479
-		$img_file = substr($img_file,0, $p);
3479
+		$img_file = substr($img_file, 0, $p);
3480 3480
 	}
3481 3481
 
3482 3482
 	if (!$img_file or !$svg = file_get_contents($img_file)) {
@@ -3490,18 +3490,18 @@  discard block
 block discarded – undo
3490 3490
 	$balise_svg_source = $balise_svg;
3491 3491
 
3492 3492
 	// entete XML à supprimer
3493
-	$svg = preg_replace(',^\s*<\?xml[^>]*\?' . '>,', '', $svg);
3493
+	$svg = preg_replace(',^\s*<\?xml[^>]*\?'.'>,', '', $svg);
3494 3494
 
3495 3495
 	// IE est toujours mon ami
3496 3496
 	$balise_svg = inserer_attribut($balise_svg, 'focusable', 'false');
3497 3497
 	if ($class) {
3498 3498
 		$balise_svg = inserer_attribut($balise_svg, 'class', $class);
3499 3499
 	}
3500
-	if ($alt){
3500
+	if ($alt) {
3501 3501
 		$balise_svg = inserer_attribut($balise_svg, 'role', 'img');
3502
-		$id = "img-svg-title-" . substr(md5("$img_file:$svg:$alt"),0,4);
3502
+		$id = "img-svg-title-".substr(md5("$img_file:$svg:$alt"), 0, 4);
3503 3503
 		$balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id);
3504
-		$title = "<title id=\"$id\">" . entites_html($alt)."</title>\n";
3504
+		$title = "<title id=\"$id\">".entites_html($alt)."</title>\n";
3505 3505
 		$balise_svg .= $title;
3506 3506
 	}
3507 3507
 	else {
@@ -3535,7 +3535,7 @@  discard block
 block discarded – undo
3535 3535
 	$texte = '';
3536 3536
 	if (is_array($tableau)) {
3537 3537
 		foreach ($tableau as $k => $v) {
3538
-			$res = recuperer_fond('modeles/' . $modele,
3538
+			$res = recuperer_fond('modeles/'.$modele,
3539 3539
 				array_merge(array('cle' => $k), (is_array($v) ? $v : array('valeur' => $v)))
3540 3540
 			);
3541 3541
 			$texte .= $res;
@@ -3712,7 +3712,7 @@  discard block
 block discarded – undo
3712 3712
 	}
3713 3713
 
3714 3714
 	$c = serialize($c);
3715
-	$cle = calculer_cle_action($form . $c);
3715
+	$cle = calculer_cle_action($form.$c);
3716 3716
 	$c = "$cle:$c";
3717 3717
 
3718 3718
 	// on ne stocke pas les contextes dans des fichiers en cache
@@ -3774,15 +3774,15 @@  discard block
 block discarded – undo
3774 3774
 	}
3775 3775
 	// toujours encoder l'url source dans le bloc ajax
3776 3776
 	$r = self();
3777
-	$r = ' data-origin="' . $r . '"';
3777
+	$r = ' data-origin="'.$r.'"';
3778 3778
 	$class = 'ajaxbloc';
3779 3779
 	if ($ajaxid and is_string($ajaxid)) {
3780 3780
 		// ajaxid est normalement conforme a un nom de classe css
3781 3781
 		// on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution
3782
-		$class .= ' ajax-id-' . entites_html($ajaxid);
3782
+		$class .= ' ajax-id-'.entites_html($ajaxid);
3783 3783
 	}
3784 3784
 
3785
-	return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
3785
+	return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
3786 3786
 }
3787 3787
 
3788 3788
 /**
@@ -3821,11 +3821,11 @@  discard block
 block discarded – undo
3821 3821
 	// extraire la signature en debut de contexte
3822 3822
 	// et la verifier avant de deserializer
3823 3823
 	// format : signature:donneesserializees
3824
-	if ($p = strpos($c,":")){
3825
-		$cle = substr($c,0,$p);
3826
-		$c = substr($c,$p+1);
3824
+	if ($p = strpos($c, ":")) {
3825
+		$cle = substr($c, 0, $p);
3826
+		$c = substr($c, $p + 1);
3827 3827
 
3828
-		if ($cle == calculer_cle_action($form . $c)) {
3828
+		if ($cle == calculer_cle_action($form.$c)) {
3829 3829
 			$env = @unserialize($c);
3830 3830
 			return $env;
3831 3831
 		}
@@ -3926,9 +3926,9 @@  discard block
 block discarded – undo
3926 3926
 	} else {
3927 3927
 		$bal = 'a';
3928 3928
 		$att = "href='$url'"
3929
-			. ($title ? " title='" . attribut_html($title) . "'" : '')
3930
-			. ($class ? " class='" . attribut_html($class) . "'" : '')
3931
-			. ($rel ? " rel='" . attribut_html($rel) . "'" : '')
3929
+			. ($title ? " title='".attribut_html($title)."'" : '')
3930
+			. ($class ? " class='".attribut_html($class)."'" : '')
3931
+			. ($rel ? " rel='".attribut_html($rel)."'" : '')
3932 3932
 			. $evt;
3933 3933
 	}
3934 3934
 	if ($libelle === null) {
@@ -4003,7 +4003,7 @@  discard block
 block discarded – undo
4003 4003
 	}
4004 4004
 
4005 4005
 	// ajouter le type d'objet dans la class de l'icone
4006
-	$class .= " " . substr(basename($fond), 0, -4);
4006
+	$class .= " ".substr(basename($fond), 0, -4);
4007 4007
 
4008 4008
 	$alt = attribut_html($texte);
4009 4009
 	$title = " title=\"$alt\""; // est-ce pertinent de doubler le alt par un title ?
@@ -4027,7 +4027,7 @@  discard block
 block discarded – undo
4027 4027
 	}
4028 4028
 
4029 4029
 	$icone = http_img_pack($fond, $alt, "width='$size' height='$size'");
4030
-	$icone = "<span class=\"icone-image".($fonction ? " icone-fonction icone-fonction-$fonction" : "") . "\">$icone</span>";
4030
+	$icone = "<span class=\"icone-image".($fonction ? " icone-fonction icone-fonction-$fonction" : "")."\">$icone</span>";
4031 4031
 
4032 4032
 	if ($type == 'lien') {
4033 4033
 		return "<span class='icone s$size $class'>"
@@ -4257,13 +4257,13 @@  discard block
 block discarded – undo
4257 4257
 	$res = "";
4258 4258
 	foreach ($boutons as $page => $detail) {
4259 4259
 		if ($detail->icone and strlen(trim($detail->icone))) {
4260
-			$res .= "\n.navigation_avec_icones #bando1_$page {background-image:url(" . $detail->icone . ");}";
4260
+			$res .= "\n.navigation_avec_icones #bando1_$page {background-image:url(".$detail->icone.");}";
4261 4261
 		}
4262 4262
 		$selecteur = (in_array($page, array('outils_rapides', 'outils_collaboratifs')) ? "" : ".navigation_avec_icones ");
4263 4263
 		if (is_array($detail->sousmenu)) {
4264 4264
 			foreach ($detail->sousmenu as $souspage => $sousdetail) {
4265 4265
 				if ($sousdetail->icone and strlen(trim($sousdetail->icone))) {
4266
-					$res .= "\n$selecteur.bando2_$souspage {background-image:url(" . $sousdetail->icone . ");}";
4266
+					$res .= "\n$selecteur.bando2_$souspage {background-image:url(".$sousdetail->icone.");}";
4267 4267
 				}
4268 4268
 			}
4269 4269
 		}
@@ -4289,17 +4289,17 @@  discard block
 block discarded – undo
4289 4289
  */
4290 4290
 function bouton_action($libelle, $url, $class = "", $confirm = "", $title = "", $callback = "") {
4291 4291
 	if ($confirm) {
4292
-		$confirm = "confirm(\"" . attribut_html($confirm) . "\")";
4292
+		$confirm = "confirm(\"".attribut_html($confirm)."\")";
4293 4293
 		if ($callback) {
4294 4294
 			$callback = "$confirm?($callback):false";
4295 4295
 		} else {
4296 4296
 			$callback = $confirm;
4297 4297
 		}
4298 4298
 	}
4299
-	$onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : "";
4299
+	$onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : "";
4300 4300
 	$title = $title ? " title='$title'" : "";
4301 4301
 
4302
-	return "<form class='bouton_action_post $class' method='post' action='$url'><div>" . form_hidden($url)
4302
+	return "<form class='bouton_action_post $class' method='post' action='$url'><div>".form_hidden($url)
4303 4303
 	. "<button type='submit' class='submit'$title$onclick>$libelle</button></div></form>";
4304 4304
 }
4305 4305
 
@@ -4360,14 +4360,14 @@  discard block
 block discarded – undo
4360 4360
 		$champ_titre = "";
4361 4361
 		if ($demande_titre) {
4362 4362
 			// si pas de titre declare mais champ titre, il sera peuple par le select *
4363
-			$champ_titre = (!empty($desc['titre'])) ? ', ' . $desc['titre'] : '';
4363
+			$champ_titre = (!empty($desc['titre'])) ? ', '.$desc['titre'] : '';
4364 4364
 		}
4365 4365
 		include_spip('base/abstract_sql');
4366 4366
 		include_spip('base/connect_sql');
4367 4367
 		$objets[$type_objet][$id_objet] = sql_fetsel(
4368
-			'*' . $champ_titre,
4368
+			'*'.$champ_titre,
4369 4369
 			$desc['table_sql'],
4370
-			id_table_objet($type_objet) . ' = ' . intval($id_objet)
4370
+			id_table_objet($type_objet).' = '.intval($id_objet)
4371 4371
 		);
4372 4372
 	}
4373 4373
 
@@ -4437,7 +4437,7 @@  discard block
 block discarded – undo
4437 4437
 		return $texte;
4438 4438
 	}
4439 4439
 
4440
-	$traitement = str_replace('%s', "'" . texte_script($texte) . "'", $traitement);
4440
+	$traitement = str_replace('%s', "'".texte_script($texte)."'", $traitement);
4441 4441
 
4442 4442
 	// Fournir $connect et $Pile[0] au traitement si besoin
4443 4443
 	$Pile = array(0 => $env);
@@ -4471,7 +4471,7 @@  discard block
 block discarded – undo
4471 4471
 	}
4472 4472
 	$url = generer_url_entite($id_objet, $objet, '', '', $connect);
4473 4473
 
4474
-	return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . "</a>";
4474
+	return "<a href='$url' class='$objet'>".couper($titre, $longueur)."</a>";
4475 4475
 }
4476 4476
 
4477 4477
 
@@ -4490,10 +4490,10 @@  discard block
 block discarded – undo
4490 4490
 function wrap($texte, $wrap) {
4491 4491
 	$balises = extraire_balises($wrap);
4492 4492
 	if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) {
4493
-		$texte = $wrap . $texte;
4493
+		$texte = $wrap.$texte;
4494 4494
 		$regs = array_reverse($regs[1]);
4495
-		$wrap = "</" . implode("></", $regs) . ">";
4496
-		$texte = $texte . $wrap;
4495
+		$wrap = "</".implode("></", $regs).">";
4496
+		$texte = $texte.$wrap;
4497 4497
 	}
4498 4498
 
4499 4499
 	return $texte;
@@ -4524,7 +4524,7 @@  discard block
 block discarded – undo
4524 4524
 
4525 4525
 	// caster $u en array si besoin
4526 4526
 	if (is_object($u)) {
4527
-		$u = (array)$u;
4527
+		$u = (array) $u;
4528 4528
 	}
4529 4529
 
4530 4530
 	if (is_array($u)) {
@@ -4545,7 +4545,7 @@  discard block
 block discarded – undo
4545 4545
 		// sinon on passe a la ligne et on indente
4546 4546
 		$i_str = str_pad("", $indent, " ");
4547 4547
 		foreach ($u as $k => $v) {
4548
-			$out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2);
4548
+			$out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2);
4549 4549
 		}
4550 4550
 
4551 4551
 		return $out;
@@ -4598,8 +4598,8 @@  discard block
 block discarded – undo
4598 4598
  * @param string $class
4599 4599
  * @return string
4600 4600
  */
4601
-function objet_icone($objet, $taille = 24, $class='') {
4602
-	$icone = objet_info($objet, 'icone_objet') . "-" . $taille . ".png";
4601
+function objet_icone($objet, $taille = 24, $class = '') {
4602
+	$icone = objet_info($objet, 'icone_objet')."-".$taille.".png";
4603 4603
 	$icone = chemin_image($icone);
4604 4604
 	$balise_img = charger_filtre('balise_img');
4605 4605
 
@@ -4623,12 +4623,12 @@  discard block
 block discarded – undo
4623 4623
  * @param array $options
4624 4624
  * @return string
4625 4625
  */
4626
-function objet_T($objet, $chaine, $args = array(), $options = array()){
4627
-	$chaine = explode(':',$chaine);
4628
-	if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, array('force'=>false)))) {
4626
+function objet_T($objet, $chaine, $args = array(), $options = array()) {
4627
+	$chaine = explode(':', $chaine);
4628
+	if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, array('force'=>false)))) {
4629 4629
 		return $t;
4630 4630
 	}
4631
-	$chaine = implode(':',$chaine);
4631
+	$chaine = implode(':', $chaine);
4632 4632
 	return _T($chaine, $args, $options);
4633 4633
 }
4634 4634
 
@@ -4688,7 +4688,7 @@  discard block
 block discarded – undo
4688 4688
 	$cache = recuperer_fond($fond, $contexte, $options, $connect);
4689 4689
 
4690 4690
 	// calculer le nom de la css
4691
-	$dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension);
4691
+	$dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension);
4692 4692
 	$nom_safe = preg_replace(",\W,", '_', str_replace('.', '_', $fond));
4693 4693
 	$contexte_implicite = calculer_contexte_implicite();
4694 4694
 
@@ -4696,22 +4696,22 @@  discard block
 block discarded – undo
4696 4696
 	// mais on peut hasher selon le contenu a la demande, si plusieurs contextes produisent un meme contenu
4697 4697
 	// reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine
4698 4698
 	if (isset($options['hash_on_content']) and $options['hash_on_content']) {
4699
-		$hash = md5($contexte_implicite['host'] . '::'. $cache);
4699
+		$hash = md5($contexte_implicite['host'].'::'.$cache);
4700 4700
 	}
4701 4701
 	else {
4702 4702
 		unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js
4703 4703
 		ksort($contexte);
4704
-		$hash = md5($fond . json_encode($contexte_implicite) . json_encode($contexte) . $connect);
4704
+		$hash = md5($fond.json_encode($contexte_implicite).json_encode($contexte).$connect);
4705 4705
 	}
4706
-	$filename = $dir_var . $extension . "dyn-$nom_safe-" . substr($hash, 0, 8) . ".$extension";
4706
+	$filename = $dir_var.$extension."dyn-$nom_safe-".substr($hash, 0, 8).".$extension";
4707 4707
 
4708 4708
 	// mettre a jour le fichier si il n'existe pas
4709 4709
 	// ou trop ancien
4710 4710
 	// le dernier fichier produit est toujours suffixe par .last
4711 4711
 	// et recopie sur le fichier cible uniquement si il change
4712 4712
 	if (!file_exists($filename)
4713
-		or !file_exists($filename . ".last")
4714
-		or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename . ".last") < $cache['lastmodified'])
4713
+		or !file_exists($filename.".last")
4714
+		or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename.".last") < $cache['lastmodified'])
4715 4715
 		or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul')
4716 4716
 	) {
4717 4717
 		$contenu = $cache['texte'];
@@ -4730,10 +4730,10 @@  discard block
 block discarded – undo
4730 4730
 			}
4731 4731
 			// pas de date dans le commentaire car sinon ca invalide le md5 et force la maj
4732 4732
 			// mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non
4733
-			$comment .= "}\n   md5:" . md5($contenu) . " */\n";
4733
+			$comment .= "}\n   md5:".md5($contenu)." */\n";
4734 4734
 		}
4735 4735
 		// et ecrire le fichier si il change
4736
-		ecrire_fichier_calcule_si_modifie($filename, $comment . $contenu, false, true);
4736
+		ecrire_fichier_calcule_si_modifie($filename, $comment.$contenu, false, true);
4737 4737
 	}
4738 4738
 
4739 4739
 	return timestamp($filename);
@@ -4928,11 +4928,11 @@  discard block
 block discarded – undo
4928 4928
 function spip_affiche_mot_de_passe_masque($passe, $afficher_partiellement = false, $portion_pourcent = null) {
4929 4929
 	$l = strlen($passe);
4930 4930
 
4931
-	if ($l<=8 or !$afficher_partiellement){
4931
+	if ($l <= 8 or !$afficher_partiellement) {
4932 4932
 		if (!$l) {
4933 4933
 			return ''; // montrer qu'il y a pas de mot de passe si il y en a pas
4934 4934
 		}
4935
-		return str_pad('',$afficher_partiellement ? $l : 16,'*');
4935
+		return str_pad('', $afficher_partiellement ? $l : 16, '*');
4936 4936
 	}
4937 4937
 
4938 4938
 	if (is_null($portion_pourcent)) {
@@ -4946,9 +4946,9 @@  discard block
 block discarded – undo
4946 4946
 	}
4947 4947
 	$e = intval(ceil($l * $portion_pourcent / 100 / 2));
4948 4948
 	$e = max($e, 0);
4949
-	$mid = str_pad('',$l-2*$e,'*');
4950
-	if ($e>0 and strlen($mid)>8){
4949
+	$mid = str_pad('', $l - 2 * $e, '*');
4950
+	if ($e > 0 and strlen($mid) > 8) {
4951 4951
 		$mid = '***...***';
4952 4952
 	}
4953
-	return substr($passe,0,$e) . $mid . ($e > 0 ? substr($passe,-$e) : '');
4953
+	return substr($passe, 0, $e).$mid.($e > 0 ? substr($passe, -$e) : '');
4954 4954
 }
4955 4955
\ No newline at end of file
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Spacing   +131 added lines, -133 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)) {
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	}
289 289
 
290 290
 	// appliquer notre fonction si elle existe
291
-	$fonc = 'execute_pipeline_' . strtolower($action);
291
+	$fonc = 'execute_pipeline_'.strtolower($action);
292 292
 	if (function_exists($fonc)) {
293 293
 		$val = $fonc($val);
294 294
 	} // plantage ?
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 function spip_log($message = null, $name = null) {
353 353
 	static $pre = array();
354 354
 	static $log;
355
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
355
+	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs);
356 356
 	if (!isset($regs[1]) or !$logname = $regs[1]) {
357 357
 		$logname = null;
358 358
 	}
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 		if (!is_string($message)) {
378 378
 			$message = print_r($message, true);
379 379
 		}
380
-		$log($pre[$niveau] . ' ' . $message, $logname);
380
+		$log($pre[$niveau].' '.$message, $logname);
381 381
 	}
382 382
 }
383 383
 
@@ -490,9 +490,9 @@  discard block
 block discarded – undo
490 490
  * @param string $sanitize_function
491 491
  * @return array|mixed|string
492 492
  */
493
-function spip_sanitize_from_request($value, $key, $sanitize_function='entites_html') {
493
+function spip_sanitize_from_request($value, $key, $sanitize_function = 'entites_html') {
494 494
 	if (is_array($value)) {
495
-		if ($key=='*') {
495
+		if ($key == '*') {
496 496
 			$key = array_keys($value);
497 497
 		}
498 498
 		if (!is_array($key)) {
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
 		$a = './';
578 578
 	}
579 579
 
580
-	$regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,';
580
+	$regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,';
581 581
 	$ajouts = array_flip(explode('|', $c));
582 582
 	$u = is_array($v) ? $v : rawurlencode($v);
583 583
 	$testv = (is_array($v) ? count($v) : strlen($v));
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
 			// Ajout. Pour une variable, remplacer au meme endroit,
605 605
 			// pour un tableau ce sera fait dans la prochaine boucle
606 606
 			elseif (substr($r[1], -2) != '[]') {
607
-				$url[$n] = $r[1] . '=' . $u;
607
+				$url[$n] = $r[1].'='.$u;
608 608
 				unset($ajouts[$r[1]]);
609 609
 			}
610 610
 			// Pour les tableaux on laisse tomber les valeurs de
@@ -624,11 +624,11 @@  discard block
 block discarded – undo
624 624
 	} elseif ($testv) {
625 625
 		foreach ($ajouts as $k => $n) {
626 626
 			if (!is_array($v)) {
627
-				$url[] = $k . '=' . $u;
627
+				$url[] = $k.'='.$u;
628 628
 			} else {
629
-				$id = (substr($k, -2) == '[]') ? $k : ($k . "[]");
629
+				$id = (substr($k, -2) == '[]') ? $k : ($k."[]");
630 630
 				foreach ($v as $w) {
631
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : $w);
631
+					$url[] = $id.'='.(is_array($w) ? 'Array' : $w);
632 632
 				}
633 633
 			}
634 634
 		}
@@ -639,10 +639,10 @@  discard block
 block discarded – undo
639 639
 
640 640
 	// recomposer l'adresse
641 641
 	if ($url) {
642
-		$a .= '?' . join($sep, $url);
642
+		$a .= '?'.join($sep, $url);
643 643
 	}
644 644
 
645
-	return $a . $ancre;
645
+	return $a.$ancre;
646 646
 }
647 647
 
648 648
 /**
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
 			translitteration($ancre)
675 675
 		);
676 676
 	}
677
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
677
+	return $url.(strlen($ancre) ? '#'.$ancre : '');
678 678
 }
679 679
 
680 680
 /**
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
  * @return bool
787 787
  */
788 788
 function test_plugin_actif($plugin) {
789
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
789
+	return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
790 790
 }
791 791
 
792 792
 /**
@@ -854,8 +854,7 @@  discard block
 block discarded – undo
854 854
 		// pour les chaines non traduites, assurer un service minimum
855 855
 		if (!$GLOBALS['test_i18n'] and (_request('var_mode') != 'traduction')) {
856 856
 			$text = str_replace('_', ' ',
857
-				(($n = strpos($text, ':')) === false ? $texte :
858
-					substr($texte, $n + 1)));
857
+				(($n = strpos($text, ':')) === false ? $texte : substr($texte, $n + 1)));
859 858
 		}
860 859
 		$o['class'] = null;
861 860
 
@@ -927,7 +926,7 @@  discard block
 block discarded – undo
927 926
 		// Si des variables n'ont pas ete inserees, le signaler
928 927
 		// (chaines de langues pas a jour)
929 928
 		if ($args) {
930
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
929
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
931 930
 		}
932 931
 	}
933 932
 
@@ -951,7 +950,7 @@  discard block
 block discarded – undo
951 950
 function joli_repertoire($rep) {
952 951
 	$a = substr($rep, 0, 1);
953 952
 	if ($a <> '.' and $a <> '/') {
954
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
953
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
955 954
 	}
956 955
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
957 956
 
@@ -1005,7 +1004,7 @@  discard block
 block discarded – undo
1005 1004
 			$p -= ($x * 1000);
1006 1005
 		}
1007 1006
 
1008
-		return $s . sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
1007
+		return $s.sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
1009 1008
 	}
1010 1009
 }
1011 1010
 
@@ -1074,7 +1073,7 @@  discard block
 block discarded – undo
1074 1073
 	if ($taches and count($taches) and !spip_connect()) {
1075 1074
 		return false;
1076 1075
 	}
1077
-	spip_log("cron !", 'jq' . _LOG_DEBUG);
1076
+	spip_log("cron !", 'jq'._LOG_DEBUG);
1078 1077
 	if ($genie = charger_fonction('genie', 'inc', true)) {
1079 1078
 		return $genie($taches);
1080 1079
 	}
@@ -1178,7 +1177,7 @@  discard block
 block discarded – undo
1178 1177
 
1179 1178
 	if ($queue_next_job_time == -1) {
1180 1179
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1181
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . "job_queue_next.txt");
1180
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP."job_queue_next.txt");
1182 1181
 		}
1183 1182
 		// utiliser un cache memoire si dispo
1184 1183
 		if (function_exists("cache_get") and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
@@ -1245,8 +1244,8 @@  discard block
 block discarded – undo
1245 1244
 		$src = '';
1246 1245
 	}
1247 1246
 	if ($script) {
1248
-		$script = ("/*<![CDATA[*/\n" .
1249
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1247
+		$script = ("/*<![CDATA[*/\n".
1248
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
1250 1249
 			"/*]]>*/");
1251 1250
 	}
1252 1251
 	if ($noscript) {
@@ -1332,13 +1331,13 @@  discard block
 block discarded – undo
1332 1331
 	if ($path_base == null) {
1333 1332
 		// Chemin standard depuis l'espace public
1334 1333
 		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1335
-			_DIR_RACINE . ':' .
1336
-			_DIR_RACINE . 'squelettes-dist/:' .
1337
-			_DIR_RACINE . 'prive/:' .
1334
+			_DIR_RACINE.':'.
1335
+			_DIR_RACINE.'squelettes-dist/:'.
1336
+			_DIR_RACINE.'prive/:'.
1338 1337
 			_DIR_RESTREINT;
1339 1338
 		// Ajouter squelettes/
1340
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1341
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1339
+		if (@is_dir(_DIR_RACINE.'squelettes')) {
1340
+			$path = _DIR_RACINE.'squelettes/:'.$path;
1342 1341
 		}
1343 1342
 		foreach (explode(':', $path) as $dir) {
1344 1343
 			if (strlen($dir) and substr($dir, -1) != '/') {
@@ -1350,7 +1349,7 @@  discard block
 block discarded – undo
1350 1349
 		// Et le(s) dossier(s) des squelettes nommes
1351 1350
 		if (strlen($GLOBALS['dossier_squelettes'])) {
1352 1351
 			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1353
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1352
+				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/');
1354 1353
 			}
1355 1354
 		}
1356 1355
 		$GLOBALS['path_sig'] = md5(serialize($path_full));
@@ -1361,7 +1360,7 @@  discard block
 block discarded – undo
1361 1360
 
1362 1361
 	if (strlen($dir_path)) {
1363 1362
 		$tete = "";
1364
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1363
+		if (reset($path_base) == _DIR_RACINE.'squelettes/') {
1365 1364
 			$tete = array_shift($path_base);
1366 1365
 		}
1367 1366
 		$dirs = array_reverse(explode(':', $dir_path));
@@ -1383,7 +1382,7 @@  discard block
 block discarded – undo
1383 1382
 	// Et le(s) dossier(s) des squelettes nommes
1384 1383
 	if (strlen($GLOBALS['dossier_squelettes'])) {
1385 1384
 		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1386
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1385
+			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/');
1387 1386
 		}
1388 1387
 	}
1389 1388
 
@@ -1453,9 +1452,9 @@  discard block
 block discarded – undo
1453 1452
 	// on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
1454 1453
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1455 1454
 	if (preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1456
-	  and $file_svg_generique = substr($file,0, -strlen($m[0])) . "-xx.svg"
1455
+	  and $file_svg_generique = substr($file, 0, -strlen($m[0]))."-xx.svg"
1457 1456
 		and $f = find_in_theme("$file_svg_generique")) {
1458
-		if ($fsize = substr($f,0,-6) . $m[1] . ".svg" and file_exists($fsize)) {
1457
+		if ($fsize = substr($f, 0, -6).$m[1].".svg" and file_exists($fsize)) {
1459 1458
 			return $themefiles["$subdir$file"] = $fsize;
1460 1459
 		}
1461 1460
 		else {
@@ -1469,7 +1468,7 @@  discard block
 block discarded – undo
1469 1468
 			return $themefiles["$subdir$file"] = $f;
1470 1469
 		}
1471 1470
 	}
1472
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1471
+	spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme');
1473 1472
 
1474 1473
 	return $themefiles["$subdir$file"] = "";
1475 1474
 }
@@ -1497,7 +1496,7 @@  discard block
 block discarded – undo
1497 1496
 function chemin_image($icone) {
1498 1497
 	static $icone_renommer;
1499 1498
 	if ($p = strpos($icone, '?')) {
1500
-		$icone = substr($icone,0, $p);
1499
+		$icone = substr($icone, 0, $p);
1501 1500
 	}
1502 1501
 	// gerer le cas d'un double appel en evitant de refaire le travail inutilement
1503 1502
 	if (strpos($icone, "/") !== false and file_exists($icone)) {
@@ -1577,8 +1576,8 @@  discard block
 block discarded – undo
1577 1576
 			return false;
1578 1577
 		}
1579 1578
 		if ($include and !isset($inc[$dirname][$file])) {
1580
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1581
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1579
+			include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1580
+			$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1582 1581
 		}
1583 1582
 
1584 1583
 		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
@@ -1591,14 +1590,14 @@  discard block
 block discarded – undo
1591 1590
 	}
1592 1591
 
1593 1592
 	foreach (creer_chemin() as $dir) {
1594
-		if (!isset($dirs[$a = $dir . $dirname])) {
1595
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1593
+		if (!isset($dirs[$a = $dir.$dirname])) {
1594
+			$dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a);
1596 1595
 		}
1597 1596
 		if ($dirs[$a]) {
1598
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1597
+			if (file_exists(_ROOT_CWD.($a .= $file))) {
1599 1598
 				if ($include and !isset($inc[$dirname][$file])) {
1600
-					include_once _ROOT_CWD . $a;
1601
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1599
+					include_once _ROOT_CWD.$a;
1600
+					$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1602 1601
 				}
1603 1602
 				if (!defined('_SAUVER_CHEMIN')) {
1604 1603
 					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
@@ -1608,7 +1607,7 @@  discard block
 block discarded – undo
1608 1607
 					define('_SAUVER_CHEMIN', true);
1609 1608
 				}
1610 1609
 
1611
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1610
+				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a;
1612 1611
 			}
1613 1612
 		}
1614 1613
 	}
@@ -1634,7 +1633,7 @@  discard block
 block discarded – undo
1634 1633
 		define('_SAUVER_CHEMIN', true);
1635 1634
 	}
1636 1635
 
1637
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1636
+	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false;
1638 1637
 }
1639 1638
 
1640 1639
 function clear_path_cache() {
@@ -1703,12 +1702,12 @@  discard block
 block discarded – undo
1703 1702
 	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1704 1703
 	// on a pas encore inclus flock.php
1705 1704
 	if (!function_exists('preg_files')) {
1706
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1705
+		include_once _ROOT_RESTREINT.'inc/flock.php';
1707 1706
 	}
1708 1707
 
1709 1708
 	// Parcourir le chemin
1710 1709
 	foreach (creer_chemin() as $d) {
1711
-		$f = $d . $dir;
1710
+		$f = $d.$dir;
1712 1711
 		if (@is_dir($f)) {
1713 1712
 			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? array() : $recurs);
1714 1713
 			foreach ($liste as $chemin) {
@@ -1738,9 +1737,9 @@  discard block
 block discarded – undo
1738 1737
 	static $autsanscookie = array('install', 'base_repair');
1739 1738
 
1740 1739
 	if (in_array($nom, $autsanscookie)) {
1741
-		if (test_espace_prive()){
1740
+		if (test_espace_prive()) {
1742 1741
 			include_spip('base/connect_sql');
1743
-			if (!$strict or !spip_connect()){
1742
+			if (!$strict or !spip_connect()) {
1744 1743
 				return true;
1745 1744
 			}
1746 1745
 		}
@@ -1819,7 +1818,7 @@  discard block
 block discarded – undo
1819 1818
 		return $res;
1820 1819
 	}
1821 1820
 	// Sinon c'est un raccourci ou compat SPIP < 2
1822
-	if (!function_exists($f = 'generer_url_' . $entite)) {
1821
+	if (!function_exists($f = 'generer_url_'.$entite)) {
1823 1822
 		if (!function_exists($f .= '_dist')) {
1824 1823
 			$f = '';
1825 1824
 		}
@@ -1828,8 +1827,8 @@  discard block
 block discarded – undo
1828 1827
 		$url = $f($id, $args, $ancre);
1829 1828
 		if (strlen($args)) {
1830 1829
 			$url .= strstr($url, '?')
1831
-				? '&amp;' . $args
1832
-				: '?' . $args;
1830
+				? '&amp;'.$args
1831
+				: '?'.$args;
1833 1832
 		}
1834 1833
 
1835 1834
 		return $url;
@@ -1860,8 +1859,8 @@  discard block
 block discarded – undo
1860 1859
 	include_spip('base/connect_sql');
1861 1860
 	$id_type = id_table_objet($entite, $public);
1862 1861
 
1863
-	return _DIR_RACINE . get_spip_script('./')
1864
-	. "?" . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1862
+	return _DIR_RACINE.get_spip_script('./')
1863
+	. "?"._SPIP_PAGE."=$entite&$id_type=$i&connect=$public"
1865 1864
 	. (!$args ? '' : "&$args")
1866 1865
 	. (!$ancre ? '' : "#$ancre");
1867 1866
 }
@@ -2013,7 +2012,7 @@  discard block
 block discarded – undo
2013 2012
 			if (!empty($_SERVER['QUERY_STRING'])
2014 2013
 				and !strpos($_SERVER['REQUEST_URI'], '?')
2015 2014
 			) {
2016
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2015
+				$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2017 2016
 			}
2018 2017
 		}
2019 2018
 	}
@@ -2040,17 +2039,17 @@  discard block
 block discarded – undo
2040 2039
 	list($myself) = explode('?', $myself);
2041 2040
 	// vieux mode HTTP qui envoie après le nom de la methode l'URL compléte
2042 2041
 	// protocole, "://", nom du serveur avant le path dans _SERVER["REQUEST_URI"]
2043
-	if (strpos($myself,'://') !== false) {
2044
-		$myself = explode('://',$myself);
2042
+	if (strpos($myself, '://') !== false) {
2043
+		$myself = explode('://', $myself);
2045 2044
 		array_shift($myself);
2046
-		$myself = implode('://',$myself);
2047
-		$myself = explode('/',$myself);
2045
+		$myself = implode('://', $myself);
2046
+		$myself = explode('/', $myself);
2048 2047
 		array_shift($myself);
2049
-		$myself = implode('/',$myself);
2048
+		$myself = implode('/', $myself);
2050 2049
 	}
2051
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2050
+	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/';
2052 2051
 
2053
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2052
+	$url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/');
2054 2053
 
2055 2054
 	return $url;
2056 2055
 }
@@ -2088,17 +2087,17 @@  discard block
 block discarded – undo
2088 2087
  **/
2089 2088
 function generer_url_ecrire($script = '', $args = "", $no_entities = false, $rel = false) {
2090 2089
 	if (!$rel) {
2091
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2090
+		$rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT;
2092 2091
 	} else {
2093 2092
 		if (!is_string($rel)) {
2094 2093
 			$rel = _DIR_RESTREINT ? _DIR_RESTREINT :
2095
-				('./' . _SPIP_ECRIRE_SCRIPT);
2094
+				('./'._SPIP_ECRIRE_SCRIPT);
2096 2095
 		}
2097 2096
 	}
2098 2097
 
2099 2098
 	list($script, $ancre) = array_pad(explode('#', $script), 2, null);
2100 2099
 	if ($script and ($script <> 'accueil' or $rel)) {
2101
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2100
+		$args = "?exec=$script".(!$args ? '' : "&$args");
2102 2101
 	} elseif ($args) {
2103 2102
 		$args = "?$args";
2104 2103
 	}
@@ -2106,7 +2105,7 @@  discard block
 block discarded – undo
2106 2105
 		$args .= "#$ancre";
2107 2106
 	}
2108 2107
 
2109
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2108
+	return $rel.($no_entities ? $args : str_replace('&', '&amp;', $args));
2110 2109
 }
2111 2110
 
2112 2111
 //
@@ -2176,25 +2175,25 @@  discard block
 block discarded – undo
2176 2175
 		if (is_array($args)) {
2177 2176
 			$r = '';
2178 2177
 			foreach ($args as $k => $v) {
2179
-				$r .= '&' . $k . '=' . $v;
2178
+				$r .= '&'.$k.'='.$v;
2180 2179
 			}
2181 2180
 			$args = substr($r, 1);
2182 2181
 		}
2183 2182
 		$action .=
2184
-			(strpos($action, '?') !== false ? '&' : '?') . $args;
2183
+			(strpos($action, '?') !== false ? '&' : '?').$args;
2185 2184
 	}
2186 2185
 	if (!$no_entities) {
2187 2186
 		$action = quote_amp($action);
2188 2187
 	}
2189 2188
 
2190 2189
 	// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2191
-	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(",^/[.]/,", "/", "/$action"));
2190
+	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(",^/[.]/,", "/", "/$action"));
2192 2191
 }
2193 2192
 
2194 2193
 // https://code.spip.net/@generer_url_prive
2195 2194
 function generer_url_prive($script, $args = "", $no_entities = false) {
2196 2195
 
2197
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2196
+	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php');
2198 2197
 }
2199 2198
 
2200 2199
 // Pour les formulaires en methode POST,
@@ -2229,8 +2228,7 @@  discard block
 block discarded – undo
2229 2228
 	. "><div>\n"
2230 2229
 	. "<input type='hidden' name='exec' value='$script1' />"
2231 2230
 	. $corps
2232
-	. (!$submit ? '' :
2233
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo' type='submit' value=\"" . entites_html($submit) . "\" /></div>"))
2231
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo' type='submit' value=\"".entites_html($submit)."\" /></div>"))
2234 2232
 	. "</div></form>\n";
2235 2233
 }
2236 2234
 
@@ -2255,14 +2253,14 @@  discard block
 block discarded – undo
2255 2253
 		? generer_url_ecrire(_request('exec'))
2256 2254
 		: generer_url_public();
2257 2255
 
2258
-	return "\n<form action='" .
2259
-	$h .
2260
-	"'" .
2261
-	$atts .
2262
-	">\n" .
2263
-	"<div>" .
2264
-	"\n<input type='hidden' name='action' value='$script' />" .
2265
-	$corps .
2256
+	return "\n<form action='".
2257
+	$h.
2258
+	"'".
2259
+	$atts.
2260
+	">\n".
2261
+	"<div>".
2262
+	"\n<input type='hidden' name='action' value='$script' />".
2263
+	$corps.
2266 2264
 	"</div></form>";
2267 2265
 }
2268 2266
 
@@ -2290,7 +2288,7 @@  discard block
 block discarded – undo
2290 2288
 		: generer_url_public('', '', false, false);
2291 2289
 	$url = parametre_url($url, 'action', $script);
2292 2290
 	if ($args) {
2293
-		$url .= quote_amp('&' . $args);
2291
+		$url .= quote_amp('&'.$args);
2294 2292
 	}
2295 2293
 
2296 2294
 	if ($no_entities) {
@@ -2340,17 +2338,17 @@  discard block
 block discarded – undo
2340 2338
 
2341 2339
 	// le nom du repertoire plugins/ activables/desactivables
2342 2340
 	if (!defined('_DIR_PLUGINS')) {
2343
-		define('_DIR_PLUGINS', _DIR_RACINE . "plugins/");
2341
+		define('_DIR_PLUGINS', _DIR_RACINE."plugins/");
2344 2342
 	}
2345 2343
 
2346 2344
 	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2347 2345
 	if (!defined('_DIR_PLUGINS_DIST')) {
2348
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . "plugins-dist/");
2346
+		define('_DIR_PLUGINS_DIST', _DIR_RACINE."plugins-dist/");
2349 2347
 	}
2350 2348
 
2351 2349
 	// le nom du repertoire des librairies
2352 2350
 	if (!defined('_DIR_LIB')) {
2353
-		define('_DIR_LIB', _DIR_RACINE . "lib/");
2351
+		define('_DIR_LIB', _DIR_RACINE."lib/");
2354 2352
 	}
2355 2353
 
2356 2354
 	if (!defined('_DIR_IMG')) {
@@ -2360,29 +2358,29 @@  discard block
 block discarded – undo
2360 2358
 		define('_DIR_LOGOS', $pa);
2361 2359
 	}
2362 2360
 	if (!defined('_DIR_IMG_ICONES')) {
2363
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . "icones/");
2361
+		define('_DIR_IMG_ICONES', _DIR_LOGOS."icones/");
2364 2362
 	}
2365 2363
 
2366 2364
 	if (!defined('_DIR_DUMP')) {
2367
-		define('_DIR_DUMP', $ti . "dump/");
2365
+		define('_DIR_DUMP', $ti."dump/");
2368 2366
 	}
2369 2367
 	if (!defined('_DIR_SESSIONS')) {
2370
-		define('_DIR_SESSIONS', $ti . "sessions/");
2368
+		define('_DIR_SESSIONS', $ti."sessions/");
2371 2369
 	}
2372 2370
 	if (!defined('_DIR_TRANSFERT')) {
2373
-		define('_DIR_TRANSFERT', $ti . "upload/");
2371
+		define('_DIR_TRANSFERT', $ti."upload/");
2374 2372
 	}
2375 2373
 	if (!defined('_DIR_CACHE')) {
2376
-		define('_DIR_CACHE', $ti . "cache/");
2374
+		define('_DIR_CACHE', $ti."cache/");
2377 2375
 	}
2378 2376
 	if (!defined('_DIR_CACHE_XML')) {
2379
-		define('_DIR_CACHE_XML', _DIR_CACHE . "xml/");
2377
+		define('_DIR_CACHE_XML', _DIR_CACHE."xml/");
2380 2378
 	}
2381 2379
 	if (!defined('_DIR_SKELS')) {
2382
-		define('_DIR_SKELS', _DIR_CACHE . "skel/");
2380
+		define('_DIR_SKELS', _DIR_CACHE."skel/");
2383 2381
 	}
2384 2382
 	if (!defined('_DIR_AIDE')) {
2385
-		define('_DIR_AIDE', _DIR_CACHE . "aide/");
2383
+		define('_DIR_AIDE', _DIR_CACHE."aide/");
2386 2384
 	}
2387 2385
 	if (!defined('_DIR_TMP')) {
2388 2386
 		define('_DIR_TMP', $ti);
@@ -2412,27 +2410,27 @@  discard block
 block discarded – undo
2412 2410
 	// Declaration des fichiers
2413 2411
 
2414 2412
 	if (!defined('_CACHE_PLUGINS_PATH')) {
2415
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . "charger_plugins_chemins.php");
2413
+		define('_CACHE_PLUGINS_PATH', _DIR_CACHE."charger_plugins_chemins.php");
2416 2414
 	}
2417 2415
 	if (!defined('_CACHE_PLUGINS_OPT')) {
2418
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . "charger_plugins_options.php");
2416
+		define('_CACHE_PLUGINS_OPT', _DIR_CACHE."charger_plugins_options.php");
2419 2417
 	}
2420 2418
 	if (!defined('_CACHE_PLUGINS_FCT')) {
2421
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . "charger_plugins_fonctions.php");
2419
+		define('_CACHE_PLUGINS_FCT', _DIR_CACHE."charger_plugins_fonctions.php");
2422 2420
 	}
2423 2421
 	if (!defined('_CACHE_PIPELINES')) {
2424
-		define('_CACHE_PIPELINES', _DIR_CACHE . "charger_pipelines.php");
2422
+		define('_CACHE_PIPELINES', _DIR_CACHE."charger_pipelines.php");
2425 2423
 	}
2426 2424
 	if (!defined('_CACHE_CHEMIN')) {
2427
-		define('_CACHE_CHEMIN', _DIR_CACHE . "chemin.txt");
2425
+		define('_CACHE_CHEMIN', _DIR_CACHE."chemin.txt");
2428 2426
 	}
2429 2427
 
2430 2428
 	# attention .php obligatoire pour ecrire_fichier_securise
2431 2429
 	if (!defined('_FILE_META')) {
2432
-		define('_FILE_META', $ti . 'meta_cache.php');
2430
+		define('_FILE_META', $ti.'meta_cache.php');
2433 2431
 	}
2434 2432
 	if (!defined('_DIR_LOG')) {
2435
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2433
+		define('_DIR_LOG', _DIR_TMP.'log/');
2436 2434
 	}
2437 2435
 	if (!defined('_FILE_LOG')) {
2438 2436
 		define('_FILE_LOG', 'spip');
@@ -2448,8 +2446,8 @@  discard block
 block discarded – undo
2448 2446
 	}
2449 2447
 	if (!defined('_FILE_CONNECT')) {
2450 2448
 		define('_FILE_CONNECT',
2451
-		(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2452
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2449
+		(@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f
2450
+			: (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f
2453 2451
 				: false)));
2454 2452
 	}
2455 2453
 
@@ -2459,7 +2457,7 @@  discard block
 block discarded – undo
2459 2457
 	}
2460 2458
 	if (!defined('_FILE_CHMOD')) {
2461 2459
 		define('_FILE_CHMOD',
2462
-		(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2460
+		(@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f
2463 2461
 			: false));
2464 2462
 	}
2465 2463
 
@@ -2471,10 +2469,10 @@  discard block
 block discarded – undo
2471 2469
 		define('_FILE_TMP_SUFFIX', '.tmp.php');
2472 2470
 	}
2473 2471
 	if (!defined('_FILE_CONNECT_TMP')) {
2474
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2472
+		define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX);
2475 2473
 	}
2476 2474
 	if (!defined('_FILE_CHMOD_TMP')) {
2477
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2475
+		define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX);
2478 2476
 	}
2479 2477
 
2480 2478
 	// Definition des droits d'acces en ecriture
@@ -2492,13 +2490,13 @@  discard block
 block discarded – undo
2492 2490
 		define('_DEFAULT_CHARSET', 'utf-8');
2493 2491
 	}
2494 2492
 	if (!defined('_ROOT_PLUGINS')) {
2495
-		define('_ROOT_PLUGINS', _ROOT_RACINE . "plugins/");
2493
+		define('_ROOT_PLUGINS', _ROOT_RACINE."plugins/");
2496 2494
 	}
2497 2495
 	if (!defined('_ROOT_PLUGINS_DIST')) {
2498
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . "plugins-dist/");
2496
+		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE."plugins-dist/");
2499 2497
 	}
2500 2498
 	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2501
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2499
+		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2502 2500
 	}
2503 2501
 
2504 2502
 	// La taille des Log
@@ -2535,7 +2533,7 @@  discard block
 block discarded – undo
2535 2533
 	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2536 2534
 	// pour le rendre surchargeable, on va provoquer un reecriture
2537 2535
 	// systematique du noyau ou une baisse de perfs => a etudier)
2538
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2536
+	include_once _ROOT_RESTREINT.'inc/flock.php';
2539 2537
 
2540 2538
 	// charger tout de suite le path et son cache
2541 2539
 	load_path_cache();
@@ -2582,7 +2580,7 @@  discard block
 block discarded – undo
2582 2580
 		if (!empty($_SERVER['QUERY_STRING'])
2583 2581
 			and !strpos($_SERVER['REQUEST_URI'], '?')
2584 2582
 		) {
2585
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2583
+			$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2586 2584
 		}
2587 2585
 	}
2588 2586
 
@@ -2618,7 +2616,7 @@  discard block
 block discarded – undo
2618 2616
 
2619 2617
 			if (isset($GLOBALS['meta']['adresse_site'])) {
2620 2618
 				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2621
-				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '') . '/';
2619
+				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '').'/';
2622 2620
 			} else {
2623 2621
 				$uri_ref = "";
2624 2622
 			}
@@ -2706,7 +2704,7 @@  discard block
 block discarded – undo
2706 2704
 	}
2707 2705
 	if (!defined('_CACHE_RUBRIQUES')) {
2708 2706
 		/** Fichier cache pour le navigateur de rubrique du bandeau */
2709
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2707
+		define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
2710 2708
 	}
2711 2709
 	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2712 2710
 		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
@@ -2798,7 +2796,7 @@  discard block
 block discarded – undo
2798 2796
 					$memory *= 1024;
2799 2797
 			}
2800 2798
 			if ($memory < _MEMORY_LIMIT_MIN * 1024 * 1024) {
2801
-				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN . 'M');
2799
+				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN.'M');
2802 2800
 				if (trim(ini_get('memory_limit')) != $m) {
2803 2801
 					if (!defined('_INTERDIRE_COMPACTE_HEAD_ECRIRE')) {
2804 2802
 						define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true);
@@ -2948,7 +2946,7 @@  discard block
 block discarded – undo
2948 2946
 					}
2949 2947
 					if (isset($GLOBALS['visiteur_session']['nom'])) {
2950 2948
 						spip_log($GLOBALS['visiteur_session']['nom']
2951
-							. " " . _VAR_MODE);
2949
+							. " "._VAR_MODE);
2952 2950
 					}
2953 2951
 				} // pas autorise ?
2954 2952
 				else {
@@ -2956,7 +2954,7 @@  discard block
 block discarded – undo
2956 2954
 					if (!$GLOBALS['visiteur_session']) {
2957 2955
 						include_spip('inc/headers');
2958 2956
 						redirige_par_entete(generer_url_public('login',
2959
-							'url=' . rawurlencode(
2957
+							'url='.rawurlencode(
2960 2958
 								parametre_url(self(), 'var_mode', $_GET['var_mode'], '&')
2961 2959
 							), true));
2962 2960
 					}
@@ -3001,10 +2999,10 @@  discard block
 block discarded – undo
3001 2999
 	// mais on risque de perturber des plugins en initialisant trop tot
3002 3000
 	// certaines constantes
3003 3001
 	@spip_initialisation_core(
3004
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3005
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3006
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3007
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3002
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
3003
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
3004
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
3005
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
3008 3006
 	);
3009 3007
 
3010 3008
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -3037,7 +3035,7 @@  discard block
 block discarded – undo
3037 3035
 	}
3038 3036
 
3039 3037
 	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3040
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3038
+	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
3041 3039
 
3042 3040
 		$session = charger_fonction('session', 'inc');
3043 3041
 		if ($session()) {
@@ -3117,7 +3115,7 @@  discard block
 block discarded – undo
3117 3115
 		$s = pipeline('definir_session',
3118 3116
 			$GLOBALS['visiteur_session']
3119 3117
 				? serialize($GLOBALS['visiteur_session'])
3120
-				. '_' . @$_COOKIE['spip_session']
3118
+				. '_'.@$_COOKIE['spip_session']
3121 3119
 				: ''
3122 3120
 		);
3123 3121
 		$session = $s ? substr(md5($s), 0, 8) : '';
@@ -3273,12 +3271,12 @@  discard block
 block discarded – undo
3273 3271
 	$GLOBALS['_INC_PUBLIC']++;
3274 3272
 
3275 3273
 	// fix #4235
3276
-	$cache_utilise_session_appelant	= (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3274
+	$cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3277 3275
 
3278 3276
 
3279 3277
 	foreach (is_array($fond) ? $fond : array($fond) as $f) {
3280 3278
 		
3281
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3279
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
3282 3280
 
3283 3281
 		$page = evaluer_fond($f, $contexte, $connect);
3284 3282
 		if ($page === '') {
@@ -3317,7 +3315,7 @@  discard block
 block discarded – undo
3317 3315
 		}
3318 3316
 		
3319 3317
 		// contamination de la session appelante, pour les inclusions statiques
3320
-		if (isset($page['invalideurs']['session'])){
3318
+		if (isset($page['invalideurs']['session'])) {
3321 3319
 			$cache_utilise_session_appelant = $page['invalideurs']['session'];
3322 3320
 		}
3323 3321
 	}
@@ -3363,7 +3361,7 @@  discard block
 block discarded – undo
3363 3361
  * @return array|string
3364 3362
  */
3365 3363
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3366
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3364
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
3367 3365
 	if (!$pathinfo) {
3368 3366
 		return $f;
3369 3367
 	}
@@ -3597,7 +3595,7 @@  discard block
 block discarded – undo
3597 3595
 
3598 3596
 			if (!is_array($params[0])) {
3599 3597
 				trigger_error(
3600
-					'array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given',
3598
+					'array_column() expects parameter 1 to be array, '.gettype($params[0]).' given',
3601 3599
 					E_USER_WARNING
3602 3600
 				);
3603 3601
 				return null;
Please login to merge, or discard this patch.