Completed
Push — master ( 28ee8b...44fd31 )
by cam
01:12
created
ecrire/public/sandbox.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
  *     texte
42 42
  */
43 43
 function sandbox_composer_texte($texte, &$p) {
44
-	$code = "'" . str_replace(['\\', "'"], ['\\\\', "\\'"], $texte) . "'";
44
+	$code = "'".str_replace(['\\', "'"], ['\\\\', "\\'"], $texte)."'";
45 45
 
46 46
 	return $code;
47 47
 }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		$min_f = $refl->getNumberOfRequiredParameters();
86 86
 		if (($nb_args_f < $min_f)) {
87 87
 			$msg_args = ['filtre' => texte_script($fonc), 'nb' => $min_f - $nb_args_f];
88
-			erreur_squelette([ 'zbug_erreur_filtre_nbarg_min', $msg_args], $p);
88
+			erreur_squelette(['zbug_erreur_filtre_nbarg_min', $msg_args], $p);
89 89
 		}
90 90
 	}
91 91
 	// le filtre n'existe pas,
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
  */
171 171
 function sandbox_filtrer_squelette($skel, $corps, $filtres) {
172 172
 	$series_filtres = func_get_args();
173
-	array_shift($series_filtres);// skel
174
-	array_shift($series_filtres);// corps
173
+	array_shift($series_filtres); // skel
174
+	array_shift($series_filtres); // corps
175 175
 
176 176
 	// proteger les <INCLUDE> et tous les morceaux de php licites
177 177
 	if ($skel['process_ins'] == 'php') {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	if (is_array($r)) {
220 220
 		$dst[] = $r[0];
221 221
 
222
-		return $src[] = '___' . md5($r[0]) . '___';
222
+		return $src[] = '___'.md5($r[0]).'___';
223 223
 	}
224 224
 
225 225
 	// si on recoit pas un tableau, on renvoit les couples de substitution
Please login to merge, or discard this patch.
ecrire/iterateur/data.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 function inc_sql_to_array_dist($data) {
122 122
 	# sortir le connecteur de $data
123 123
 	preg_match(',^(?:(\w+):)?(.*)$,Sm', $data, $v);
124
-	$serveur = (string)$v[1];
124
+	$serveur = (string) $v[1];
125 125
 	$req = trim($v[2]);
126 126
 	if ($s = sql_query($req, $serveur)) {
127 127
 		$r = [];
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$json = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
147 147
 	} catch (JsonException $e) {
148 148
 		$json = null;
149
-		spip_log('Failed to parse Json data : ' . $e->getMessage(), _LOG_INFO);
149
+		spip_log('Failed to parse Json data : '.$e->getMessage(), _LOG_INFO);
150 150
 	}
151 151
 	return is_array($json) ? (array) $json : [];
152 152
 }
@@ -166,13 +166,13 @@  discard block
 block discarded – undo
166 166
 	$i = 1;
167 167
 	foreach ($entete as $k => $v) {
168 168
 		if (trim($v) == '') {
169
-			$v = 'col' . $i;
169
+			$v = 'col'.$i;
170 170
 		} // reperer des eventuelles cases vides
171 171
 		if (is_numeric($v) and $v < 0) {
172
-			$v = '__' . $v;
172
+			$v = '__'.$v;
173 173
 		} // ne pas risquer d'ecraser une cle numerique
174 174
 		if (is_numeric($v)) {
175
-			$v = '_' . $v;
175
+			$v = '_'.$v;
176 176
 		} // ne pas risquer d'ecraser une cle numerique
177 177
 		$v = strtolower(preg_replace(',\W+,', '_', translitteration($v)));
178 178
 		foreach ($csv as &$item) {
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
  * @return array|bool
259 259
  */
260 260
 function inc_pregfiles_to_array_dist($dir, $regexp = -1, $limit = 10000) {
261
-	return (array)preg_files($dir, $regexp, $limit);
261
+	return (array) preg_files($dir, $regexp, $limit);
262 262
 }
263 263
 
264 264
 /**
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
 	$glob_to_array = charger_fonction('glob_to_array', 'inc');
274 274
 	$a = $glob_to_array($data);
275 275
 	foreach ($a as &$v) {
276
-		$b = (array)@stat($v);
276
+		$b = (array) @stat($v);
277 277
 		foreach ($b as $k => $ignore) {
278 278
 			if (is_numeric($k)) {
279 279
 				unset($b[$k]);
280 280
 			}
281 281
 		}
282
-		$b['file'] = preg_replace('`/$`', '', $v) ;
282
+		$b['file'] = preg_replace('`/$`', '', $v);
283 283
 		$v = array_merge(
284 284
 			pathinfo($v),
285 285
 			$b
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	$xml_array = [];
300 300
 	for ($object->rewind(); $object->valid(); $object->next()) {
301 301
 		if (array_key_exists($key = $object->key(), $xml_array)) {
302
-			$key .= '-' . uniqid();
302
+			$key .= '-'.uniqid();
303 303
 		}
304 304
 		$vars = get_object_vars($object->current());
305 305
 		if (isset($vars['@attributes'])) {
Please login to merge, or discard this patch.
ecrire/inc/pipelines.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		}
65 65
 	}
66 66
 
67
-	$texte = $x . $texte;
67
+	$texte = $x.$texte;
68 68
 
69 69
 	return $texte;
70 70
 }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	|| ($pos = 0);
179 179
 
180 180
 	if (!str_contains(substr($texte, 0, $pos), '<!-- insert_head -->')) {
181
-		$insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n";
181
+		$insert = "\n".pipeline('insert_head', '<!-- f_insert_head -->')."\n";
182 182
 		$texte = substr_replace($texte, $insert, $pos, 0);
183 183
 	}
184 184
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 		}
211 211
 		$texte = substr_replace($texte, $x, $pos, 0);
212 212
 		// pas de preview en fenetre enfant
213
-		$x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='" . addslashes($GLOBALS['meta']['adresse_site']) . "';}</script>";
213
+		$x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='".addslashes($GLOBALS['meta']['adresse_site'])."';}</script>";
214 214
 		if (!$pos = stripos($texte, '<head') or !$pos = strpos($texte, '>', $pos)) {
215 215
 			$pos = -1;
216 216
 		}
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 
282 282
 	// inserer avant le </body> fermant si on peut, a la fin de la page sinon
283 283
 	if (($p = strpos($texte, '</body>')) !== false) {
284
-		$texte = substr($texte, 0, $p) . $code . substr($texte, $p);
284
+		$texte = substr($texte, 0, $p).$code.substr($texte, $p);
285 285
 	} else {
286 286
 		$texte .= $code;
287 287
 	}
Please login to merge, or discard this patch.
ecrire/inc/plugin.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 /** l'adresse du repertoire de telechargement et de decompactage des plugins */
24 24
 if (!defined('_DIR_PLUGINS_AUTO')) {
25
-	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/');
25
+	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/');
26 26
 }
27 27
 
28 28
 #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins.
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 				if ($dir) {
382 382
 					$dir .= '/';
383 383
 				}
384
-				$dir .= 'procure:' . $procure['nom'];
384
+				$dir .= 'procure:'.$procure['nom'];
385 385
 
386 386
 				$procure['etat'] = '?';
387 387
 				$procure['dir_type'] = $resume['dir_type'];
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 		$plug = $resume['dir'];
566 566
 		$k = $infos[$dir_type][$plug];
567 567
 
568
-		$plug = constant($dir_type) . $plug;
568
+		$plug = constant($dir_type).$plug;
569 569
 		if (!isset($msg[$p])) {
570 570
 			if (isset($resume['erreur']) and $resume['erreur']) {
571 571
 				$msg[$p] = [$resume['erreur']];
@@ -608,10 +608,10 @@  discard block
 block discarded – undo
608 608
 		$list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation'];
609 609
 	} elseif (!$raw) {
610 610
 		foreach ($list as $plug => $msg) {
611
-			$list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug])
612
-				. '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>';
611
+			$list[$plug] = '<li>'._T('plugin_impossible_activer', ['plugin' => $plug])
612
+				. '<ul><li>'.implode('</li><li>', $msg).'</li></ul></li>';
613 613
 		}
614
-		$list = '<ul>' . join("\n", $list) . '</ul>';
614
+		$list = '<ul>'.join("\n", $list).'</ul>';
615 615
 	}
616 616
 	if ($raz) {
617 617
 		effacer_meta('plugin_erreur_activation');
@@ -725,13 +725,13 @@  discard block
 block discarded – undo
725 725
 			if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
726 726
 				return _T("plugin_{$balise}_{$type}", [
727 727
 					'plugin' => $nom,
728
-					'version' => ' &ge; ' . $minimum
728
+					'version' => ' &ge; '.$minimum
729 729
 				]);
730 730
 			}
731 731
 			if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
732 732
 				return _T("plugin_{$balise}_{$type}", [
733 733
 					'plugin' => $nom,
734
-					'version' => ' &gt; ' . $minimum
734
+					'version' => ' &gt; '.$minimum
735 735
 				]);
736 736
 			}
737 737
 		}
@@ -740,13 +740,13 @@  discard block
 block discarded – undo
740 740
 			if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
741 741
 				return _T("plugin_{$balise}_{$type}", [
742 742
 					'plugin' => $nom,
743
-					'version' => ' &le; ' . $maximum
743
+					'version' => ' &le; '.$maximum
744 744
 				]);
745 745
 			}
746 746
 			if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
747 747
 				return _T("plugin_{$balise}_plugin", [
748 748
 					'plugin' => $nom,
749
-					'version' => ' &lt; ' . $maximum
749
+					'version' => ' &lt; '.$maximum
750 750
 				]);
751 751
 			}
752 752
 		}
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 		include_spip('inc/charger_plugin');
766 766
 		$url = '<br />'	. bouton_telechargement_plugin($url, 'lib');
