Completed
Push — master ( a04e6b...ef338c )
by cam
01:24
created
ecrire/install/etape_4.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 	// creer le repertoire cache, qui sert partout !
23 23
 	if (!@file_exists(_DIR_CACHE)) {
24
-		$rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE);
24
+		$rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE);
25 25
 		$rep = sous_repertoire(_DIR_TMP, $rep, true, true);
26 26
 	}
27 27
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	echo '<p>'
40 40
 		. _T(
41 41
 			'plugin_info_plugins_dist_1',
42
-			['plugins_dist' => '<tt>' . joli_repertoire(_DIR_PLUGINS_DIST) . '</tt>']
42
+			['plugins_dist' => '<tt>'.joli_repertoire(_DIR_PLUGINS_DIST).'</tt>']
43 43
 		)
44 44
 		. '</p>';
45 45
 
Please login to merge, or discard this patch.
ecrire/install/etape_ldap5.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,29 +52,28 @@  discard block
 block discarded – undo
52 52
 	$conn = "\$GLOBALS['ldap_base'] = '$base_ldap';\n"
53 53
 		. "\$GLOBALS['ldap_link'] = @ldap_connect('$adresse_ldap','$port_ldap');\n"
54 54
 		. "@ldap_set_option(\$GLOBALS['ldap_link'],LDAP_OPT_PROTOCOL_VERSION,'$protocole_ldap');\n"
55
-		. (($tls_ldap != 'oui') ? '' :
56
-			"@ldap_start_tls(\$GLOBALS['ldap_link']);\n")
55
+		. (($tls_ldap != 'oui') ? '' : "@ldap_start_tls(\$GLOBALS['ldap_link']);\n")
57 56
 		. "@ldap_bind(\$GLOBALS['ldap_link'],'$login_ldap','$pass_ldap');\n";
58 57
 
59 58
 	$champs = is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : [];
60 59
 	$res = '';
61 60
 	foreach ($champs as $champ => $v) {
62
-		$nom = 'ldap_' . $champ;
61
+		$nom = 'ldap_'.$champ;
63 62
 		$val = trim(_request($nom));
64 63
 		if (preg_match('/^\w*$/', $val)) {
65 64
 			if ($val) {
66 65
 				$val = _q($val);
67 66
 			}
68 67
 		} else {
69
-			$val = 'array(' . _q(preg_split('/\W+/', $val)) . ')';
68
+			$val = 'array('._q(preg_split('/\W+/', $val)).')';
70 69
 		};
71 70
 		if ($val) {
72
-			$res .= "'$champ' => " . $val . ',';
71
+			$res .= "'$champ' => ".$val.',';
73 72
 		}
74 73
 	}
75 74
 	$conn .= "\$GLOBALS['ldap_champs'] = array($res);\n";
76 75
 
77
-	install_fichier_connexion(_DIR_CONNECT . _FILE_LDAP, $conn);
76
+	install_fichier_connexion(_DIR_CONNECT._FILE_LDAP, $conn);
78 77
 }
79 78
 
80 79
 function etape_ldap5_suite() {
@@ -87,7 +86,7 @@  discard block
 block discarded – undo
87 86
 	);
88 87
 
89 88
 	echo generer_form_ecrire('install', (
90
-		"<input type='hidden' name='etape' value='3' />" .
89
+		"<input type='hidden' name='etape' value='3' />".
91 90
 		"<input type='hidden' name='ldap_present' value='true' />"
92 91
 		. bouton_suivant()));
93 92
 
Please login to merge, or discard this patch.
ecrire/genie/mail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 		$headers = '';
52 52
 		if (isset($page['entetes']) and count($page['entetes'])) {
53 53
 			foreach ($page['entetes'] as $k => $v) {
54
-				$headers .= (strlen($v) ? "$k: $v" : $k) . "\n";
54
+				$headers .= (strlen($v) ? "$k: $v" : $k)."\n";
55 55
 			}
56 56
 		}
57 57
 
