Completed
Push — master ( 81a660...8ce9c8 )
by cam
01:32
created
ecrire/inc/preselectionner_parent_nouvel_objet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		$id_rubrique = $GLOBALS['connect_id_rubrique'][0];
42 42
 	} elseif (
43 43
 		is_int(_AUTO_SELECTION_RUBRIQUE)
44
-		&& sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique=' . (int) _AUTO_SELECTION_RUBRIQUE)
44
+		&& sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique='.(int) _AUTO_SELECTION_RUBRIQUE)
45 45
 	) {
46 46
 		$id_rubrique = _AUTO_SELECTION_RUBRIQUE;
47 47
 	} else {
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 		$id_rubrique = $row_rub['id_rubrique'];
51 51
 	}
52 52
 	// si le choix ne convient pas, on cherche dans un secteur
53
-	if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) {
53
+	if (!autoriser('creer'.$objet.'dans', 'rubrique', $id_rubrique)) {
54 54
 		$id_rubrique = '';
55 55
 		// manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises
56 56
 		$res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0');
57 57
 		while (!$id_rubrique && ($row_rub = sql_fetch($res))) {
58
-			if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) {
58
+			if (autoriser('creer'.$objet.'dans', 'rubrique', $row_rub['id_rubrique'])) {
59 59
 				$id_rubrique = $row_rub['id_rubrique'];
60 60
 			}
61 61
 		}
Please login to merge, or discard this patch.
ecrire/inc/nfslock.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	if (!$max_age) {
107 107
 		$max_age = _DEFAULT_LOCKTIME;
108 108
 	}
109
-	$lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8);
109
+	$lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8);
110 110
 
111 111
 
112 112
 	/*
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 
117 117
 	$id = creer_uniqid();
118
-	$tpath = _DIR_TMP . "slock.$id";
118
+	$tpath = _DIR_TMP."slock.$id";
119 119
 	$tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ...
120 120
 	if (!$tmpfd) {  /* open failed */
121 121
 		@fclose($tmpfd);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 *    thinks the current time is (our_tmp.st_ctime)..
242 242
 	 */
243 243
 
244
-	$tpath = _DIR_TMP . "stime.$id";
244
+	$tpath = _DIR_TMP."stime.$id";
245 245
 	$tmpfd = @fopen($tpath, 'w');
246 246
 	if (!$tmpfd || @fwrite($tmpfd, 'zz', 2) != 2 || !($our_tmp = fstat($tmpfd))) {
247 247
 		/* The open failed, or we can't write the file, or we can't stat it */
@@ -251,14 +251,14 @@  discard block
 block discarded – undo
251 251
 		return false; //(NFSL_SYSF);
252 252
 	}
253 253
 
254
-	@fclose($tmpfd);    /* We don't need this once we have our_tmp.st_ctime. */
254
+	@fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */
255 255
 	spip_unlink($tpath);
256 256
 
257 257
 	/*
258 258
 	 * 2. make fullpath, a buffer for the full pathname of the lock file
259 259
 	 */
260 260
 
261
-	$lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8);
261
+	$lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8);
262 262
 
263 263
 	/*
264 264
 	 * 3. If the ctime hasn't been modified, unlink the file and return. If the
@@ -278,10 +278,10 @@  discard block
 block discarded – undo
278 278
 			if (!$test) {
279 279
 				return false;
280 280
 			} //(NFSL_LOST);
281
-			sleep(1 + (random_int(0, 4)));    /* so sleep a bit */
281
+			sleep(1 + (random_int(0, 4))); /* so sleep a bit */
282 282
 		}
283 283
 
284
-		return true;//(NFSL_OK);			/* success */
284
+		return true; //(NFSL_OK);			/* success */
285 285
 	}
286 286
 