767 767
 	}*/
768
-	return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>";
768
+	return _T('plugin_necessite_lib', ['lib' => $lib])." <a href='$url'>$url</a>";
769 769
 }
770 770
 
771 771
 
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 	foreach ($plugin_valides as $p => $resume) {
866 866
 		// Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
867 867
 		if (!str_starts_with($p, 'PHP:') and $p !== 'PHP') {
868
-			$header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : '');
868
+			$header[] = $p.($resume['version'] ? '('.$resume['version'].')' : '');
869 869
 		}
870 870
 		if ($resume['dir']) {
871 871
 			foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
@@ -890,11 +890,11 @@  discard block
 block discarded – undo
890 890
 	$header = strtolower(implode(',', $header));
891 891
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
892 892
 		ecrire_fichier(
893
-			_DIR_VAR . 'config.txt',
894
-			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header
893
+			_DIR_VAR.'config.txt',
894
+			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP').' '.$GLOBALS['spip_version_affichee'].' @ www.spip.net + '.$header
895 895
 		);
896 896
 	} else {
897
-		@unlink(_DIR_VAR . 'config.txt');
897
+		@unlink(_DIR_VAR.'config.txt');
898 898
 	}
899 899
 	// generer charger_plugins_chemin.php
900 900
 	plugins_precompile_chemin($plugin_valides, $ordre);
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
 			// definir le plugin, donc le path avant l'include du fichier options
949 949
 			// permet de faire des include_spip pour attraper un inc_ du plugin
950 950
 
951
-			$dir = $dir_type . ".'" . $plug . "/'";
951
+			$dir = $dir_type.".'".$plug."/'";
952 952
 
953 953
 			$prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
954 954
 			if (
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
 				if (!$info['chemin']) {
960 960
 					$chemins['public'][] = "_DIR_PLUGIN_$prefix";
961 961
 					$chemins['prive'][] = "_DIR_PLUGIN_$prefix";
962
-					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
962
+					if (is_dir(constant($dir_type).$plug.'/squelettes/')) {
963 963
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
964 964
 					}
965 965
 				}
@@ -980,13 +980,13 @@  discard block
 block discarded – undo
980 980
 								$dir = '';
981 981
 							}
982 982
 							if (strlen($dir)) {
983
-								$dir = rtrim($dir, '/') . '/';
983
+								$dir = rtrim($dir, '/').'/';
984 984
 							}
985 985
 							if (!isset($chemin['type']) or $chemin['type'] == 'public') {
986
-								$chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
986
+								$chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
987 987
 							}
988 988
 							if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
989
-								$chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
989
+								$chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
990 990
 							}
991 991
 						}
992 992
 					}
@@ -995,11 +995,11 @@  discard block
 block discarded – undo
995 995
 		}
996 996
 	}
997 997
 	if (count($chemins['public']) or count($chemins['prive'])) {
998
-		$contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode(
998
+		$contenu .= 'if (_DIR_RESTREINT) _chemin(['.implode(
999 999
 			',',
1000 1000
 			array_reverse($chemins['public'])
1001
-		) . "]);\n"
1002
-			. 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n";
1001
+		)."]);\n"
1002
+			. 'else _chemin(['.implode(',', array_reverse($chemins['prive']))."]);\n";
1003 1003
 	}
1004 1004
 
1005 1005
 	ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
 					and !str_contains($dir, ':') // exclure le cas des procure:
1049 1049
 					and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1050 1050
 				) {
1051
-					if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) {
1051
+					if (is_readable("$dir$plug/".($file = $info['prefix'].'_'.$charge.'.php'))) {
1052 1052
 						$info[$charge] = [$file];
1053 1053
 					}
1054 1054
 				}
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
 						) {
1066 1066
 							unset($info[$charge][$k]);
1067 1067
 						} else {
1068
-							$_file = $root_dir_type . ".'$plug/$file'";
1068
+							$_file = $root_dir_type.".'$plug/$file'";
1069 1069
 							$contenu[$charge] .= "include_once_check($_file);\n";
1070 1070
 						}
1071 1071
 					}
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 		}
1076 1076
 	}
1077 1077
 
1078
-	$contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1078
+	$contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options'];
1079 1079
 	$contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons)
1080 1080
 		. plugin_ongletbouton('onglets_plugins', $onglets);
1081 1081
 
@@ -1110,12 +1110,12 @@  discard block
 block discarded – undo
1110 1110
 		define("_UPDATED_$nom", $val);
1111 1111
 		define("_UPDATED_md5_$nom", $md5);
1112 1112
 	}
1113
-	$val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1113
+	$val = "unserialize('".str_replace("'", "\'", $val)."')";
1114 1114
 
1115 1115
 	return
1116 1116
 		"if (!function_exists('$nom')) {\n"
1117 1117
 		. "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1118
-		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1118
+		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n"
1119 1119
 		. "}\n";
1120 1120
 }
1121 1121
 
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
 	if (@is_readable(_CACHE_PLUGINS_OPT)) {
1139 1139
 		include_once(_CACHE_PLUGINS_OPT);
1140 1140
 	} else {
1141
-		spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT);
1141
+		spip_log('pipelines desactives: impossible de produire '._CACHE_PLUGINS_OPT);
1142 1142
 	}
1143 1143
 }
1144 1144
 
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
 			$dir_type = $plugin_valides[$p]['dir_type'];
1176 1176
 			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1177 1177
 			$plug = $plugin_valides[$p]['dir'];
1178
-			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_');
1178
+			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'].'_');
1179 1179
 			if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1180 1180
 				foreach ($info['pipeline'] as $pipe) {
1181 1181
 					$nom = $pipe['nom'];
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
 						}
1210 1210
 						if (isset($pipe['inclure'])) {
1211 1211
 							$GLOBALS['spip_matrice']["$prefix$action"] =
1212
-								"$root_dir_type:$plug/" . $pipe['inclure'];
1212
+								"$root_dir_type:$plug/".$pipe['inclure'];
1213 1213
 						}
1214 1214
 					}
1215 1215
 				}
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
 					$prepend_code['taches_generales_cron'] = '';
1220 1220
 				}