Please login to merge, or discard this patch.
ecrire/genie/mise_a_jour.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 function genie_mise_a_jour_dist($t) {
30 30
 	include_spip('inc/meta');
31 31
 	$maj = info_maj('spip', 'SPIP', $GLOBALS['spip_version_branche']);
32
-	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche'] . "|$maj") : '', 'non');
32
+	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : '', 'non');
33 33
 
34 34
 	mise_a_jour_ecran_securite();
35 35
 
36
-	spip_log('Verification version SPIP : ' . ($maj ? $maj : 'version a jour'), 'verifie_maj');
36
+	spip_log('Verification version SPIP : '.($maj ? $maj : 'version a jour'), 'verifie_maj');
37 37
 
38 38
 	return 1;
39 39
 }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	// si l'ecran n'est pas deja present ou pas updatable, sortir
59 59
 	if (
60 60
 		!_URL_ECRAN_SECURITE
61
-		or !file_exists($filename = _DIR_ETC . 'ecran_securite.php')
61
+		or !file_exists($filename = _DIR_ETC.'ecran_securite.php')
62 62
 		or !is_writable($filename)
63 63
 		or !$last_modified = filemtime($filename)
64 64
 		or !$md5 = md5_file($filename)
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	}
68 68
 
69 69
 	include_spip('inc/distant');
70
-	$tmp_file = _DIR_TMP . 'ecran_securite.php';
70
+	$tmp_file = _DIR_TMP.'ecran_securite.php';
71 71
 	$url = parametre_url(_URL_ECRAN_SECURITE, 'md5', $md5);
72 72
 	$url = parametre_url($url, 'vspip', $GLOBALS['spip_version_branche']);