287 287
 	/*
Please login to merge, or discard this patch.
ecrire/inc/puce_statut.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 			$out .= afficher_script_statut($id, $type, -$zero - $i++ * $unit, statut_image($type, $s), $s, _T($t));
390 390
 		}
391 391
 
392
-		return $out . '</span>';
392
+		return $out.'</span>';
393 393
 	} else {
394 394
 		$nom = 'puce_statut_';
395 395
 		$action = generer_url_ecrire('puce_statut', '', true);
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 	$h = generer_action_auteur('instituer_objet', "$type-$id-$statut");
407 407
 	$t = supprimer_tags($titre);
408 408
 
409
-	return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>" . http_img_pack($img, $t) . '</a>';
409
+	return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>".http_img_pack($img, $t).'</a>';
410 410
 }
411 411
 
412 412
 // compat
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
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	static $dirs = [];
43 43
 	$liste = [];
44 44
 	foreach (creer_chemin() as $dir) {
45
-		if (!isset($dirs[$a = $dir . $dirname])) {
45
+		if (!isset($dirs[$a = $dir.$dirname])) {
46 46
 			$dirs[$a] = (is_dir($a) || !$a);
47 47
 		}
48 48
 		if ($dirs[$a] && is_readable($a .= $file)) {
@@ -66,21 +66,21 @@  discard block
 block discarded – undo
66 66
  **/
67 67
 function chercher_module_lang($module, $lang = '') {
68 68
 	if ($lang) {
69
-		$lang = '_' . $lang;
69
+		$lang = '_'.$lang;
70 70
 	}
71 71
 
72 72
 	// 1) dans un repertoire nomme lang/ se trouvant sur le chemin
73 73
 	if (
74 74
 		$f = ($module == 'local'
75
-		? find_in_path($module . $lang . '.php', 'lang/')
76
-		: find_langs_in_path($module . $lang . '.php', 'lang/'))
75
+		? find_in_path($module.$lang.'.php', 'lang/')
76
+		: find_langs_in_path($module.$lang.'.php', 'lang/'))
77 77
 	) {
78 78
 		return is_array($f) ? $f : [$f];
79 79
 	}
80 80
 
81 81
 	// 2) directement dans le chemin (old style, uniquement pour local)
82 82
 	return ($module == 'local' || strpos($module, '/'))
83
-		? (($f = find_in_path($module . $lang . '.php')) ? [$f] : false)
83
+		? (($f = find_in_path($module.$lang.'.php')) ? [$f] : false)
84 84
 		: false;
85 85
 }
86 86
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
  **/