1221 1221
 				foreach ($info['genie'] as $genie) {
1222
-					$nom = $prefix . $genie['nom'];
1222
+					$nom = $prefix.$genie['nom'];
1223 1223
 					$periode = max(60, intval($genie['periode']));
1224 1224
 					if (charger_fonction($nom, 'genie', true)) {
1225 1225
 						$prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
@@ -1237,13 +1237,13 @@  discard block
 block discarded – undo
1237 1237
 				}
1238 1238
 				foreach ($info['style'] as $style) {
1239 1239
 					if (isset($style['path']) and $style['path']) {
1240
-						$code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1240
+						$code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) ";
1241 1241
 					} else {
1242
-						$code = "if (\$f='" . addslashes($style['url']) . "') ";
1242
+						$code = "if (\$f='".addslashes($style['url'])."') ";
1243 1243
 					}
1244 1244
 					$code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1245 1245
 					if (isset($style['media']) and strlen($style['media'])) {
1246
-						$code .= ' media="' . addslashes($style['media']) . '"';
1246
+						$code .= ' media="'.addslashes($style['media']).'"';
1247 1247
 					}
1248 1248
 					$code .= "/>';\n";
1249 1249
 					if ($style['type'] != 'prive') {
@@ -1263,9 +1263,9 @@  discard block
 block discarded – undo
1263 1263
 			if (isset($info['script']) and is_countable($info['script']) ? count($info['script']) : 0) {
1264 1264
 				foreach ($info['script'] as $script) {
1265 1265
 					if (isset($script['path']) and $script['path']) {
1266
-						$code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1266
+						$code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) ";
1267 1267
 					} else {
1268
-						$code = "if (\$f='" . addslashes($script['url']) . "') ";
1268
+						$code = "if (\$f='".addslashes($script['url'])."') ";
1269 1269
 					}
1270 1270
 					$code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1271 1271
 					if ($script['type'] != 'prive') {
@@ -1328,10 +1328,10 @@  discard block
 block discarded – undo
1328 1328
 		unset($GLOBALS['spip_pipeline']['all']);
1329 1329
 		$all_pipes = trim(array_shift($a));
1330 1330
 		if ($all_pipes) {
1331
-			$all_pipes = '|' . ltrim($all_pipes, '|');
1331
+			$all_pipes = '|'.ltrim($all_pipes, '|');
1332 1332
 		}
1333 1333
 		if (count($a)) {
1334
-			$all_pipes_end = '||' . array_shift($a);
1334
+			$all_pipes_end = '||'.array_shift($a);
1335 1335
 		}
1336 1336
 	}
1337 1337
 	$content = '';
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 		// Eclater le pipeline en filtres et appliquer chaque filtre
1349 1349
 		foreach ($pipe as $fonc) {
1350 1350
 			$fonc = trim($fonc);
1351
-			$s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1351
+			$s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n";
1352 1352
 			if (isset($GLOBALS['spip_matrice'][$fonc])) {
1353 1353
 				$file = $GLOBALS['spip_matrice'][$fonc];
1354 1354
 				$file = "'$file'";
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 					if (defined($root_dir)) {
1360 1360
 						$dir = $root_dir;
1361 1361
 					}
1362
-					$file = str_replace($regs[0], "'." . $dir . ".'", $file);
1362
+					$file = str_replace($regs[0], "'.".$dir.".'", $file);
1363 1363
 					$file = str_replace("''.", '', $file);
1364 1364
 					$file = str_replace(constant($dir), '', $file);
1365 1365
 				}
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
 		$content .= "// Pipeline $action \n"
1373 1373
 			. "function execute_pipeline_$action(&\$val){\n"
1374 1374
 			. $s_inc
1375
-			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1375
+			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '')
1376 1376
 			. $s_call
1377 1377
 			. "return \$val;\n}\n";
1378 1378
 	}
@@ -1428,9 +1428,9 @@  discard block
 block discarded – undo
1428 1428
 					$result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec'));
1429 1429
 					if (_IS_CLI) {
1430 1430
 						include_spip('inc/filtres');
1431
-						$trace = ltrim(textebrut($trace) . "\n" . $result);
1432
-						$trace = '    ' . str_replace("\n", "\n    ", $trace);
1433
-						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1431
+						$trace = ltrim(textebrut($trace)."\n".$result);
1432
+						$trace = '    '.str_replace("\n", "\n    ", $trace);
1433
+						echo "\n".($ok ? 'OK  ' : '/!\ ').textebrut($titre)."\n",
1434 1434
 						  $trace,
1435 1435
 						  "\n";
1436 1436
 					}
@@ -1465,15 +1465,15 @@  discard block
 block discarded – undo
1465 1465
 		$GLOBALS['fichier_php_compile_recent'] = 0;
1466 1466
 	}
1467 1467
 
1468
-	$contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1468
+	$contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>';
1469 1469
 	// si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1470 1470
 	// si pas de modif on ne touche pas au fichier initial
1471 1471
 	if (file_exists($nom)) {
1472 1472
 		if (substr($nom, -4) == '.php') {
1473
-			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1473
+			$fichier_tmp = substr($nom, 0, -4).'.tmp.php';
1474 1474
 		}
1475 1475
 		else {
1476
-			$fichier_tmp = $nom . '.tmp';
1476
+			$fichier_tmp = $nom.'.tmp';
1477 1477
 		}
1478 1478
 		file_put_contents($fichier_tmp, $contenu);
1479 1479
 		if (md5_file($nom) == md5_file($fichier_tmp)) {
Please login to merge, or discard this patch.
ecrire/inc/traduire.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	static $dirs = [];
44 44
 	$liste = [];
45 45
 	foreach (creer_chemin() as $dir) {
46
-		if (!isset($dirs[$a = $dir . $dirname])) {
46
+		if (!isset($dirs[$a = $dir.$dirname])) {
47 47
 			$dirs[$a] = (is_dir($a) || !$a);
48 48
 		}
49 49
 		if ($dirs[$a]) {
@@ -69,21 +69,21 @@  discard block
 block discarded – undo
69 69
  **/
70 70
 function chercher_module_lang($module, $lang = '') {
71 71
 	if ($lang) {
72
-		$lang = '_' . $lang;
72
+		$lang = '_'.$lang;
73 73
 	}
74 74
 
75 75
 	// 1) dans un repertoire nomme lang/ se trouvant sur le chemin
76 76
 	if (
77 77
 		$f = ($module == 'local'
78
-		? find_in_path($module . $lang . '.php', 'lang/')
79
-		: find_langs_in_path($module . $lang . '.php', 'lang/'))
78
+		? find_in_path($module.$lang.'.php', 'lang/')
79
+		: find_langs_in_path($module.$lang.'.php', 'lang/'))
80 80
 	) {
81 81
 		return is_array($f) ? $f : [$f];
82 82
 	}
83 83
 
84 84
 	// 2) directement dans le chemin (old style, uniquement pour local)
85 85
 	return (($module == 'local') or strpos($module, '/'))
86
-		? (($f = find_in_path($module . $lang . '.php')) ? [$f] : false)
86
+		? (($f = find_in_path($module.$lang.'.php')) ? [$f] : false)
87 87
 		: false;
88 88
 }
89 89
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
  **/
108 108
 function charger_langue($lang, $module = 'spip') {
109 109
 	static $langs = [];
110
-	$var = 'i18n_' . $module . '_' . $lang;
110
+	$var = 'i18n_'.$module.'_'.$lang;
111 111
 	if (!isset($langs[$lang])) {
112 112
 		$langs[$lang] = [];
113 113
 		if ($lang) {
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
 	}
123 123
 	foreach ($langs[$lang] as $l) {
124 124
 		if ($fichiers_lang = chercher_module_lang($module, $l)) {
125
-			$GLOBALS['idx_lang'] = 'i18n_' . $module . '_' . $l;
125
+			$GLOBALS['idx_lang'] = 'i18n_'.$module.'_'.$l;
126 126
 			$GLOBALS[$GLOBALS['idx_lang']] = lire_fichier_langue(array_shift($fichiers_lang));
127 127
 			surcharger_langue($fichiers_lang);
128 128
 			if ($l !== $lang) {
129
-				$GLOBALS[$var] = &$GLOBALS['i18n_' . $module . '_' . $l];
129
+				$GLOBALS[$var] = &$GLOBALS['i18n_'.$module.'_'.$l];
130 130
 			}
131
-			$GLOBALS['lang_' . $var] = $l;
131
+			$GLOBALS['lang_'.$var] = $l;
132 132
 			#spip_log("module de langue : {$module}_$l.php", 'traduire');
133 133
 			break;
134 134
 		}
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
  */
147 147
 function lire_fichier_langue(string $fichier): array {
148 148
 	$idx_lang_before = $GLOBALS['idx_lang'] ?? null;
149
-	$idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang') . '@temporaire';
149
+	$idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang').'@temporaire';
150 150
 	$GLOBALS['idx_lang'] = $idx_lang_tmp;
151 151
 	$idx_lang = include $fichier;
152 152
 	$GLOBALS['idx_lang'] = $idx_lang_before;
@@ -257,27 +257,27 @@  discard block
 block discarded – undo
257 257
 	} else {
258 258
 		$modules = ['spip', 'ecrire'];
259 259
 		$code = $ori;
260
-		$ori_complet = implode('|', $modules) . ':' . $ori;
260
+		$ori_complet = implode('|', $modules).':'.$ori;
261 261
 	}
262 262
 
263 263
 	$desc = new Description();
264 264
 
265 265
 	// parcourir tous les modules jusqu'a ce qu'on trouve
266 266
 	foreach ($modules as $module) {
267
-		$var = 'i18n_' . $module . '_' . $lang;
267
+		$var = 'i18n_'.$module.'_'.$lang;
268 268
 
269 269
 		if (empty($GLOBALS[$var])) {
270 270
 			charger_langue($lang, $module);
271 271
 			// surcharges persos -- on cherche
272 272
 			// (lang/)local_xx.php et/ou (lang/)local.php ...
273
-			if (!isset($local['local_' . $lang])) {
273
+			if (!isset($local['local_'.$lang])) {
274 274
 				// redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer)
275 275
 				$GLOBALS['idx_lang'] = $var;
276 276
 				// ... (lang/)local_xx.php
277
-				$local['local_' . $lang] = chercher_module_lang('local', $lang);
277
+				$local['local_'.$lang] = chercher_module_lang('local', $lang);
278 278
 			}
279
-			if ($local['local_' . $lang]) {
280
-				surcharger_langue($local['local_' . $lang]);
279
+			if ($local['local_'.$lang]) {
280
+				surcharger_langue($local['local_'.$lang]);
281 281
 			}
282 282
 			// ... puis (lang/)local.php
283 283
 			if (!isset($local['local'])) {
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 		if (isset($GLOBALS[$var][$code])) {
292 292
 			$desc->code = $code;
293 293
 			$desc->module = $module;
294
-			$desc->langue = $GLOBALS['lang_' . $var] ?? $lang;
294
+			$desc->langue = $GLOBALS['lang_'.$var] ?? $lang;
295 295
 			$desc->texte = $GLOBALS[$var][$code];
296 296
 			break;
297 297
 		}
@@ -349,13 +349,13 @@  discard block
 block discarded – undo
349 349
 	if (!$desc->mode and $desc->texte) {
350 350
 		// ne pas modifier 2 fois l'affichage
351 351
 		$desc->mode = 'traduction';
352
-		$classe = 'debug-traduction' . ($desc->module == 'ecrire' ? '-prive' : '');
352
+		$classe = 'debug-traduction'.($desc->module == 'ecrire' ? '-prive' : '');
353 353
 		$desc->texte = '<span '
354
-			. 'lang=' . $desc->langue
355
-			. ' class=' . $classe
356
-			. ' data-module=' . $desc->module
357
-			. ' data-code=' . $desc->code
358
-			. ' title=' . $modules . '(' . $desc->langue . ')>'
354
+			. 'lang='.$desc->langue
355
+			. ' class='.$classe
356
+			. ' data-module='.$desc->module
357
+			. ' data-code='.$desc->code
358
+			. ' title='.$modules.'('.$desc->langue.')>'
359 359
 			. $desc->texte
360 360
 			. '</span>';
361 361
 		$desc->texte = str_replace(
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Spacing   +125 added lines, -126 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
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	// passer en minuscules (cf les balises de formulaires)
80 80
 	// et inclure le fichier
81 81
 	if (
82
-		!$inc = include_spip($dossier . ($d = strtolower($nom)))
82
+		!$inc = include_spip($dossier.($d = strtolower($nom)))
83 83
 		// si le fichier truc/machin/nom.php n'existe pas,
84 84
 		// la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions
85 85
 		and strlen(dirname($dossier)) and dirname($dossier) != '.'
@@ -98,19 +98,19 @@  discard block
 block discarded – undo
98 98
 	}
99 99
 
100 100
 	// Echec : message d'erreur
101
-	spip_log("fonction $nom ($f ou $g) indisponible" .
101
+	spip_log("fonction $nom ($f ou $g) indisponible".
102 102
 		($inc ? '' : " (fichier $d absent de $dossier)"));
103 103
 
104 104
 	include_spip('inc/minipres');
105 105
 	echo minipres(
106 106
 		_T('forum_titre_erreur'),
107 107
 		$inc ?
108
-			_T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($f) . '</code>'])
108
+			_T('fonction_introuvable', ['fonction' => '<code>'.spip_htmlentities($f).'</code>'])
109 109
 			. '<br />'
110
-			. _T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($g) . '</code>'])
110
+			. _T('fonction_introuvable', ['fonction' => '<code>'.spip_htmlentities($g).'</code>'])
111 111
 			:
112
-			_T('fichier_introuvable', ['fichier' => '<code>' . spip_htmlentities($d) . '</code>']),
113
-		['all_inline' => true,'status' => 404]
112
+			_T('fichier_introuvable', ['fichier' => '<code>'.spip_htmlentities($d).'</code>']),
113
+		['all_inline' => true, 'status' => 404]
114 114
 	);
115 115
 	exit;
116 116
 }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
  *     - string : chemin du fichier trouvé
157 157
  **/
158 158
 function include_spip($f, $include = true) {
159
-	return find_in_path($f . '.php', '', $include);
159
+	return find_in_path($f.'.php', '', $include);
160 160
 }
161 161
 
162 162
 /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
  *     - string : chemin du fichier trouvé
177 177
  **/
178 178
 function require_spip($f) {
179
-	return find_in_path($f . '.php', '', 'required');
179
+	return find_in_path($f.'.php', '', 'required');
180 180
 }
181 181
 
182 182
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		// donc il faut l'inclure "en globals"
194 194
 		if ($f = find_in_path('mes_fonctions.php')) {
195 195
 			global $dossier_squelettes;
196
-			include_once(_ROOT_CWD . $f);
196
+			include_once(_ROOT_CWD.$f);
197 197
 		}
198 198
 
199 199
 		if (@is_readable(_CACHE_PLUGINS_FCT)) {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 	}
299 299
 
300 300
 	// appliquer notre fonction si elle existe
301
-	$fonc = 'execute_pipeline_' . strtolower($action);
301
+	$fonc = 'execute_pipeline_'.strtolower($action);
302 302
 	if (function_exists($fonc)) {
303 303
 		$val = $fonc($val);
304 304
 	} // plantage ?
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 function spip_log($message = null, $name = null) {
364 364
 	static $pre = [];
365 365
 	static $log;
366
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
366
+	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs);
367 367
 	if (!isset($regs[1]) or !$logname = $regs[1]) {
368 368
 		$logname = null;
369 369
 	}
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 		if (!is_string($message)) {
392 392
 			$message = print_r($message, true);
393 393
 		}
394
-		$log($pre[$niveau] . ' ' . $message, $logname);
394
+		$log($pre[$niveau].' '.$message, $logname);
395 395
 	}
396 396
 }
397 397
 
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 	foreach ($regexp as $r => $e) {
598 598
 		$regexp[$r] = str_replace('[]', '\[\]', preg_replace(',[^\w\d\[\]-],', '', $e));
599 599
 	}
600
-	$regexp = ',^(' . implode('|', $regexp) . '[[]?[]]?)(=.*)?$,';
600
+	$regexp = ',^('.implode('|', $regexp).'[[]?[]]?)(=.*)?$,';
601 601
 	$ajouts = array_flip(explode('|', $c));
602 602
 	$u = is_array($v) ? $v : rawurlencode((string) $v);
603 603
 	$testv = (is_array($v) ? count($v) : strlen((string) $v));
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 			// Ajout. Pour une variable, remplacer au meme endroit,
625 625
 			// pour un tableau ce sera fait dans la prochaine boucle
626 626
 			elseif (substr($r[1], -2) != '[]') {
627
-				$url[$n] = $r[1] . '=' . $u;
627
+				$url[$n] = $r[1].'='.$u;
628 628
 				unset($ajouts[$r[1]]);
629 629
 			}
630 630
 			// Pour les tableaux on laisse tomber les valeurs de
@@ -645,11 +645,11 @@  discard block
 block discarded – undo
645 645
 	} elseif ($testv) {
646 646
 		foreach ($ajouts as $k => $n) {
647 647
 			if (!is_array($v)) {
648
-				$url[] = $k . '=' . $u;
648
+				$url[] = $k.'='.$u;
649 649
 			} else {
650
-				$id = (substr($k, -2) == '[]') ? $k : ($k . '[]');
650
+				$id = (substr($k, -2) == '[]') ? $k : ($k.'[]');
651 651
 				foreach ($v as $w) {
652
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w));
652
+					$url[] = $id.'='.(is_array($w) ? 'Array' : rawurlencode($w));
653 653
 				}
654 654
 			}
655 655
 		}
@@ -660,10 +660,10 @@  discard block
 block discarded – undo
660 660
 
661 661
 	// recomposer l'adresse
662 662
 	if ($url) {
663
-		$a .= '?' . join($sep, $url);
663
+		$a .= '?'.join($sep, $url);
664 664
 	}
665 665
 
666
-	return $a . $ancre;
666
+	return $a.$ancre;
667 667
 }
668 668
 
669 669
 /**
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 			translitteration($ancre)
694 694
 		);
695 695
 	}
696
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
696
+	return $url.(strlen($ancre) ? '#'.$ancre : '');
697 697
 }
698 698
 
699 699
 /**
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
  * @return bool
810 810
  */
811 811
 function test_plugin_actif($plugin) {
812
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
812
+	return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
813 813
 }
814 814
 
815 815
 /**
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
 					$value = interdire_scripts($value, -1);
942 942
 				}
943 943
 				if (!empty($options['class'])) {
944
-					$value = "<span class='" . $options['class'] . "'>$value</span>";
944
+					$value = "<span class='".$options['class']."'>$value</span>";
945 945
 				}
946 946
 				$text = str_replace("@$name@", $value, $text);
947 947
 				unset($args[$name]);
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
 		// Si des variables n'ont pas ete inserees, le signaler
951 951
 		// (chaines de langues pas a jour)
952 952
 		if ($args) {
953
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
953
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
954 954
 		}
955 955
 	}
956 956
 
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
 function joli_repertoire($rep) {
975 975
 	$a = substr($rep, 0, 1);
976 976
 	if ($a <> '.' and $a <> '/') {
977
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
977
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
978 978
 	}
979 979
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
980 980
 
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
 			$p -= ($x * 1000);
1029 1029
 		}
1030 1030
 
1031
-		return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1031
+		return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1032 1032
 	}
1033 1033
 }
1034 1034
 
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
 	if ($taches and count($taches) and !spip_connect()) {
1096 1096
 		return false;
1097 1097
 	}
1098
-	spip_log('cron !', 'jq' . _LOG_DEBUG);
1098
+	spip_log('cron !', 'jq'._LOG_DEBUG);
1099 1099
 	if ($genie = charger_fonction('genie', 'inc', true)) {
1100 1100
 		return $genie($taches);
1101 1101
 	}
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
 
1200 1200
 	if ($queue_next_job_time == -1) {
1201 1201
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1202
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt');
1202
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt');
1203 1203
 		}
1204 1204
 		// utiliser un cache memoire si dispo
1205 1205
 		if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
@@ -1268,8 +1268,8 @@  discard block
 block discarded – undo
1268 1268
 		$src = '';
1269 1269
 	}
1270 1270
 	if ($script) {
1271
-		$script = ("/*<![CDATA[*/\n" .
1272
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1271
+		$script = ("/*<![CDATA[*/\n".
1272
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
1273 1273
 			'/*]]>*/');
1274 1274
 	}
1275 1275
 	if ($noscript) {
@@ -1355,13 +1355,13 @@  discard block
 block discarded – undo
1355 1355
 	if ($path_base == null) {
1356 1356
 		// Chemin standard depuis l'espace public
1357 1357
 		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1358
-			_DIR_RACINE . ':' .
1359
-			_DIR_RACINE . 'squelettes-dist/:' .
1360
-			_DIR_RACINE . 'prive/:' .
1358
+			_DIR_RACINE.':'.
1359
+			_DIR_RACINE.'squelettes-dist/:'.
1360
+			_DIR_RACINE.'prive/:'.
1361 1361
 			_DIR_RESTREINT;
1362 1362
 		// Ajouter squelettes/
1363
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1364
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1363
+		if (@is_dir(_DIR_RACINE.'squelettes')) {
1364
+			$path = _DIR_RACINE.'squelettes/:'.$path;
1365 1365
 		}
1366 1366
 		foreach (explode(':', $path) as $dir) {
1367 1367
 			if (strlen($dir) and substr($dir, -1) != '/') {
@@ -1373,7 +1373,7 @@  discard block
 block discarded – undo
1373 1373
 		// Et le(s) dossier(s) des squelettes nommes
1374 1374
 		if (strlen($GLOBALS['dossier_squelettes'])) {
1375 1375
 			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1376
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1376
+				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/');
1377 1377
 			}
1378 1378
 		}
1379 1379
 		$GLOBALS['path_sig'] = md5(serialize($path_full));
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
 
1385 1385
 	if (is_array($dir_path) or strlen($dir_path)) {
1386 1386
 		$tete = '';
1387
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1387
+		if (reset($path_base) == _DIR_RACINE.'squelettes/') {
1388 1388
 			$tete = array_shift($path_base);
1389 1389
 		}
1390 1390
 		$dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path));
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
 	// Et le(s) dossier(s) des squelettes nommes
1406 1406
 	if (strlen($GLOBALS['dossier_squelettes'])) {
1407 1407
 		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1408
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1408
+			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/');
1409 1409
 		}
1410 1410
 	}
1411 1411
 
@@ -1476,14 +1476,14 @@  discard block
 block discarded – undo
1476 1476
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1477 1477
 	if (
1478 1478
 		preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1479
-		and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg'
1479
+		and $file_svg_generique = substr($file, 0, -strlen($m[0])).'-xx.svg'
1480 1480
 		and $f = find_in_theme("$file_svg_generique")
1481 1481
 	) {
1482
-		if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) {
1482
+		if ($fsize = substr($f, 0, -6).$m[1].'.svg' and file_exists($fsize)) {
1483 1483
 			return $themefiles["$subdir$file"] = $fsize;
1484 1484
 		}
1485 1485
 		else {
1486
-			return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px';
1486
+			return $themefiles["$subdir$file"] = "$f?".$m[1].'px';
1487 1487
 		}
1488 1488
 	}
1489 1489
 
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
 			return $themefiles["$subdir$file"] = $f;
1494 1494
 		}
1495 1495
 	}
1496
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1496
+	spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme');
1497 1497
 
1498 1498
 	return $themefiles["$subdir$file"] = '';
1499 1499
 }
@@ -1601,8 +1601,8 @@  discard block
 block discarded – undo
1601 1601
 			return false;
1602 1602
 		}
1603 1603
 		if ($include and !isset($inc[$dirname][$file])) {
1604
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1605
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1604
+			include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1605
+			$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1606 1606
 		}
1607 1607
 
1608 1608
 		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
@@ -1615,14 +1615,14 @@  discard block
 block discarded – undo
1615 1615
 	}
1616 1616
 
1617 1617
 	foreach (creer_chemin() as $dir) {
1618
-		if (!isset($dirs[$a = $dir . $dirname])) {
1619
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1618
+		if (!isset($dirs[$a = $dir.$dirname])) {
1619
+			$dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a);
1620 1620
 		}
1621 1621
 		if ($dirs[$a]) {
1622
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1622
+			if (file_exists(_ROOT_CWD.($a .= $file))) {
1623 1623
 				if ($include and !isset($inc[$dirname][$file])) {
1624
-					include_once _ROOT_CWD . $a;
1625
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1624
+					include_once _ROOT_CWD.$a;
1625
+					$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1626 1626
 				}
1627 1627
 				if (!defined('_SAUVER_CHEMIN')) {
1628 1628
 					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
@@ -1632,7 +1632,7 @@  discard block
 block discarded – undo
1632 1632
 					define('_SAUVER_CHEMIN', true);
1633 1633
 				}
1634 1634
 
1635
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1635
+				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a;
1636 1636
 			}
1637 1637
 		}
1638 1638
 	}
@@ -1658,7 +1658,7 @@  discard block
 block discarded – undo
1658 1658
 		define('_SAUVER_CHEMIN', true);
1659 1659
 	}
