Completed
Push — master ( ffbbca...ad9227 )
by cam
01:32
created
ecrire/bootstrap/inc/i18n.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 					$value = interdire_scripts($value, -1);
130 130
 				}
131 131
 				if (!empty($options['class'])) {
132
-					$value = "<span class='" . $options['class'] . "'>$value</span>";
132
+					$value = "<span class='".$options['class']."'>$value</span>";
133 133
 				}
134 134
 				$text = str_replace("@$name@", (string) $value, (string) $text);
135 135
 				unset($args[$name]);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		// Si des variables n'ont pas ete inserees, le signaler
139 139
 		// (chaines de langues pas a jour)
140 140
 		if ($args) {
141
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
141
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
142 142
 		}
143 143
 	}
144 144
 
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/templating.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,11 +99,11 @@
 block discarded – undo
99 99
 	$GLOBALS['_INC_PUBLIC']++;
100 100
 
101 101
 	// fix #4235
102
-	$cache_utilise_session_appelant	= ($GLOBALS['cache_utilise_session'] ?? null);
102
+	$cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null);
103 103
 
104 104
 
105 105
 	foreach (is_array($fond) ? $fond : [$fond] as $f) {
106
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
106
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
107 107
 
108 108
 		$page = evaluer_fond($f, $contexte, $connect);
109 109
 		if ($page === '') {
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/loading.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
 	if (strlen($dossier) && !str_ends_with($dossier, '/')) {
33 33
 		$dossier .= '/';
34 34
 	}
35
-	$f = str_replace('/', '_', $dossier) . $nom;
35
+	$f = str_replace('/', '_', $dossier).$nom;
36 36
 
37 37
 	if (function_exists($f)) {
38 38
 		return $f;
39 39
 	}
40
-	if (function_exists($g = $f . '_dist')) {
40
+	if (function_exists($g = $f.'_dist')) {
41 41
 		return $g;
42 42
 	}
43 43
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	// passer en minuscules (cf les balises de formulaires)
59 59
 	// et inclure le fichier
60 60
 	if (
61
-		!($inc = include_spip($dossier . ($d = strtolower($nom))))
61
+		!($inc = include_spip($dossier.($d = strtolower($nom))))
62 62
 		&& strlen(dirname($dossier))
63 63
 		&& dirname($dossier) != '.'
64 64
 	) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 
78 78
 	// Echec : message d'erreur
79
-	spip_log("fonction $nom ($f ou $g) indisponible" .
79
+	spip_log("fonction $nom ($f ou $g) indisponible".
80 80
 		($inc ? '' : " (fichier $d absent de $dossier)"));
81 81
 
82 82
 	include_spip('inc/minipres');
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
 	echo minipres(
85 85
 		_T('forum_titre_erreur'),
86 86
 		$inc ?
87
-			_T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($f) . '</code>'])
87
+			_T('fonction_introuvable', ['fonction' => '<code>'.spip_htmlentities($f).'</code>'])
88 88
 			. '<br />'
89
-			. _T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($g) . '</code>'])
89
+			. _T('fonction_introuvable', ['fonction' => '<code>'.spip_htmlentities($g).'</code>'])
90 90
 			:
91
-			_T('fichier_introuvable', ['fichier' => '<code>' . spip_htmlentities($d) . '</code>']),
92
-		['all_inline' => true,'status' => 404]
91
+			_T('fichier_introuvable', ['fichier' => '<code>'.spip_htmlentities($d).'</code>']),
92
+		['all_inline' => true, 'status' => 404]
93 93
 	);
94 94
 	exit;
95 95
 }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
  *     - string : chemin du fichier trouvé
136 136
  **/
137 137
 function include_spip($f, $include = true) {
138
-	return find_in_path($f . '.php', '', $include);
138
+	return find_in_path($f.'.php', '', $include);
139 139
 }
140 140
 
141 141
 /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
  *     - string : chemin du fichier trouvé
156 156
  **/
157 157
 function require_spip($f) {
158
-	return find_in_path($f . '.php', '', 'required');
158
+	return find_in_path($f.'.php', '', 'required');
159 159
 }
160 160
 
161 161
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 		// donc il faut l'inclure "en globals"
174 174
 		if ($f = find_in_path('mes_fonctions.php')) {
175 175
 			global $dossier_squelettes;
176
-			include_once(_ROOT_CWD . $f);
176
+			include_once(_ROOT_CWD.$f);
177 177
 		}
178 178
 