105 105
 function charger_langue($lang, $module = 'spip') {
106 106
 	static $langs = [];
107
-	$var = 'i18n_' . $module . '_' . $lang;
107
+	$var = 'i18n_'.$module.'_'.$lang;
108 108
 	if (!isset($langs[$lang])) {
109 109
 		$langs[$lang] = [];
110 110
 		if ($lang) {
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
 	}
120 120
 	foreach ($langs[$lang] as $l) {
121 121
 		if ($fichiers_lang = chercher_module_lang($module, $l)) {
122
-			$GLOBALS['idx_lang'] = 'i18n_' . $module . '_' . $l;
122
+			$GLOBALS['idx_lang'] = 'i18n_'.$module.'_'.$l;
123 123
 			$GLOBALS[$GLOBALS['idx_lang']] = lire_fichier_langue(array_shift($fichiers_lang));
124 124
 			surcharger_langue($fichiers_lang);
125 125
 			if ($l !== $lang) {
126
-				$GLOBALS[$var] = &$GLOBALS['i18n_' . $module . '_' . $l];
126
+				$GLOBALS[$var] = &$GLOBALS['i18n_'.$module.'_'.$l];
127 127
 			}
128
-			$GLOBALS['lang_' . $var] = $l;
128
+			$GLOBALS['lang_'.$var] = $l;
129 129
 			#spip_log("module de langue : {$module}_$l.php", 'traduire');
130 130
 			break;
131 131
 		}
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
  */
144 144
 function lire_fichier_langue(string $fichier): array {
145 145
 	$idx_lang_before = $GLOBALS['idx_lang'] ?? null;
146
-	$idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang') . '@temporaire';
146
+	$idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang').'@temporaire';
147 147
 	$GLOBALS['idx_lang'] = $idx_lang_tmp;
148 148
 	$idx_lang = include $fichier;
149 149
 	$GLOBALS['idx_lang'] = $idx_lang_before;
@@ -254,27 +254,27 @@  discard block
 block discarded – undo
254 254
 	} else {
255 255
 		$modules = ['spip', 'ecrire'];
256 256
 		$code = $ori;
257
-		$ori_complet = implode('|', $modules) . ':' . $ori;
257
+		$ori_complet = implode('|', $modules).':'.$ori;
258 258
 	}
259 259
 
260 260
 	$desc = new Description();
261 261
 
262 262
 	// parcourir tous les modules jusqu'a ce qu'on trouve
263 263
 	foreach ($modules as $module) {
264
-		$var = 'i18n_' . $module . '_' . $lang;
264
+		$var = 'i18n_'.$module.'_'.$lang;
265 265
 
266 266
 		if (empty($GLOBALS[$var])) {
267 267
 			charger_langue($lang, $module);
268 268
 			// surcharges persos -- on cherche
269 269
 			// (lang/)local_xx.php et/ou (lang/)local.php ...
270
-			if (!isset($local['local_' . $lang])) {
270
+			if (!isset($local['local_'.$lang])) {
271 271
 				// redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer)
272 272
 				$GLOBALS['idx_lang'] = $var;
273 273
 				// ... (lang/)local_xx.php
274
-				$local['local_' . $lang] = chercher_module_lang('local', $lang);
274
+				$local['local_'.$lang] = chercher_module_lang('local', $lang);
275 275
 			}
276
-			if ($local['local_' . $lang]) {
277
-				surcharger_langue($local['local_' . $lang]);
276
+			if ($local['local_'.$lang]) {
277
+				surcharger_langue($local['local_'.$lang]);
278 278
 			}
279 279
 			// ... puis (lang/)local.php
280 280
 			if (!isset($local['local'])) {
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 		if (isset($GLOBALS[$var][$code])) {
289 289
 			$desc->code = $code;
290 290
 			$desc->module = $module;
291
-			$desc->langue = $GLOBALS['lang_' . $var] ?? $lang;
291
+			$desc->langue = $GLOBALS['lang_'.$var] ?? $lang;
292 292
 			$desc->texte = $GLOBALS[$var][$code];
293 293
 			break;
294 294
 		}
@@ -346,13 +346,13 @@  discard block
 block discarded – undo
346 346
 	if (!$desc->mode && $desc->texte) {
347 347
 		// ne pas modifier 2 fois l'affichage
348 348
 		$desc->mode = 'traduction';
349
-		$classe = 'debug-traduction' . ($desc->module == 'ecrire' ? '-prive' : '');
349
+		$classe = 'debug-traduction'.($desc->module == 'ecrire' ? '-prive' : '');
350 350
 		$desc->texte = '<span '
351
-			. 'lang=' . $desc->langue
352
-			. ' class=' . $classe
353
-			. ' data-module=' . $desc->module
354
-			. ' data-code=' . $desc->code
355
-			. ' title=' . $modules . '(' . $desc->langue . ')>'
351
+			. 'lang='.$desc->langue
352
+			. ' class='.$classe
353
+			. ' data-module='.$desc->module
354
+			. ' data-code='.$desc->code
355
+			. ' title='.$modules.'('.$desc->langue.')>'
356 356
 			. $desc->texte
357 357
 			. '</span>';
358 358
 		$desc->texte = str_replace(
Please login to merge, or discard this patch.
ecrire/inc/math.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,15 +35,15 @@  discard block
 block discarded – undo
35 35
 	}
36 36
 
37 37
 	// Regarder dans le repertoire local des images TeX et blocs MathML
38
-	if (!@is_dir($dir_tex = _DIR_VAR . 'cache-TeX/')) {
38
+	if (!@is_dir($dir_tex = _DIR_VAR.'cache-TeX/')) {
39 39
 		@mkdir($dir_tex, _SPIP_CHMOD);
40 40
 	}
41
-	$fichier = $dir_tex . md5(trim($tex)) . $ext;
41
+	$fichier = $dir_tex.md5(trim($tex)).$ext;
42 42
 
43 43
 
44 44
 	// Aller chercher l'image sur le serveur
45 45
 	if (!@file_exists($fichier) && $server) {
46
-		spip_log($url = $server . '?' . rawurlencode($tex));
46
+		spip_log($url = $server.'?'.rawurlencode($tex));
47 47
 		include_spip('inc/distant');
48 48
 		recuperer_url($url, ['file' => $fichier]);
49 49
 	}
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			return implode('', file($fichier));
58 58
 		} // TeX
59 59
 		else {
60
-			[, , , $size] = @spip_getimagesize($fichier);
60
+			[,,, $size] = @spip_getimagesize($fichier);
61 61
 			$alt = "alt=\"$tex\" title=\"$tex\"";
62 62
 
63 63
 			return "<img src=\"$fichier\" style=\"vertical-align:middle;\" $size $alt />";
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 			if ($defaire_amp) {
125 125
 				$expression = str_replace('&amp;', '&', $expression);
126 126
 			}
127
-			$echap = "\n<p class=\"spip\" style=\"text-align: center;\">" . produire_image_math($expression) . "</p>\n";
127
+			$echap = "\n<p class=\"spip\" style=\"text-align: center;\">".produire_image_math($expression)."</p>\n";
128 128
 			$pos = strpos($texte_milieu, (string) $regs[0]);
129 129
 			$texte_milieu = substr($texte_milieu, 0, $pos)
130 130
 				. code_echappement($echap, $source)
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 				. substr($texte_milieu, $pos + strlen($regs[0]));
145 145
 		}
146 146
 
147
-		$texte_a_voir = $texte_debut . $texte_milieu . $texte_fin;
147
+		$texte_a_voir = $texte_debut.$texte_milieu.$texte_fin;
148 148
 	}
149 149
 
150 150
 	return $texte_a_voir;
Please login to merge, or discard this patch.
ecrire/inc/cvt_configurer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	) {
38 38
 		// Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé
39 39
 		include_spip('inc/autoriser');
40
-		if (!autoriser('configurer', '_' . substr($form, 11))) {
40
+		if (!autoriser('configurer', '_'.substr($form, 11))) {
41 41
 			return false;
42 42
 		}
43 43
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		&& !charger_fonction('traiter', "formulaires/$form/", true) // sans fonction traiter()
72 72
 	) {
73 73
 		$trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']);
74
-		$flux['data'] = ['message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true];
74
+		$flux['data'] = ['message_ok' => _T('config_info_enregistree').$trace, 'editable' => true];
75 75
 	}
76 76
 
77 77
 	return $flux;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		$prefixe = $valeurs['_meta_prefixe'];
146 146
 	}
147 147
 	if (isset($valeurs['_meta_stockage'])) {
148
-		$stockage = $valeurs['_meta_stockage'] . '::';
148
+		$stockage = $valeurs['_meta_stockage'].'::';
149 149
 	}
150 150
 
151 151
 	// si on indique juste une table, il faut vider les autres proprietes
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
 	// sinon cas analyse du squelette
173 173
 	if (
174
-		($f = find_in_path($form . '.' . _EXTENSION_SQUELETTES, 'formulaires/'))
174
+		($f = find_in_path($form.'.'._EXTENSION_SQUELETTES, 'formulaires/'))
175 175
 		&& lire_fichier($f, $contenu)
176 176
 	) {
177 177
 		for ($i = 0; $i < 2; $i++) {
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
 		lire_metas($table);
229 229
 	}
230 230
 
231
-	$prefixe = ($prefixe ? $prefixe . '_' : '');
231
+	$prefixe = ($prefixe ? $prefixe.'_' : '');
232 232
 	$table = ($table) ? "/$table/" : '';
233
-	$casier = ($casier) ? rtrim($casier, '/') . '/' : ''; // slash final, sinon rien
233
+	$casier = ($casier) ? rtrim($casier, '/').'/' : ''; // slash final, sinon rien
234 234
 
235 235
 	foreach ($store as $k => $v) {
236 236
 		ecrire_config("$stockage$table$prefixe$casier$k", $v);
237 237
 		if (_request('var_mode') == 'configurer' && autoriser('webmestre')) {
238
-			$trace .= "<br />table $table : " . $prefixe . $k . " = $v;";
238
+			$trace .= "<br />table $table : ".$prefixe.$k." = $v;";
239 239
 		}
240 240
 	}
241 241
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	[$table, $casier, $prefixe, $stockage] = cvtconf_definir_configurer_conteneur($form, $valeurs);
253 253
 
254 254
 	$table = ($table) ? "/$table/" : '';
255
-	$prefixe = ($prefixe ? $prefixe . '_' : '');
255
+	$prefixe = ($prefixe ? $prefixe.'_' : '');
256 256
 	if ($casier) {
257 257
 		$meta = lire_config("$stockage$table$prefixe$casier");
258 258
 		$prefixe = '';
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
 	foreach (array_keys($valeurs) as $k) {
265 265
 		if (!str_starts_with($k, '_')) {
266
-			$valeurs[$k] = ($meta[$prefixe . $k] ?? null);
266
+			$valeurs[$k] = ($meta[$prefixe.$k] ?? null);
267 267
 		}
268 268
 	}
269 269
 }
Please login to merge, or discard this patch.
ecrire/inc/bandeau.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			$_id = $e['id_table_objet'];
52 52
 			if (isset($contexte[$_id]) && ($id = (int) $contexte[$_id])) {
53 53
 				$table = $e['table_objet_sql'];
54
-				$row = sql_fetsel('*', $table, "$_id=" . (int) $id);
54
+				$row = sql_fetsel('*', $table, "$_id=".(int) $id);
55 55
 				if (isset($row['id_rubrique'])) {
56 56
 					$contexte['id_rubrique'] = $row['id_rubrique'];
57 57
 					if (isset($row['id_secteur'])) {
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 				$boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position)
116 116
 					+ [
117 117
 						$id => new Bouton(
118
-							($icones && !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '',  // icone
119
-							$infos['titre'],  // titre
118
+							($icones && !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone
119
+							$infos['titre'], // titre
120 120
 							(isset($infos['action']) && $infos['action']) ? $infos['action'] : null,
121 121
 							(isset($infos['parametres']) && $infos['parametres']) ? $infos['parametres'] : null
122 122
 						)
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 				$boutons_admin = array_slice($boutons_admin, 0, $position)
134 134
 					+ [
135 135
 						$id => new Bouton(
136
-							($icones && isset($infos['icone']) && $infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
137
-							$infos['titre'],  // titre
136
+							($icones && isset($infos['icone']) && $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone
137
+							$infos['titre'], // titre
138 138
 							(isset($infos['action']) && $infos['action']) ? $infos['action'] : null,
139 139
 							(isset($infos['parametres']) && $infos['parametres']) ? $infos['parametres'] : null
140 140
 						)
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 		$url = str_replace('&amp;', '&', $url);
222 222
 		while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) {
223 223
 			if ($matches[2] == 'id_secteur' && !isset($contexte['id_secteur']) && isset($contexte['id_rubrique'])) {
224
-				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . (int) $contexte['id_rubrique']);
224
+				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.(int) $contexte['id_rubrique']);
225 225
 			}
226 226
 			$val = _request($matches[2], $contexte);
227 227
 			$url = parametre_url($url, $matches[1], $val ?: '', '&');
Please login to merge, or discard this patch.
ecrire/inc/cvt_autosave.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,15 +46,15 @@  discard block
 block discarded – undo
46 46
 		$je_suis_poste = $flux['args']['je_suis_poste'];
47 47
 
48 48
 		$cle_autosave = serialize($cle_autosave);
49
-		$cle_autosave = $form . '_' . md5($cle_autosave);
49
+		$cle_autosave = $form.'_'.md5($cle_autosave);
50 50
 
51 51
 		// si on a un backup en session et qu'on est au premier chargement, non poste
52 52
 		// on restitue les donnees
53 53
 		if (
54
-			isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])
54
+			isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave])
55 55
 			&& !$je_suis_poste
56 56
 		) {
57
-			parse_str($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave], $vars);
57
+			parse_str($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave], $vars);
58 58
 			foreach ($vars as $key => $val) {
59 59
 				if (isset($flux['data'][$key])) {
60 60
 					$flux['data'][$key] = (is_string($val) ? autosave_clean_value($val) : array_map(
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 		if ($je_suis_poste && _request('autosave') === $cle_autosave && function_exists('terminer_actualiser_sessions')) {
71 71
 			terminer_actualiser_sessions();
72 72
 			// et verifions si jamais l'autosave a fait un come back, dans ce cas on le revide
73
-			if (isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])) {
74
-				session_set('session_autosave_' . $cle_autosave, null);
73
+			if (isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave])) {
74
+				session_set('session_autosave_'.$cle_autosave, null);
75 75
 				// en court sleep pour etre certain que la concurrence est finie
76 76
 				sleep(1);
77 77
 				terminer_actualiser_sessions();
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		 */
85 85
 		$flux['data']['_hidden'] .= "<input type='hidden' name='autosave' class='autosaveactive' value='$cle_autosave' />"
86 86
 			. '<script type="text/javascript">/*<![CDATA[*/if (window.jQuery) jQuery(function(){
87
-		  $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'] . '/"}).addClass("autosaveon");
87
+		  $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'].'/"}).addClass("autosaveon");
88 88
 			});/*]]>*/</script>';
89 89
 	}
90 90
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	// on elimine les donnees de la session
107 107
 	if ($cle_autosave = _request('autosave')) {
108 108
 		include_spip('inc/session');
109
-		session_set('session_autosave_' . $cle_autosave, null);
109
+		session_set('session_autosave_'.$cle_autosave, null);
110 110
 	}
111 111
 
112 112
 	if (isset($GLOBALS['visiteur_session']) && $GLOBALS['visiteur_session']) {
Please login to merge, or discard this patch.
ecrire/inc/cookie.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 	// in fine renommer le prefixe si besoin
102 102
 	if (str_starts_with($name, 'spip_')) {
103
-		$name = $GLOBALS['cookie_prefix'] . '_' . substr($name, 5);
103
+		$name = $GLOBALS['cookie_prefix'].'_'.substr($name, 5);
104 104
 	}
105 105
 
106 106
 	#spip_log("cookie('$name', '$value', " . json_encode($options, true) . ")", "cookies");
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	}
159 159
 	foreach ($_COOKIE as $name => $value) {
160 160
 		if (substr($name, 0, $prefix_long) == $cookie_prefix) {
161
-			$spipname = preg_replace('/^' . $cookie_prefix . '_/', 'spip_', $name);
161
+			$spipname = preg_replace('/^'.$cookie_prefix.'_/', 'spip_', $name);
162 162
 			$_COOKIE[$spipname] = $value;
163 163
 			$GLOBALS[$spipname] = $value;
164 164
 		}
Please login to merge, or discard this patch.