1660 1660
 
1661
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1661
+	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false;
1662 1662
 }
1663 1663
 
1664 1664
 function clear_path_cache() {
@@ -1728,12 +1728,12 @@  discard block
 block discarded – undo
1728 1728
 	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1729 1729
 	// on a pas encore inclus flock.php
1730 1730
 	if (!function_exists('preg_files')) {
1731
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1731
+		include_once _ROOT_RESTREINT.'inc/flock.php';
1732 1732
 	}
1733 1733
 
1734 1734
 	// Parcourir le chemin
1735 1735
 	foreach (creer_chemin() as $d) {
1736
-		$f = $d . $dir;
1736
+		$f = $d.$dir;
1737 1737
 		if (@is_dir($f)) {
1738 1738
 			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs);
1739 1739
 			foreach ($liste as $chemin) {
@@ -1783,9 +1783,9 @@  discard block
 block discarded – undo
1783 1783
 	if ($type === 'defaut') {
1784 1784
 		$objet = objet_type($quoi);
1785 1785
 		if (
1786
-			$f = charger_fonction('generer_' . $objet . '_url', 'urls', true)
1786
+			$f = charger_fonction('generer_'.$objet.'_url', 'urls', true)
1787 1787
 			// deprecated
1788
-			or $f = charger_fonction('generer_url_' . $objet, 'urls', true)
1788
+			or $f = charger_fonction('generer_url_'.$objet, 'urls', true)
1789 1789
 		) {
1790 1790
 			return $f;
1791 1791
 		}
@@ -1798,7 +1798,7 @@  discard block
 block discarded – undo
1798 1798
 	}
1799 1799
 
1800 1800
 	// inclure le module d'url
1801
-	include_spip('urls/' . $url_type);
1801
+	include_spip('urls/'.$url_type);
1802 1802
 
1803 1803
 	switch ($quoi) {
1804 1804
 		case 'page':
@@ -1951,8 +1951,8 @@  discard block
 block discarded – undo
1951 1951
 	include_spip('base/connect_sql');
1952 1952
 	$id_type = id_table_objet($entite, $public);
1953 1953
 
1954
-	return _DIR_RACINE . get_spip_script('./')
1955
-	. '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1954
+	return _DIR_RACINE.get_spip_script('./')
1955
+	. '?'._SPIP_PAGE."=$entite&$id_type=$i&connect=$public"
1956 1956
 	. (!$args ? '' : "&$args")
1957 1957
 	. (!$ancre ? '' : "#$ancre");
1958 1958
 }
@@ -2127,7 +2127,7 @@  discard block
 block discarded – undo
2127 2127
 				!empty($_SERVER['QUERY_STRING'])
2128 2128
 				and !strpos($_SERVER['REQUEST_URI'], '?')
2129 2129
 			) {
2130
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2130
+				$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2131 2131
 			}
2132 2132
 		}
2133 2133
 	}