73 73
 	$res = recuperer_url($url, [
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 			include_once $tmp_file;
87 87
 			// ok, on le copie a la place de l'ecran existant
88 88
 			// en backupant l'ecran avant, au cas ou
89
-			@copy($filename, $filename . '-bck-' . date('Y-m-d-His', $last_modified));
89
+			@copy($filename, $filename.'-bck-'.date('Y-m-d-His', $last_modified));
90 90
 			@rename($tmp_file, $filename);
91 91
 		} else {
92 92
 			@unlink($tmp_file);
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
 
114 114
 	list($maj, $min, $rev) = preg_split('/\D+/', $version);
115 115
 
116
-	$nom = _DIR_CACHE_XML . _VERSIONS_LISTE;
116
+	$nom = _DIR_CACHE_XML._VERSIONS_LISTE;
117 117
 	$page = !file_exists($nom) ? '' : file_get_contents($nom);
118 118
 	$page = info_maj_cache($nom, $dir, $page);
119 119
 
120 120
 	// reperer toutes les versions de numero majeur superieur ou egal
121 121
 	// (a revoir quand on arrivera a SPIP V10 ...)
122 122
 	$p = substr('0123456789', intval($maj));
123
-	$p = ',/' . $file . '\D+([' . $p . ']+)\D+(\d+)(\D+(\d+))?.*?[.]zip",i';
123
+	$p = ',/'.$file.'\D+(['.$p.']+)\D+(\d+)(\D+(\d+))?.*?[.]zip",i';
124 124
 	preg_match_all($p, $page, $m, PREG_SET_ORDER);
125 125
 	$page = $page_majeure = '';
126 126
 
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 
130 130
 	foreach ($m as $v) {
131 131
 		$v = array_pad($v, 5, 0);
132
-		list(, $maj2, $min2, , $rev2) = $v;
133
-		$branche_maj = $maj2 . '.' . $min2;
134
-		$version_maj = $maj2 . '.' . $min2 . '.' . $rev2;
132
+		list(, $maj2, $min2,, $rev2) = $v;
133
+		$branche_maj = $maj2.'.'.$min2;
134
+		$version_maj = $maj2.'.'.$min2.'.'.$rev2;
135 135
 		// d'abord les mises à jour de la même branche
136 136
 		if (
137 137
 			(spip_version_compare($version, $version_maj, '<'))
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 		return '';
154 154
 	}
155 155
 
156
-	$message = $page ? _T('nouvelle_version_spip', ['version' => $page]) . ($page_majeure ? ' | ' : '') : '';
156
+	$message = $page ? _T('nouvelle_version_spip', ['version' => $page]).($page_majeure ? ' | ' : '') : '';
157 157
 	$message .= $page_majeure ? _T('nouvelle_version_spip_majeure', ['version' => $page_majeure]) : '';
158 158
 
159
-	return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$page'>" . $message . '</a>';
159
+	return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$page'>".$message.'</a>';
160 160
 }
161 161
 
162 162
 /**
@@ -179,12 +179,12 @@  discard block
 block discarded – undo
179 179
 function info_maj_cache($nom, $dir, $page = '') {
180 180
 	include_spip('inc/acces');
181 181
 	$alea_ephemere = charger_aleas();
182
-	$re = '<archives id="a' . $alea_ephemere . '">';
182
+	$re = '<archives id="a'.$alea_ephemere.'">';
183 183
 	if (preg_match("/$re/", $page)) {
184 184
 		return $page;
185 185
 	}
186 186
 
187
-	$url = _VERSIONS_SERVEUR . $dir . '/' . _VERSIONS_LISTE;
187
+	$url = _VERSIONS_SERVEUR.$dir.'/'._VERSIONS_LISTE;
188 188
 	$a = file_exists($nom) ? filemtime($nom) : '';
189 189
 	include_spip('inc/distant');
190 190
 	$res = recuperer_url_cache($url, ['if_modified_since' => $a]);
Please login to merge, or discard this patch.
ecrire/genie/maintenance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,8 +107,8 @@
 block discarded – undo
107 107
 function message_crash_tables() {
108 108
 	if ($crash = verifier_crash_tables()) {
109 109
 		return
110
-			'<strong>' . _T('texte_recuperer_base') . '</strong><br />'
111
-			. ' <tt>' . join(', ', $crash) . '</tt><br />'
110
+			'<strong>'._T('texte_recuperer_base').'</strong><br />'
111
+			. ' <tt>'.join(', ', $crash).'</tt><br />'
112 112
 			. generer_form_ecrire(
113 113
 				'base_repair',
114 114
 				_T('texte_crash_base'),
Please login to merge, or discard this patch.
ecrire/genie/optimiser.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
  */
52 52
 function optimiser_caches_contextes() {
53 53
 	sous_repertoire(_DIR_CACHE, 'contextes');
54
-	if (is_dir($d = _DIR_CACHE . 'contextes')) {
54
+	if (is_dir($d = _DIR_CACHE.'contextes')) {
55 55
 		include_spip('inc/invalideur');
56 56
 		purger_repertoire($d, ['mtime' => time() - 48 * 24 * 3600, 'limit' => 10000]);
57 57
 	}
@@ -96,16 +96,16 @@  discard block
 block discarded – undo
96 96
 		$tables[] = array_shift($row);
97 97
 	}
98 98
 
99
-	spip_log('optimiser_base_une_table ' . json_encode($tables), 'genie' . _LOG_DEBUG);
99
+	spip_log('optimiser_base_une_table '.json_encode($tables), 'genie'._LOG_DEBUG);
100 100
 	if ($tables) {
101 101
 		$table_op = intval(lire_config('optimiser_table', 0) + 1) % sizeof($tables);
102 102
 		ecrire_config('optimiser_table', $table_op);
103 103
 		$q = $tables[$table_op];
104
-		spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
104
+		spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie'._LOG_DEBUG);
105 105
 		if (sql_optimize($q)) {
106
-			spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
106
+			spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie'._LOG_DEBUG);
107 107
 		} else {
108
-			spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie' . _LOG_DEBUG);
108
+			spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie'._LOG_DEBUG);
109 109
 		}
110 110
 	}
111 111
 }
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 	sql_free($sel);
141 141
 
142 142
 	if ($in) {
143
-		sql_delete($table, sql_in($id, array_keys($in)) . ($and ? " AND $and" : ''));
144
-		spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: " . implode(', ', array_keys($in)), 'genie' . _LOG_DEBUG);
143
+		sql_delete($table, sql_in($id, array_keys($in)).($and ? " AND $and" : ''));
144
+		spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: ".implode(', ', array_keys($in)), 'genie'._LOG_DEBUG);
145 145
 	}
146 146
 
147 147
 	return count($in);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	if (!defined('_AUTEURS_DELAI_REJET_NOUVEAU')) {
222 222
 		define('_AUTEURS_DELAI_REJET_NOUVEAU', 45 * 24 * 3600);
223 223
 	}
224
-	sql_delete('spip_auteurs', "statut='nouveau' AND maj < " . sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU))));
224
+	sql_delete('spip_auteurs', "statut='nouveau' AND maj < ".sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU))));
225 225
 