179 179
 		if (@is_readable(_CACHE_PLUGINS_FCT)) {
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
 	if ($type === 'defaut') {
202 202
 		$objet = objet_type($quoi);
203 203
 		if (
204
-			($f = charger_fonction('generer_' . $objet . '_url', 'urls', true))
205
-			|| ($f = charger_fonction('generer_url_' . $objet, 'urls', true)) // deprecated
204
+			($f = charger_fonction('generer_'.$objet.'_url', 'urls', true))
205
+			|| ($f = charger_fonction('generer_url_'.$objet, 'urls', true)) // deprecated
206 206
 		) {
207 207
 			return $f;
208 208
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	}
216 216
 
217 217
 	// inclure le module d'url
218
-	include_spip('urls/' . $url_type);
218
+	include_spip('urls/'.$url_type);
219 219
 
220 220
 	switch ($quoi) {
221 221
 		case 'page':
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
  * @return array|string
278 278
  */
279 279
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
280
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
280
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
281 281
 	if (!$pathinfo) {
282 282
 		return $f;
283 283
 	}
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/form.php 1 patch
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
 	. "><div>\n"
33 33
 	. "<input type='hidden' name='exec' value='$script1' />"
34 34
 	. $corps
35
-	. (!$submit ? '' :
36
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>'))
35
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>'))
37 36
 	. "</div></form>\n";
38 37
 }
39 38
 
@@ -58,13 +57,13 @@  discard block
 block discarded – undo
58 57
 		? generer_url_ecrire(_request('exec'))
59 58
 		: generer_url_public();
60 59
 
61
-	return "\n<form action='" .
62
-	$h .
63
-	"'" .
64
-	$atts .
65
-	">\n" .
66
-	'<div>' .
67
-	"\n<input type='hidden' name='action' value='$script' />" .
68
-	$corps .
60
+	return "\n<form action='".
61
+	$h.
62
+	"'".
63
+	$atts.
64
+	">\n".
65
+	'<div>'.
66
+	"\n<input type='hidden' name='action' value='$script' />".
67
+	$corps.
69 68
 	'</div></form>';
70 69
 }
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/pipeline.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 	}
92 92
 
93 93
 	// appliquer notre fonction si elle existe
94
-	$fonc = 'execute_pipeline_' . strtolower($action);
94
+	$fonc = 'execute_pipeline_'.strtolower($action);
95 95
 	if (function_exists($fonc)) {
96 96
 		$val = $fonc($val);
97 97
 	} // plantage ?
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/auth.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 **/
45 45
 function verifier_visiteur() {
46 46
 	@spip_initialisation_core(
47
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
48
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
49
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
50
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
47
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
48
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
49
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
50
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
51 51
 	);
52 52
 
53 53
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 
82 82
 	$h = (isset($_SERVER['PHP_AUTH_USER']) && !$GLOBALS['ignore_auth_http']);
83
-	if ($h || isset($_COOKIE['spip_session']) || isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
83
+	if ($h || isset($_COOKIE['spip_session']) || isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
84 84
 		$session = charger_fonction('session', 'inc');
85 85
 		if ($session()) {
86 86
 			return $GLOBALS['visiteur_session']['statut'];
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		if (!empty($GLOBALS['visiteur_session'])) {
125 125
 			include_spip('inc/session');
126 126
 			$cookie = lire_cookie_session();
127
-			$s = serialize($GLOBALS['visiteur_session']) . '_' . ($cookie ?: '');
127
+			$s = serialize($GLOBALS['visiteur_session']).'_'.($cookie ?: '');
128 128
 		}
129 129
 		$s = pipeline('definir_session', $s);
130 130
 		$session = ($s ? substr(md5($s), 0, 8) : '');
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/utils.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @return bool
10 10
  */
11 11
 function test_plugin_actif($plugin) {
12
-	return ($plugin && defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
12
+	return ($plugin && defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
13 13
 }
14 14
 
15 15
 /**
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 function joli_repertoire($rep) {
25 25
 	$a = substr($rep, 0, 1);
26 26
 	if ($a <> '.' && $a <> '/') {
27
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
27
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
28 28
 	}
29 29
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
30 30
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 			$p -= ($x * 1000);
78 78
 		}
79 79
 
80
-		return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
80
+		return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
81 81
 	}
82 82
 }
83 83
 
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 		$src = '';
131 131
 	}
132 132
 	if ($script) {
133
-		$script = ("/*<![CDATA[*/\n" .
134
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
133
+		$script = ("/*<![CDATA[*/\n".
134
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
135 135
 			'/*]]>*/');
136 136
 	}
137 137
 	if ($noscript) {
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 		foreach ($cookies_masques as $k) {
218 218
 			if (!empty($_COOKIE[$k])) {
219 219
 				$cookies_backup[$k] = $_COOKIE[$k];
220
-				$_SERVER['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
221
-				$_ENV['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
220
+				$_SERVER['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
221
+				$_ENV['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
222 222
 				$_COOKIE[$k] = $mask;
223 223
 			}
224 224
 		}
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/jobs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	if ($taches && count($taches) && !spip_connect()) {
42 42
 		return false;
43 43
 	}
44
-	spip_log('cron !', 'jq' . _LOG_DEBUG);
44
+	spip_log('cron !', 'jq'._LOG_DEBUG);
45 45
 	if ($genie = charger_fonction('genie', 'inc', true)) {
46 46
 		return $genie($taches);
47 47
 	}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 	if ($queue_next_job_time == -1) {
146 146
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
147
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt');
147
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt');
148 148
 		}
149 149
 		// utiliser un cache memoire si dispo
150 150
 		if (function_exists('cache_get') && defined('_MEMOIZE_MEMORY') && _MEMOIZE_MEMORY) {
Please login to merge, or discard this patch.
ecrire/bootstrap/inc/logging.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 function spip_log($message = null, $name = null) {
44 44
 	static $pre = [];
45 45
 	static $log;
46
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
46
+	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs);
47 47
 	if (!isset($regs[1]) || !$logname = $regs[1]) {
48 48
 		$logname = null;
49 49
 	}
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		if (!is_string($message)) {
72 72
 			$message = print_r($message, true);
73 73
 		}
74
-		$log($pre[$niveau] . ' ' . $message, $logname);
74
+		$log($pre[$niveau].' '.$message, $logname);
75 75
 	}
76 76
 }
77 77
 
Please login to merge, or discard this patch.