@@ -2165,9 +2165,9 @@  discard block
 block discarded – undo
2165 2165
 		array_shift($myself);
2166 2166
 		$myself = implode('/', $myself);
2167 2167
 	}
2168
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2168
+	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/';
2169 2169
 
2170
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2170
+	$url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/');
2171 2171
 
2172 2172
 	return $url;
2173 2173
 }
@@ -2206,16 +2206,16 @@  discard block
 block discarded – undo
2206 2206
 function generer_url_ecrire(?string $script = '', $args = '', $no_entities = false, $rel = false) {
2207 2207
 	$script ??= '';
2208 2208
 	if (!$rel) {
2209
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2209
+		$rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT;
2210 2210
 	} else {
2211 2211
 		if (!is_string($rel)) {
2212
-			$rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT;
2212
+			$rel = _DIR_RESTREINT ?: './'._SPIP_ECRIRE_SCRIPT;
2213 2213
 		}
2214 2214
 	}
2215 2215
 
2216 2216
 	[$script, $ancre] = array_pad(explode('#', $script), 2, null);
2217 2217
 	if ($script and ($script <> 'accueil' or $rel)) {
2218
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2218
+		$args = "?exec=$script".(!$args ? '' : "&$args");
2219 2219
 	} elseif ($args) {
2220 2220
 		$args = "?$args";
2221 2221
 	}
@@ -2223,7 +2223,7 @@  discard block
 block discarded – undo
2223 2223
 		$args .= "#$ancre";
2224 2224
 	}
2225 2225
 
2226
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2226
+	return $rel.($no_entities ? $args : str_replace('&', '&amp;', $args));
2227 2227
 }
2228 2228
 
2229 2229
 //
@@ -2305,10 +2305,10 @@  discard block
 block discarded – undo
2305 2305
 			$action = parametre_url($action, _SPIP_PAGE, $script, '&');
2306 2306
 		}
2307 2307
 		if ($args) {
2308
-			$action .= (strpos($action, '?') !== false ? '&' : '?') . $args;
2308
+			$action .= (strpos($action, '?') !== false ? '&' : '?').$args;
2309 2309
 		}
2310 2310
 		// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2311
-		$url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action"));
2311
+		$url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(',^/[.]/,', '/', "/$action"));
2312 2312
 	}
2313 2313
 
2314 2314
 	if (!$no_entities) {
@@ -2320,7 +2320,7 @@  discard block
 block discarded – undo
2320 2320
 
2321 2321
 function generer_url_prive($script, $args = '', $no_entities = false) {
2322 2322
 
2323
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2323
+	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php');
2324 2324
 }
2325 2325
 
2326 2326
 // Pour les formulaires en methode POST,
@@ -2355,8 +2355,7 @@  discard block
 block discarded – undo
2355 2355
 	. "><div>\n"
2356 2356
 	. "<input type='hidden' name='exec' value='$script1' />"
2357 2357
 	. $corps
2358
-	. (!$submit ? '' :
2359
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>'))
2358
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>'))
2360 2359
 	. "</div></form>\n";
2361 2360
 }
2362 2361
 
@@ -2381,14 +2380,14 @@  discard block
 block discarded – undo
2381 2380
 		? generer_url_ecrire(_request('exec'))
2382 2381
 		: generer_url_public();
2383 2382
 
2384
-	return "\n<form action='" .
2385
-	$h .
2386
-	"'" .
2387
-	$atts .
2388
-	">\n" .
2389
-	'<div>' .
2390
-	"\n<input type='hidden' name='action' value='$script' />" .
2391
-	$corps .
2383
+	return "\n<form action='".
2384
+	$h.
2385
+	"'".
2386
+	$atts.
2387
+	">\n".
2388
+	'<div>'.
2389
+	"\n<input type='hidden' name='action' value='$script' />".
2390
+	$corps.
2392 2391
 	'</div></form>';
2393 2392
 }
2394 2393
 
@@ -2416,7 +2415,7 @@  discard block
 block discarded – undo
2416 2415
 		: generer_url_public('', '', false, false);
2417 2416
 	$url = parametre_url($url, 'action', $script);
2418 2417
 	if ($args) {
2419
-		$url .= quote_amp('&' . $args);
2418
+		$url .= quote_amp('&'.$args);
2420 2419
 	}
2421 2420
 
2422 2421
 	if ($no_entities) {
@@ -2450,9 +2449,9 @@  discard block
 block discarded – undo
2450 2449
 	}
2451 2450
 	$url =
2452 2451
 		(($public ? _DIR_RACINE : _DIR_RESTREINT) ?: './')
2453
-	. $script . '/'
2452
+	. $script.'/'
2454 2453
 	. ($path ? trim($path, '/') : '')