226 226
 	/**
227 227
 	 * Permet aux plugins de compléter l'optimisation suite aux éléments disparus
@@ -242,5 +242,5 @@  discard block
 block discarded – undo
242 242
 	]);
243 243
 
244 244
 
245
-	spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie' . _LOG_DEBUG);
245
+	spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie'._LOG_DEBUG);
246 246
 }
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.
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 				if ($dir) {
374 374
 					$dir .= '/';
375 375
 				}
376
-				$dir .= 'procure:' . $procure['nom'];
376
+				$dir .= 'procure:'.$procure['nom'];
377 377
 
378 378
 				$procure['etat'] = '?';
379 379
 				$procure['dir_type'] = $resume['dir_type'];
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 		$plug = $resume['dir'];
558 558
 		$k = $infos[$dir_type][$plug];
559 559
 
560
-		$plug = constant($dir_type) . $plug;
560
+		$plug = constant($dir_type).$plug;
561 561
 		if (!isset($msg[$p])) {
562 562
 			if (isset($resume['erreur']) and $resume['erreur']) {
563 563
 				$msg[$p] = [$resume['erreur']];
@@ -600,10 +600,10 @@  discard block
 block discarded – undo
600 600
 		$list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation'];
601 601
 	} elseif (!$raw) {
602 602
 		foreach ($list as $plug => $msg) {
603
-			$list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug])
604
-				. '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>';
603
+			$list[$plug] = '<li>'._T('plugin_impossible_activer', ['plugin' => $plug])
604
+				. '<ul><li>'.implode('</li><li>', $msg).'</li></ul></li>';
605 605
 		}
606
-		$list = '<ul>' . join("\n", $list) . '</ul>';
606
+		$list = '<ul>'.join("\n", $list).'</ul>';
607 607
 	}
608 608
 	if ($raz) {
609 609
 		effacer_meta('plugin_erreur_activation');
@@ -717,13 +717,13 @@  discard block
 block discarded – undo
717 717
 			if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
718 718
 				return _T("plugin_${balise}_${type}", [
719 719
 					'plugin' => $nom,
720
-					'version' => ' &ge; ' . $minimum
720
+					'version' => ' &ge; '.$minimum
721 721
 				]);
722 722
 			}
723 723
 			if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
724 724
 				return _T("plugin_${balise}_${type}", [
725 725
 					'plugin' => $nom,
726
-					'version' => ' &gt; ' . $minimum
726
+					'version' => ' &gt; '.$minimum
727 727
 				]);
728 728
 			}
729 729
 		}
@@ -732,13 +732,13 @@  discard block
 block discarded – undo
732 732
 			if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
733 733
 				return _T("plugin_${balise}_${type}", [
734 734
 					'plugin' => $nom,
735
-					'version' => ' &le; ' . $maximum
735
+					'version' => ' &le; '.$maximum
736 736
 				]);
737 737
 			}
738 738
 			if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
739 739
 				return _T("plugin_${balise}_plugin", [
740 740
 					'plugin' => $nom,
741
-					'version' => ' &lt; ' . $maximum
741
+					'version' => ' &lt; '.$maximum
742 742
 				]);
743 743
 			}
744 744
 		}
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 		include_spip('inc/charger_plugin');
758 758
 		$url = '<br />'	. bouton_telechargement_plugin($url, 'lib');
759 759
 	}*/
760
-	return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>";
760
+	return _T('plugin_necessite_lib', ['lib' => $lib])." <a href='$url'>$url</a>";
761 761
 }
762 762
 