2455
-	. ($args ? '?' . quote_amp($args) : '');
2454
+	. ($args ? '?'.quote_amp($args) : '');
2456 2455
 
2457 2456
 	if ($no_entities) {
2458 2457
 		$url = str_replace('&amp;', '&', $url);
@@ -2501,22 +2500,22 @@  discard block
 block discarded – undo
2501 2500
 
2502 2501
 	// le nom du repertoire plugins/ activables/desactivables
2503 2502
 	if (!defined('_DIR_PLUGINS')) {
2504
-		define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/');
2503
+		define('_DIR_PLUGINS', _DIR_RACINE.'plugins/');
2505 2504
 	}
2506 2505
 
2507 2506
 	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2508 2507
 	if (!defined('_DIR_PLUGINS_DIST')) {
2509
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/');
2508
+		define('_DIR_PLUGINS_DIST', _DIR_RACINE.'plugins-dist/');
2510 2509
 	}
2511 2510
 
2512 2511
 	// le nom du repertoire des librairies
2513 2512
 	if (!defined('_DIR_LIB')) {
2514
-		define('_DIR_LIB', _DIR_RACINE . 'lib/');
2513
+		define('_DIR_LIB', _DIR_RACINE.'lib/');
2515 2514
 	}
2516 2515
 
2517 2516
 	// répertoire des libs via Composer
2518 2517
 	if (!defined('_DIR_VENDOR')) {
2519
-		define('_DIR_VENDOR', _DIR_RACINE . 'vendor/');
2518
+		define('_DIR_VENDOR', _DIR_RACINE.'vendor/');
2520 2519
 	}
2521 2520
 
2522 2521
 	if (!defined('_DIR_IMG')) {
@@ -2526,29 +2525,29 @@  discard block
 block discarded – undo
2526 2525
 		define('_DIR_LOGOS', $pa);
2527 2526
 	}
2528 2527
 	if (!defined('_DIR_IMG_ICONES')) {
2529
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/');
2528
+		define('_DIR_IMG_ICONES', _DIR_LOGOS.'icones/');
2530 2529
 	}
2531 2530
 
2532 2531
 	if (!defined('_DIR_DUMP')) {
2533
-		define('_DIR_DUMP', $ti . 'dump/');
2532
+		define('_DIR_DUMP', $ti.'dump/');
2534 2533
 	}
2535 2534
 	if (!defined('_DIR_SESSIONS')) {
2536
-		define('_DIR_SESSIONS', $ti . 'sessions/');
2535
+		define('_DIR_SESSIONS', $ti.'sessions/');
2537 2536
 	}
2538 2537
 	if (!defined('_DIR_TRANSFERT')) {
2539
-		define('_DIR_TRANSFERT', $ti . 'upload/');
2538
+		define('_DIR_TRANSFERT', $ti.'upload/');
2540 2539
 	}
2541 2540
 	if (!defined('_DIR_CACHE')) {
2542
-		define('_DIR_CACHE', $ti . 'cache/');
2541
+		define('_DIR_CACHE', $ti.'cache/');
2543 2542
 	}
2544 2543
 	if (!defined('_DIR_CACHE_XML')) {
2545
-		define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/');
2544
+		define('_DIR_CACHE_XML', _DIR_CACHE.'xml/');
2546 2545
 	}
2547 2546
 	if (!defined('_DIR_SKELS')) {
2548
-		define('_DIR_SKELS', _DIR_CACHE . 'skel/');
2547
+		define('_DIR_SKELS', _DIR_CACHE.'skel/');
2549 2548
 	}
2550 2549
 	if (!defined('_DIR_AIDE')) {
2551
-		define('_DIR_AIDE', _DIR_CACHE . 'aide/');
2550
+		define('_DIR_AIDE', _DIR_CACHE.'aide/');
2552 2551
 	}
2553 2552
 	if (!defined('_DIR_TMP')) {
2554 2553
 		define('_DIR_TMP', $ti);
@@ -2577,27 +2576,27 @@  discard block
 block discarded – undo
2577 2576
 	// Declaration des fichiers
2578 2577
 
2579 2578
 	if (!defined('_CACHE_PLUGINS_PATH')) {
2580
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php');
2579
+		define('_CACHE_PLUGINS_PATH', _DIR_CACHE.'charger_plugins_chemins.php');
2581 2580
 	}
2582 2581
 	if (!defined('_CACHE_PLUGINS_OPT')) {
2583
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php');
2582
+		define('_CACHE_PLUGINS_OPT', _DIR_CACHE.'charger_plugins_options.php');
2584 2583
 	}
2585 2584
 	if (!defined('_CACHE_PLUGINS_FCT')) {
2586
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php');
2585
+		define('_CACHE_PLUGINS_FCT', _DIR_CACHE.'charger_plugins_fonctions.php');
2587 2586
 	}
2588 2587
 	if (!defined('_CACHE_PIPELINES')) {
2589
-		define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php');
2588
+		define('_CACHE_PIPELINES', _DIR_CACHE.'charger_pipelines.php');
2590 2589
 	}
2591 2590
 	if (!defined('_CACHE_CHEMIN')) {
2592
-		define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt');
2591
+		define('_CACHE_CHEMIN', _DIR_CACHE.'chemin.txt');
2593 2592
 	}
2594 2593
 
2595 2594
 	# attention .php obligatoire pour ecrire_fichier_securise
2596 2595
 	if (!defined('_FILE_META')) {
2597
-		define('_FILE_META', $ti . 'meta_cache.php');
2596
+		define('_FILE_META', $ti.'meta_cache.php');
2598 2597
 	}
2599 2598
 	if (!defined('_DIR_LOG')) {
2600
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2599
+		define('_DIR_LOG', _DIR_TMP.'log/');
2601 2600
 	}
2602 2601
 	if (!defined('_FILE_LOG')) {
2603 2602
 		define('_FILE_LOG', 'spip');
@@ -2614,8 +2613,8 @@  discard block
 block discarded – undo
2614 2613
 	if (!defined('_FILE_CONNECT')) {
2615 2614
 		define(
2616 2615
 			'_FILE_CONNECT',
2617
-			(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2618
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2616
+			(@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f
2617
+			: (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f
2619 2618
 			: false))
2620 2619
 		);
2621 2620
 	}
@@ -2627,7 +2626,7 @@  discard block
 block discarded – undo
2627 2626
 	if (!defined('_FILE_CHMOD')) {
2628 2627
 		define(
2629 2628
 			'_FILE_CHMOD',
2630
-			(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2629
+			(@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f
2631 2630
 			: false)
2632 2631
 		);
2633 2632
 	}
@@ -2640,10 +2639,10 @@  discard block
 block discarded – undo
2640 2639
 		define('_FILE_TMP_SUFFIX', '.tmp.php');
2641 2640
 	}
2642 2641
 	if (!defined('_FILE_CONNECT_TMP')) {
2643
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2642
+		define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX);
2644 2643
 	}
2645 2644
 	if (!defined('_FILE_CHMOD_TMP')) {
2646
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2645
+		define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX);
2647 2646
 	}
2648 2647
 
2649 2648
 	// Definition des droits d'acces en ecriture
@@ -2661,13 +2660,13 @@  discard block
 block discarded – undo
2661 2660
 		define('_DEFAULT_CHARSET', 'utf-8');
2662 2661
 	}
2663 2662
 	if (!defined('_ROOT_PLUGINS')) {
2664
-		define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/');
2663
+		define('_ROOT_PLUGINS', _ROOT_RACINE.'plugins/');
2665 2664
 	}
2666 2665
 	if (!defined('_ROOT_PLUGINS_DIST')) {
2667
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/');
2666
+		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE.'plugins-dist/');
2668 2667
 	}
2669 2668
 	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2670
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2669
+		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2671 2670
 	}
2672 2671
 
2673 2672
 	// La taille des Log
@@ -2704,7 +2703,7 @@  discard block
 block discarded – undo
2704 2703
 	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2705 2704
 	// pour le rendre surchargeable, on va provoquer un reecriture
2706 2705
 	// systematique du noyau ou une baisse de perfs => a etudier)
2707
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2706
+	include_once _ROOT_RESTREINT.'inc/flock.php';
2708 2707
 
2709 2708
 	// charger tout de suite le path et son cache
2710 2709
 	load_path_cache();
@@ -2740,7 +2739,7 @@  discard block
 block discarded – undo
2740 2739
 			!empty($_SERVER['QUERY_STRING'])
2741 2740
 			and !strpos($_SERVER['REQUEST_URI'], '?')
2742 2741
 		) {
2743
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2742
+			$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2744 2743
 		}
2745 2744
 	}
2746 2745
 
@@ -2776,7 +2775,7 @@  discard block
 block discarded – undo
2776 2775
 		) {
2777 2776
 			if (isset($GLOBALS['meta']['adresse_site'])) {
2778 2777
 				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2779
-				$uri_ref = ($uri_ref['path'] ?? '') . '/';
2778
+				$uri_ref = ($uri_ref['path'] ?? '').'/';
2780 2779
 			} else {
2781 2780
 				$uri_ref = '';
2782 2781
 			}
@@ -2870,7 +2869,7 @@  discard block
 block discarded – undo
2870 2869
 	}
2871 2870
 	if (!defined('_CACHE_RUBRIQUES')) {
2872 2871
 		/** Fichier cache pour le navigateur de rubrique du bandeau */
2873
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2872
+		define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
2874 2873
 	}
2875 2874
 	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2876 2875
 		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
@@ -3092,7 +3091,7 @@  discard block
 block discarded – undo
3092 3091
 					}
3093 3092
 					if (isset($GLOBALS['visiteur_session']['nom'])) {
3094 3093
 						spip_log($GLOBALS['visiteur_session']['nom']
3095
-							. ' ' . _VAR_MODE);
3094
+							. ' '._VAR_MODE);
3096 3095
 					}
3097 3096
 				} // pas autorise ?
3098 3097
 				else {
@@ -3107,7 +3106,7 @@  discard block
 block discarded – undo
3107 3106
 						if (strpos($self, 'page=login') === false) {
3108 3107
 							include_spip('inc/headers');
3109 3108
 							$redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&');
3110
-							redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true));
3109
+							redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true));
3111 3110
 						}
3112 3111
 					}
3113 3112
 					// sinon tant pis
@@ -3157,10 +3156,10 @@  discard block
 block discarded – undo
3157 3156
 **/
3158 3157
 function verifier_visiteur() {
3159 3158
 	@spip_initialisation_core(
3160
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3161
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3162
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3163
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3159
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
3160
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
3161
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
3162
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
3164 3163
 	);
3165 3164
 
3166 3165
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -3193,7 +3192,7 @@  discard block
 block discarded – undo
3193 3192
 	}
3194 3193
 
3195 3194
 	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3196
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3195
+	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
3197 3196
 		$session = charger_fonction('session', 'inc');
3198 3197
 		if ($session()) {
3199 3198
 			return $GLOBALS['visiteur_session']['statut'];
@@ -3273,7 +3272,7 @@  discard block
 block discarded – undo
3273 3272
 			'definir_session',
3274 3273
 			$GLOBALS['visiteur_session']
3275 3274
 				? serialize($GLOBALS['visiteur_session'])
3276
-				. '_' . @$_COOKIE['spip_session']
3275
+				. '_'.@$_COOKIE['spip_session']
3277 3276
 				: ''
3278 3277
 		);
3279 3278
 		$session = $s ? substr(md5($s), 0, 8) : '';
@@ -3321,8 +3320,8 @@  discard block
 block discarded – undo
3321 3320
 		foreach ($cookies_masques as $k) {
3322 3321
 			if (!empty($_COOKIE[$k])) {
3323 3322
 				$cookies_backup[$k] = $_COOKIE[$k];
3324
-				$_SERVER['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
3325
-				$_ENV['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
3323
+				$_SERVER['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
3324
+				$_ENV['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
3326 3325
 				$_COOKIE[$k] = $mask;
3327 3326
 			}
3328 3327
 		}
@@ -3440,11 +3439,11 @@  discard block
 block discarded – undo
3440 3439
 	$GLOBALS['_INC_PUBLIC']++;
3441 3440
 
3442 3441
 	// fix #4235
3443
-	$cache_utilise_session_appelant	= ($GLOBALS['cache_utilise_session'] ?? null);
3442
+	$cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null);
3444 3443
 
3445 3444
 
3446 3445
 	foreach (is_array($fond) ? $fond : [$fond] as $f) {
3447
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3446
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
3448 3447
 
3449 3448
 		$page = evaluer_fond($f, $contexte, $connect);
3450 3449
 		if ($page === '') {
@@ -3529,7 +3528,7 @@  discard block
 block discarded – undo
3529 3528
  * @return array|string
3530 3529
  */
3531 3530
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3532
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3531
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
3533 3532
 	if (!$pathinfo) {
3534 3533
 		return $f;
3535 3534
 	}
Please login to merge, or discard this patch.
ecrire/inc/charsets.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		$charset = 'cp1256';
91 91
 	}
92 92
 
93
-	if (find_in_path($charset . '.php', 'charsets/', true)) {
93
+	if (find_in_path($charset.'.php', 'charsets/', true)) {
94 94
 		return $charset;
95 95
 	} else {
96 96
 		spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'");
@@ -195,38 +195,38 @@  discard block
 block discarded – undo
195 195
 
196 196
 	if (!isset($trans[$charset][$charset_cible])) {
197 197
 		$trans[$charset][$charset_cible] = [
198
-			$p . chr(128) => '&#8364;',
199
-			$p . chr(129) => ' ', # pas affecte
200
-			$p . chr(130) => '&#8218;',
201
-			$p . chr(131) => '&#402;',
202
-			$p . chr(132) => '&#8222;',
203
-			$p . chr(133) => '&#8230;',
204
-			$p . chr(134) => '&#8224;',
205
-			$p . chr(135) => '&#8225;',
206
-			$p . chr(136) => '&#710;',
207
-			$p . chr(137) => '&#8240;',
208
-			$p . chr(138) => '&#352;',
209
-			$p . chr(139) => '&#8249;',
210
-			$p . chr(140) => '&#338;',
211
-			$p . chr(141) => ' ', # pas affecte
212
-			$p . chr(142) => '&#381;',
213
-			$p . chr(143) => ' ', # pas affecte
214
-			$p . chr(144) => ' ', # pas affecte
215
-			$p . chr(145) => '&#8216;',
216
-			$p . chr(146) => '&#8217;',
217
-			$p . chr(147) => '&#8220;',
218
-			$p . chr(148) => '&#8221;',
219
-			$p . chr(149) => '&#8226;',
220
-			$p . chr(150) => '&#8211;',
221
-			$p . chr(151) => '&#8212;',
222
-			$p . chr(152) => '&#732;',
223
-			$p . chr(153) => '&#8482;',
224
-			$p . chr(154) => '&#353;',
225
-			$p . chr(155) => '&#8250;',
226
-			$p . chr(156) => '&#339;',
227
-			$p . chr(157) => ' ', # pas affecte
228
-			$p . chr(158) => '&#382;',
229
-			$p . chr(159) => '&#376;',
198
+			$p.chr(128) => '&#8364;',
199
+			$p.chr(129) => ' ', # pas affecte
200
+			$p.chr(130) => '&#8218;',
201
+			$p.chr(131) => '&#402;',
202
+			$p.chr(132) => '&#8222;',
203
+			$p.chr(133) => '&#8230;',
204
+			$p.chr(134) => '&#8224;',
205
+			$p.chr(135) => '&#8225;',
206
+			$p.chr(136) => '&#710;',
207
+			$p.chr(137) => '&#8240;',
208
+			$p.chr(138) => '&#352;',
209
+			$p.chr(139) => '&#8249;',
210
+			$p.chr(140) => '&#338;',
211
+			$p.chr(141) => ' ', # pas affecte
212
+			$p.chr(142) => '&#381;',
213
+			$p.chr(143) => ' ', # pas affecte
214
+			$p.chr(144) => ' ', # pas affecte
215
+			$p.chr(145) => '&#8216;',
216
+			$p.chr(146) => '&#8217;',
217
+			$p.chr(147) => '&#8220;',
218
+			$p.chr(148) => '&#8221;',
219
+			$p.chr(149) => '&#8226;',
220
+			$p.chr(150) => '&#8211;',
221
+			$p.chr(151) => '&#8212;',
222
+			$p.chr(152) => '&#732;',
223
+			$p.chr(153) => '&#8482;',
224
+			$p.chr(154) => '&#353;',
225
+			$p.chr(155) => '&#8250;',
226
+			$p.chr(156) => '&#339;',
227
+			$p.chr(157) => ' ', # pas affecte
228
+			$p.chr(158) => '&#382;',
229
+			$p.chr(159) => '&#376;',
230 230
 		];
231 231
 		if ($charset_cible != 'unicode') {
232 232
 			foreach ($trans[$charset][$charset_cible] as $k => $c) {
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 					and is_array($GLOBALS['CHARSET'][$cset])
368 368
 				) {
369 369
 					foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
370
-						$trans[$charset][chr($key)] = '&#' . $val . ';';
370
+						$trans[$charset][chr($key)] = '&#'.$val.';';
371 371
 					}
372 372
 				}
373 373
 			}
@@ -433,11 +433,11 @@  discard block
 block discarded – undo
433 433
 					$h = dechex($e);
434 434
 					if ($s = isset($CHARSET_REVERSE[$charset][$e])) {
435 435
 						$s = $CHARSET_REVERSE[$charset][$e];
436
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($s);
437
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($s);
436
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($s);
437
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($s);
438 438
 					} else {
439
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($e);
440
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($e);
439
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($e);
440
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($e);
441 441
 					}
442 442
 				}
443 443
 			}
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 				and is_array($GLOBALS['CHARSET'][$cset])
485 485
 			) {
486 486
 				foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
487
-					$trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';');
487
+					$trans[$charset][chr($key)] = unicode2charset('&#'.$val.';');
488 488
 				}
489 489
 			}
490 490
 		}
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 				}
592 592
 				$thisPos++;
593 593
 			}
594
-			$encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';';
594
+			$encodedLetter = '&#'.preg_replace('/^0+/', '', $decimalCode).';';
595 595
 			$encodedString .= $encodedLetter;
596 596
 		}
597 597
 	}
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 			} // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html
635 635
 			else {
636 636
 				if ($word != 65279) {
637
-					$texte .= '&#' . $word . ';';
637
+					$texte .= '&#'.$word.';';
638 638
 				}
639 639
 			}
640 640
 		}
@@ -662,13 +662,13 @@  discard block
 block discarded – undo
662 662
 		return chr($num);
663 663
 	}
664 664
 	if ($num < 2048) {
665
-		return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
665
+		return chr(($num >> 6) + 192).chr(($num & 63) + 128);
666 666
 	}
667 667
 	if ($num < 65536) {
668
-		return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
668
+		return chr(($num >> 12) + 224).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
669 669
 	}
670 670
 	if ($num < 1_114_112) {
671
-		return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
671
+		return chr(($num >> 18) + 240).chr((($num >> 12) & 63) + 128).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
672 672
 	}
673 673
 
674 674
 	return '';
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 	while (preg_match(',&#0*([0-9]+);,S', $texte, $regs) and !isset($vu[$regs[1]])) {
736 736
 		$num = $regs[1];
737 737
 		$vu[$num] = true;
738
-		$s = '\u' . sprintf('%04x', $num);
738
+		$s = '\u'.sprintf('%04x', $num);
739 739
 		$texte = str_replace($regs[0], $s, $texte);
740 740
 	}