763 763
 
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 	foreach ($plugin_valides as $p => $resume) {
858 858
 		// Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
859 859
 		if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') {
860
-			$header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : '');
860
+			$header[] = $p.($resume['version'] ? '('.$resume['version'].')' : '');
861 861
 		}
862 862
 		if ($resume['dir']) {
863 863
 			foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
@@ -882,11 +882,11 @@  discard block
 block discarded – undo
882 882
 	$header = strtolower(implode(',', $header));
883 883
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
884 884
 		ecrire_fichier(
885
-			_DIR_VAR . 'config.txt',
886
-			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header
885
+			_DIR_VAR.'config.txt',
886
+			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP').' '.$GLOBALS['spip_version_affichee'].' @ www.spip.net + '.$header
887 887
 		);
888 888
 	} else {
889
-		@unlink(_DIR_VAR . 'config.txt');
889
+		@unlink(_DIR_VAR.'config.txt');
890 890
 	}
891 891
 	// generer charger_plugins_chemin.php
892 892
 	plugins_precompile_chemin($plugin_valides, $ordre);
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
 			// definir le plugin, donc le path avant l'include du fichier options
941 941
 			// permet de faire des include_spip pour attraper un inc_ du plugin
942 942
 
943
-			$dir = $dir_type . ".'" . $plug . "/'";
943
+			$dir = $dir_type.".'".$plug."/'";
944 944
 
945 945
 			$prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
946 946
 			if (
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
 				if (!$info['chemin']) {
952 952
 					$chemins['public'][] = "_DIR_PLUGIN_$prefix";
953 953
 					$chemins['prive'][] = "_DIR_PLUGIN_$prefix";
954
-					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
954
+					if (is_dir(constant($dir_type).$plug.'/squelettes/')) {
955 955
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
956 956
 					}
957 957
 				}
@@ -972,13 +972,13 @@  discard block
 block discarded – undo
972 972
 								$dir = '';
973 973
 							}
974 974
 							if (strlen($dir)) {
975
-								$dir = rtrim($dir, '/') . '/';
975
+								$dir = rtrim($dir, '/').'/';
976 976
 							}
977 977
 							if (!isset($chemin['type']) or $chemin['type'] == 'public') {
978
-								$chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
978
+								$chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
979 979
 							}
980 980
 							if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
981
-								$chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
981
+								$chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
982 982
 							}
983 983
 						}
984 984
 					}
@@ -987,11 +987,11 @@  discard block
 block discarded – undo
987 987
 		}
988 988
 	}
989 989
 	if (count($chemins['public']) or count($chemins['prive'])) {
990
-		$contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode(
990
+		$contenu .= 'if (_DIR_RESTREINT) _chemin(['.implode(
991 991
 			',',
992 992
 			array_reverse($chemins['public'])
993
-		) . "]);\n"
994
-			. 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n";
993
+		)."]);\n"
994
+			. 'else _chemin(['.implode(',', array_reverse($chemins['prive']))."]);\n";
995 995
 	}
996 996
 
997 997
 	ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 					and strpos($dir, ':') === false // exclure le cas des procure:
1041 1041
 					and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1042 1042
 				) {
1043
-					if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) {
1043
+					if (is_readable("$dir$plug/".($file = $info['prefix'].'_'.$charge.'.php'))) {
1044 1044
 						$info[$charge] = [$file];
1045 1045
 					}
1046 1046
 				}
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
 						) {
1058 1058
 							unset($info[$charge][$k]);
1059 1059
 						} else {
1060
-							$_file = $root_dir_type . ".'$plug/$file'";
1060
+							$_file = $root_dir_type.".'$plug/$file'";
1061 1061
 							$contenu[$charge] .= "include_once_check($_file);\n";
1062 1062
 						}
1063 1063
 					}
@@ -1067,7 +1067,7 @@  discard block
 block discarded – undo
1067 1067
 		}
1068 1068
 	}
1069 1069
 
1070
-	$contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1070
+	$contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options'];
1071 1071
 	$contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons)
1072 1072
 		. plugin_ongletbouton('onglets_plugins', $onglets);
1073 1073
 