741 741
 
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
  **/
753 753
 function javascript_to_unicode($texte) {
754 754
 	while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) {
755
-		$texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte);
755
+		$texte = str_replace($regs[0], '&#'.hexdec($regs[1]).';', $texte);
756 756
 	}
757 757
 
758 758
 	return $texte;
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
 		return $texte;
798 798
 	}
799 799
 
800
-	$table_translit = 'translit' . $complexe;
800
+	$table_translit = 'translit'.$complexe;
801 801
 
802 802
 	// 2. Translitterer grace a la table predefinie
803 803
 	if (!isset($trans[$complexe])) {
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
  *    true s'il a un BOM
889 889
  **/
890 890
 function bom_utf8($texte): bool {
891
-	return (substr($texte, 0, 3) === chr(0xEF) . chr(0xBB) . chr(0xBF));
891
+	return (substr($texte, 0, 3) === chr(0xEF).chr(0xBB).chr(0xBF));
892 892
 }
893 893
 
894 894
 /**
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
 
1059 1059
 	$lettre1 = mb_strtoupper(spip_substr($c, 0, 1));
1060 1060
 
1061
-	return $lettre1 . spip_substr($c, 1);
1061
+	return $lettre1.spip_substr($c, 1);
1062 1062
 }
1063 1063
 
1064 1064
 /**
Please login to merge, or discard this patch.
ecrire/base/repair.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 	$res = admin_repair_tables();
40 40
 	if (!$res) {
41
-		$res = "<div class='error'>" . _T('avis_erreur_mysql') . ' ' . sql_errno() . ': ' . sql_error() . "</div>\n";
41
+		$res = "<div class='error'>"._T('avis_erreur_mysql').' '.sql_errno().': '.sql_error()."</div>\n";
42 42
 	} else {
43 43
 		include_spip('inc/rubriques');
44 44
 		calculer_rubriques();
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	$res .= pipeline('base_admin_repair', $res);
49 49
 	echo minipres(
50 50
 		_T('texte_tentative_recuperation'),
51
-		$res . generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))
51
+		$res.generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))
52 52
 	);
53 53
 }
54 54
 
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
 		$count = sql_countsel($tab);
92 92
 
93 93
 		if ($count > 1) {
94
-			$m .= '(' . _T('texte_compte_elements', ['count' => $count]) . ")\n";
94
+			$m .= '('._T('texte_compte_elements', ['count' => $count]).")\n";
95 95
 		} else {
96 96
 			if ($count == 1) {
97
-				$m .= '(' . _T('texte_compte_element', ['count' => $count]) . ")\n";
97
+				$m .= '('._T('texte_compte_element', ['count' => $count]).")\n";
98 98
 			} else {
99
-				$m .= '(' . _T('texte_vide') . ")\n";
99
+				$m .= '('._T('texte_vide').")\n";
100 100
 			}
101 101
 		}
102 102
 
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 			and $msg = join(
106 106
 				' ',
107 107
 				(is_resource($result_repair) or is_object($result_repair)) ? sql_fetch($result_repair) : $result_repair
108
-			) . ' '
108
+			).' '
109 109
 			and !str_contains($msg, ' OK ')
110 110
 		) {
111 111
 			$class = " class='notice'";
112
-			$m .= '<br /><tt>' . spip_htmlentities($msg) . "</tt>\n";
112
+			$m .= '<br /><tt>'.spip_htmlentities($msg)."</tt>\n";
113 113
 		} else {
114
-			$m .= ' ' . _T('texte_table_ok');
114
+			$m .= ' '._T('texte_table_ok');
115 115
 		}
116 116
 
117 117
 		$res .= "<div$class>$m</div>";
Please login to merge, or discard this patch.
ecrire/xml/sax.php 1 patch
Spacing   +21 added lines, -22 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 	$t = $phraseur->ouvrant[$depth] ?? ' ';
46 46
 	// espace initial signifie: deja integree au resultat
47 47
 	if ($t[0] != ' ') {
48
-		$phraseur->res .= '<' . $t . '>';
49
-		$phraseur->ouvrant[$depth] = ' ' . $t;
48
+		$phraseur->res .= '<'.$t.'>';
49
+		$phraseur->ouvrant[$depth] = ' '.$t;
50 50
 	}
51 51
 	$t = $phraseur->contenu[$depth];
52 52
 	// n'indenter que s'il y a un separateur avant
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 	foreach ($attrs as $k => $v) {
58 58
 		$delim = !str_contains($v, "'") ? "'" : '"';
59 59
 		$val = xml_entites_html($v);
60
-		$att .= $sep . $k . '=' . $delim
60
+		$att .= $sep.$k.'='.$delim
61 61
 			. ($delim !== '"' ? str_replace('&quot;', '"', $val) : $val)
62 62
 			. $delim;
63 63
 		$sep = "\n $depth";
64 64
 	}
65 65
 	$phraseur->depth .= '  ';
66 66
 	$phraseur->contenu[$phraseur->depth] = '';
67
-	$phraseur->ouvrant[$phraseur->depth] = $name . $att;
67
+	$phraseur->ouvrant[$phraseur->depth] = $name.$att;
68 68
 	$phraseur->reperes[$phraseur->depth] = xml_get_current_line_number($phraseur->sax);
69 69
 }
70 70
 
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
 	$ouv = $phraseur->ouvrant[$phraseur->depth];
73 73
 
74 74
 	if ($ouv[0] != ' ') {
75
-		$phraseur->ouvrant[$phraseur->depth] = ' ' . $ouv;
75
+		$phraseur->ouvrant[$phraseur->depth] = ' '.$ouv;
76 76
 	} else {
77 77
 		$ouv = '';
78 78
 	}
79 79
 	$t = $phraseur->contenu[$phraseur->depth];
80 80
 	$phraseur->depth = substr($phraseur->depth, 2);
81
-	$t = preg_replace("/[\n\t ]+$/", "\n" . $phraseur->depth, $t);
81
+	$t = preg_replace("/[\n\t ]+$/", "\n".$phraseur->depth, $t);
82 82
 
83 83
 	// fusion <balise></balise> en <balise />.
84 84
 	// ATTENTION,  certains clients http croient que fusion ==> pas d'atttributs
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	// (param fusion_bal)
88 88
 
89 89
 	if ($t || (($ouv != $name) and !$fusion_bal)) {
90
-		$phraseur->res .= ($ouv ? ('<' . $ouv . '>') : '') . $t . '</' . $name . '>';
90
+		$phraseur->res .= ($ouv ? ('<'.$ouv.'>') : '').$t.'</'.$name.'>';
91 91
 	} else {
92
-		$phraseur->res .= ($ouv ? ('<' . $ouv . ' />') : ('</' . $name . '>'));
92
+		$phraseur->res .= ($ouv ? ('<'.$ouv.' />') : ('</'.$name.'>'));
93 93
 	}
94 94
 }
95 95
 
@@ -131,16 +131,15 @@  discard block
 block discarded – undo
131 131
 		coordonnees_erreur(
132 132
 			$phraseur,
133 133
 			xml_error_string(xml_get_error_code($phraseur->sax))
134
-			. "<br />\n" .
135
-			(!$phraseur->depth ? '' :
136
-				('(' .
137
-					_T('erreur_balise_non_fermee') .
138
-					' <tt>' .
139
-					$phraseur->ouvrant[$phraseur->depth] .
140
-					'</tt> ' .
141
-					_T('ligne') .
142
-					' ' .
143
-					$phraseur->reperes[$phraseur->depth] .
134
+			. "<br />\n".
135
+			(!$phraseur->depth ? '' : ('('.
136
+					_T('erreur_balise_non_fermee').
137
+					' <tt>'.
138
+					$phraseur->ouvrant[$phraseur->depth].
139
+					'</tt> '.
140
+					_T('ligne').
141
+					' '.
142
+					$phraseur->reperes[$phraseur->depth].
144 143
 			") <br />\n"))
145 144
 		);
146 145
 	}
@@ -181,7 +180,7 @@  discard block
 block discarded – undo
181 180
 	// et escamoter le doctype que sax mange en php5 mais pas en  php4
182 181
 	if (!$doctype) {
183 182
 		if (!$r = analyser_doctype($page)) {
184
-			$page = _MESSAGE_DOCTYPE . _DOCTYPE_ECRIRE
183
+			$page = _MESSAGE_DOCTYPE._DOCTYPE_ECRIRE
185 184
 				. preg_replace(_REGEXP_DOCTYPE, '', $page);
186 185
 			$r = analyser_doctype($page);
187 186
 		}
@@ -288,18 +287,18 @@  discard block
 block discarded – undo
288 287
 					'rss-0.91.dtd'
289 288
 				];
290 289
 			} else {
291
-				$dtd = $topelement . '.dtd';
290
+				$dtd = $topelement.'.dtd';
292 291
 				$f = find_in_path($dtd);
293 292
 				if (file_exists($f)) {
294 293
 					return [$entete, 'SYSTEM', $f, $dtd];
295 294
 				}
296 295
 			}
297 296
 		}
298
-		spip_log('Dtd pas vu pour ' . substr($data, 0, 100));
297
+		spip_log('Dtd pas vu pour '.substr($data, 0, 100));
299 298
 
300 299
 		return [];
301 300
 	}
302
-	[$entete, , $topelement, $avail, $suite] = $page;
301
+	[$entete,, $topelement, $avail, $suite] = $page;
303 302
 
304 303
 	if (!preg_match('/^"([^"]*)"\s*(.*)$/', $suite, $r)) {
305 304
 		if (!preg_match("/^'([^']*)'\s*(.*)$/", $suite, $r)) {
Please login to merge, or discard this patch.