@@ -1102,12 +1102,12 @@  discard block
 block discarded – undo
1102 1102
 		define("_UPDATED_$nom", $val);
1103 1103
 		define("_UPDATED_md5_$nom", $md5);
1104 1104
 	}
1105
-	$val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1105
+	$val = "unserialize('".str_replace("'", "\'", $val)."')";
1106 1106
 
1107 1107
 	return
1108 1108
 		"if (!function_exists('$nom')) {\n"
1109 1109
 		. "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1110
-		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1110
+		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n"
1111 1111
 		. "}\n";
1112 1112
 }
1113 1113
 
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
 	if (@is_readable(_CACHE_PLUGINS_OPT)) {
1131 1131
 		include_once(_CACHE_PLUGINS_OPT);
1132 1132
 	} else {
1133
-		spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT);
1133
+		spip_log('pipelines desactives: impossible de produire '._CACHE_PLUGINS_OPT);
1134 1134
 	}
1135 1135
 }
1136 1136
 
@@ -1167,7 +1167,7 @@  discard block
 block discarded – undo
1167 1167
 			$dir_type = $plugin_valides[$p]['dir_type'];
1168 1168
 			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1169 1169
 			$plug = $plugin_valides[$p]['dir'];
1170
-			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_');
1170
+			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'].'_');
1171 1171
 			if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1172 1172
 				foreach ($info['pipeline'] as $pipe) {
1173 1173
 					$nom = $pipe['nom'];
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 						}
1202 1202
 						if (isset($pipe['inclure'])) {
1203 1203
 							$GLOBALS['spip_matrice']["$prefix$action"] =
1204
-								"$root_dir_type:$plug/" . $pipe['inclure'];
1204
+								"$root_dir_type:$plug/".$pipe['inclure'];
1205 1205
 						}
1206 1206
 					}
1207 1207
 				}
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
 					$prepend_code['taches_generales_cron'] = '';
1212 1212
 				}
1213 1213
 				foreach ($info['genie'] as $genie) {
1214
-					$nom = $prefix . $genie['nom'];
1214
+					$nom = $prefix.$genie['nom'];
1215 1215
 					$periode = max(60, intval($genie['periode']));
1216 1216
 					if (charger_fonction($nom, 'genie', true)) {
1217 1217
 						$prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
@@ -1229,13 +1229,13 @@  discard block
 block discarded – undo
1229 1229
 				}
1230 1230
 				foreach ($info['style'] as $style) {
1231 1231
 					if (isset($style['path']) and $style['path']) {
1232
-						$code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1232
+						$code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) ";
1233 1233
 					} else {
1234
-						$code = "if (\$f='" . addslashes($style['url']) . "') ";
1234
+						$code = "if (\$f='".addslashes($style['url'])."') ";
1235 1235
 					}
1236 1236
 					$code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1237 1237
 					if (isset($style['media']) and strlen($style['media'])) {
1238
-						$code .= ' media="' . addslashes($style['media']) . '"';
1238
+						$code .= ' media="'.addslashes($style['media']).'"';
1239 1239
 					}
1240 1240
 					$code .= "/>';\n";
1241 1241
 					if ($style['type'] != 'prive') {
@@ -1255,9 +1255,9 @@  discard block
 block discarded – undo
1255 1255
 			if (isset($info['script']) and count($info['script'])) {
1256 1256
 				foreach ($info['script'] as $script) {
1257 1257
 					if (isset($script['path']) and $script['path']) {
1258
-						$code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1258
+						$code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) ";
1259 1259
 					} else {
1260
-						$code = "if (\$f='" . addslashes($script['url']) . "') ";
1260
+						$code = "if (\$f='".addslashes($script['url'])."') ";
1261 1261
 					}
1262 1262
 					$code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1263 1263
 					if ($script['type'] != 'prive') {
@@ -1320,10 +1320,10 @@  discard block
 block discarded – undo
1320 1320
 		unset($GLOBALS['spip_pipeline']['all']);
1321 1321
 		$all_pipes = trim(array_shift($a));
1322 1322
 		if ($all_pipes) {
1323
-			$all_pipes = '|' . ltrim($all_pipes, '|');
1323
+			$all_pipes = '|'.ltrim($all_pipes, '|');
1324 1324
 		}
1325 1325
 		if (count($a)) {
1326
-			$all_pipes_end = '||' . array_shift($a);
1326
+			$all_pipes_end = '||'.array_shift($a);
1327 1327
 		}
1328 1328
 	}
1329 1329
 	$content = '';
@@ -1340,7 +1340,7 @@  discard block
 block discarded – undo
1340 1340
 		// Eclater le pipeline en filtres et appliquer chaque filtre
1341 1341
 		foreach ($pipe as $fonc) {
1342 1342
 			$fonc = trim($fonc);
1343
-			$s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1343
+			$s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n";
1344 1344
 			if (isset($GLOBALS['spip_matrice'][$fonc])) {
1345 1345
 				$file = $GLOBALS['spip_matrice'][$fonc];
1346 1346
 				$file = "'$file'";
@@ -1351,7 +1351,7 @@  discard block
 block discarded – undo
1351 1351
 					if (defined($root_dir)) {
1352 1352
 						$dir = $root_dir;
1353 1353
 					}
1354
-					$file = str_replace($regs[0], "'." . $dir . ".'", $file);
1354
+					$file = str_replace($regs[0], "'.".$dir.".'", $file);
1355 1355
 					$file = str_replace("''.", '', $file);
1356 1356
 					$file = str_replace(constant($dir), '', $file);
1357 1357
 				}
@@ -1364,7 +1364,7 @@  discard block
 block discarded – undo
1364 1364
 		$content .= "// Pipeline $action \n"
1365 1365
 			. "function execute_pipeline_$action(&\$val){\n"
1366 1366
 			. $s_inc
1367
-			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1367
+			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '')
1368 1368
 			. $s_call
1369 1369
 			. "return \$val;\n}\n";
1370 1370
 	}
@@ -1420,9 +1420,9 @@  discard block
 block discarded – undo
1420 1420
 					$result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec'));
1421 1421
 					if (_IS_CLI) {
1422 1422
 						include_spip('inc/filtres');
1423
-						$trace = ltrim(textebrut($trace) . "\n" . $result);
1424
-						$trace = '    ' . str_replace("\n", "\n    ", $trace);
1425
-						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1423
+						$trace = ltrim(textebrut($trace)."\n".$result);
1424
+						$trace = '    '.str_replace("\n", "\n    ", $trace);
1425
+						echo "\n".($ok ? 'OK  ' : '/!\ ').textebrut($titre)."\n",
1426 1426
 						  $trace,
1427 1427
 						  "\n";
1428 1428
 					}
@@ -1457,15 +1457,15 @@  discard block
 block discarded – undo
1457 1457
 		$GLOBALS['fichier_php_compile_recent'] = 0;
1458 1458
 	}
1459 1459
 
1460
-	$contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1460
+	$contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>';
1461 1461
 	// si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1462 1462
 	// si pas de modif on ne touche pas au fichier initial
1463 1463
 	if (file_exists($nom)) {
1464 1464
 		if (substr($nom, -4) == '.php') {
1465
-			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1465
+			$fichier_tmp = substr($nom, 0, -4).'.tmp.php';
1466 1466
 		}
1467 1467
 		else {
1468
-			$fichier_tmp = $nom . '.tmp';
1468
+			$fichier_tmp = $nom.'.tmp';
1469 1469
 		}
1470 1470
 		file_put_contents($fichier_tmp, $contenu);
1471 1471
 		if (md5_file($nom) == md5_file($fichier_tmp)) {
Please login to merge, or discard this patch.
ecrire/inc/filtres_images_mini.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 	$hsl = _couleur_hex_to_hsl($couleur);
205 205
 	$hsl = [
206 206
 		'h' => round($hsl['h'] * 360),
207
-		's' => round($hsl['s'] * 100) . '%',
208
-		'l' => round($hsl['l'] * 100) . '%'
207
+		's' => round($hsl['s'] * 100).'%',
208
+		'l' => round($hsl['l'] * 100).'%'
209 209
 	];
210 210
 	if ($format === null) {
211 211
 		return "hsl({$hsl['h']}, {$hsl['s']}, {$hsl['l']})";
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
 	$process = 'AUTO'
385 385
 ) {
386 386
 	// PHP 7+ type hint
387
-	$img = (string)$img;
388
-	$taille_x = (int)$taille_x;
389
-	$taille_y = (int)$taille_y;
390
-	$force = (bool)$force;
391
-	$process = (string)$process;
387
+	$img = (string) $img;
388
+	$taille_x = (int) $taille_x;
389
+	$taille_y = (int) $taille_y;
390
+	$force = (bool) $force;
391
+	$process = (string) $process;
392 392
 
393 393
 	if (!$img) {
394 394
 		return '';
@@ -465,11 +465,11 @@  discard block
 block discarded – undo
465 465
 	$process = 'AUTO'
466 466
 ) {
467 467
 	// PHP 7+ type hint
468
-	$img = (string)$img;
469
-	$taille = (int)$taille;
470
-	$taille_y = (int)$taille_y;
471
-	$force = (bool)$force;
472
-	$process = (string)$process;
468
+	$img = (string) $img;
469
+	$taille = (int) $taille;
470
+	$taille_y = (int) $taille_y;
471
+	$force = (bool) $force;
472
+	$process = (string) $process;
473 473
 
474 474
 	// Determiner la taille x,y maxi
475 475
 	// prendre le reglage de previsu par defaut
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 	$background_color = 'white'
513 513
 ) {
514 514
 	if (function_exists('image_recadre') && ($GLOBALS['meta']['image_process'] ?? '') === 'gd2') {
515
-		return image_reduire(image_recadre($im, $width . ':' . $height, '-', $position, $background_color), $width, $height);
515
+		return image_reduire(image_recadre($im, $width.':'.$height, '-', $position, $background_color), $width, $height);
516 516
 	} else { return image_passe_partout($im, $width, $height);
517 517
 	}
518 518
 }
@@ -533,9 +533,9 @@  discard block
 block discarded – undo
533 533
  **/
534 534
 function image_reduire_par($img, $val = 1, $force = false) {
535 535
 	// PHP 7+ type hint
536
-	$img = (string)$img;
537
-	$val = (int)$val;
538
-	$force = (bool)$force;
536
+	$img = (string) $img;
537
+	$val = (int) $val;
538
+	$force = (bool) $force;
539 539
 
540 540
 	list($hauteur, $largeur) = taille_image($img);
541 541
 
Please login to merge, or discard this patch.
ecrire/inc/filtres_mime.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	static $t1 = ['&', '<', '>'];
121 121
 	static $t2 = ['&amp;', '&lt;', '&gt;'];
122 122
 
123
-	return '<pre>' . str_replace($t1, $t2, $t) . '</pre>';
123
+	return '<pre>'.str_replace($t1, $t2, $t).'</pre>';
124 124
 }
125 125
 
126 126
 /**
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
 	foreach ($lignes as &$l) {
141 141
 		$l = join('|', $l);
142 142
 	}
143
-	$corps = join("\n", $lignes) . "\n";
144
-	$corps = $caption .
145
-		"\n|{{" .
146
-		join('}}|{{', $entete) .
147
-		'}}|' .
148
-		"\n|" .
143
+	$corps = join("\n", $lignes)."\n";
144
+	$corps = $caption.
145
+		"\n|{{".
146
+		join('}}|{{', $entete).
147
+		'}}|'.
148
+		"\n|".
149 149
 		str_replace("\n", "|\n|", $corps);
150 150
 	include_spip('inc/texte');
151 151
 
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
 		}
188 188
 	}
189 189
 	// Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ?
190
-	$t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t));
190
+	$t = safehtml(preg_replace(',<script'.'.*?</script>,is', '', $t));
191 191
 
192
-	return (!$style ? '' : "\n<style>" . $style . '</style>') . $t;
192
+	return (!$style ? '' : "\n<style>".$style.'</style>').$t;
193 193
 }
194 194
 
195 195
 /**
Please login to merge, or discard this patch.