Completed
Push — master ( 2056af...6c9939 )
by cam
01:09
created
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.
ecrire/inc/plonger.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	$res = sql_select(
36 36
 		'rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant',
37 37
 		'spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)',
38
-		'rub1.id_parent = ' . sql_quote($id_rubrique) . '
39
-			AND rub1.id_rubrique!=' . sql_quote($exclu) . '
40
-			AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=' . sql_quote($exclu) . ')',
38
+		'rub1.id_parent = '.sql_quote($id_rubrique).'
39
+			AND rub1.id_rubrique!=' . sql_quote($exclu).'
40
+			AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=' . sql_quote($exclu).')',
41 41
 		'',
42 42
 		'0+rub1.titre,rub1.titre'
43 43
 	);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 				if ($row['langue_choisie'] != 'oui') {
51 51
 					$t .= ' <small title="'
52 52
 						. traduire_nom_langue($row['lang'])
53
-						. '">[' . $row['lang'] . ']</small>';
53
+						. '">['.$row['lang'].']</small>';
54 54
 				}
55 55
 				$ordre[$row['id_rubrique']] = $t;
56 56
 			}
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
 	}
59 59
 	$next = isset($list[$col]) ? $list[$col] : 0;
60 60
 	if ($ordre) {
61
-		$rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=" . ($col + 1));
61
+		$rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=".($col + 1));
62 62
 		$info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id=");
63
-		$args = "'$idom',this,$col,'" . $GLOBALS['spip_lang_left'] . "','$info',event";
63
+		$args = "'$idom',this,$col,'".$GLOBALS['spip_lang_left']."','$info',event";
64 64
 
65 65
 		foreach ($ordre as $id => $titrebrut) {
66 66
 			$titre = supprimer_numero($titrebrut);
67 67
 
68
-			$classe1 = 'petit-item ' . ($id_rubrique ? 'petite-rubrique' : 'petit-secteur');
68
+			$classe1 = 'petit-item '.($id_rubrique ? 'petite-rubrique' : 'petit-secteur');
69 69
 			if (isset($rub[$id]['enfants'])) {
70 70
 				$classe2 = " class='rub-ouverte'";
71 71
 				$url = "\nhref='$rec&amp;id=$id'";
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 				$url = "\nhref='javascript:void(0)'";
75 75
 			}
76 76
 
77
-			$js_func = $do . '_selection_titre';
77
+			$js_func = $do.'_selection_titre';
78 78
 			$click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn "
79 79
 				. (!is_array($list) ? ' false'
80 80
 					: "aff_selection_provisoire($id,$args)")
@@ -101,17 +101,17 @@  discard block
 block discarded – undo
101 101
 		}
102 102
 	}
103 103
 
104
-	$idom2 = $idom . '_col_' . ($col + 1);
104
+	$idom2 = $idom.'_col_'.($col + 1);
105 105
 	$left = ($col * 250);
106 106
 
107 107
 	return http_img_pack(
108 108
 		'loader.svg',
109 109
 		'',
110
-		"class='loader' style='visibility: hidden; position: absolute; " . $GLOBALS['spip_lang_left'] . ': '
110
+		"class='loader' style='visibility: hidden; position: absolute; ".$GLOBALS['spip_lang_left'].': '
111 111
 		. ($left - 30)
112 112
 		. "px; top: 2px; z-index: 2;' id='img_$idom2'"
113 113
 	)
114
-	. "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; " . $GLOBALS['spip_lang_left'] . ': '
114
+	. "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; ".$GLOBALS['spip_lang_left'].': '
115 115
 	. ($left - 250)
116 116
 	. "px;'>"
117 117
 	. $ret
Please login to merge, or discard this patch.
ecrire/inc/bandeau.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			$_id = $e['id_table_objet'];
51 51
 			if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) {
52 52
 				$table = $e['table_objet_sql'];
53
-				$row = sql_fetsel('*', $table, "$_id=" . intval($id));
53
+				$row = sql_fetsel('*', $table, "$_id=".intval($id));
54 54
 				if (isset($row['id_rubrique'])) {
55 55
 					$contexte['id_rubrique'] = $row['id_rubrique'];
56 56
 					if (isset($row['id_secteur'])) {
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 				$boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position)
118 118
 					+ [
119 119
 						$id => new Bouton(
120
-							($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '',  // icone
121
-							$infos['titre'],  // titre
120
+							($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone
121
+							$infos['titre'], // titre
122 122
 							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
123 123
 							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
124 124
 						)
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 				$boutons_admin = array_slice($boutons_admin, 0, $position)
136 136
 					+ [
137 137
 						$id => new Bouton(
138
-							($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
139
-							$infos['titre'],  // titre
138
+							($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone
139
+							$infos['titre'], // titre
140 140
 							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
141 141
 							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
142 142
 						)
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			$libelles = $isfavoris = $favoris = [];
182 182
 			foreach ($menu->sousmenu as $key => $item) {
183 183
 				$libelles[$key] = strtolower(translitteration(_T($item->libelle)));
184
-				$isfavoris[$key] = (bool)$item->favori;
184
+				$isfavoris[$key] = (bool) $item->favori;
185 185
 				$favoris[$key] = $item->favori;
186 186
 			}
187 187
 			if ($avec_favoris) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 		$url = str_replace('&amp;', '&', $url);
224 224
 		while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) {
225 225
 			if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) {
226
-				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique']));
226
+				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($contexte['id_rubrique']));
227 227
 			}
228 228
 			$val = _request($matches[2], $contexte);
229 229
 			$url = parametre_url($url, $matches[1], $val ? $val : '', '&');
Please login to merge, or discard this patch.
ecrire/inc/urls.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -211,9 +211,9 @@  discard block
 block discarded – undo
211 211
  */
212 212
 function nettoyer_url_page($url, $contexte = []) {
213 213
 	$url_objets = urls_liste_objets();
214
-	$raccourci_url_page_html = ',^(?:[^?]*/)?(' . $url_objets . ')([0-9]+)(?:\.html)?([?&].*)?$,';
215
-	$raccourci_url_page_id = ',^(?:[^?]*/)?(' . $url_objets . ')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,';
216
-	$raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?](' . $url_objets . ')([0-9]+)=?(&.*)?$,';
214
+	$raccourci_url_page_html = ',^(?:[^?]*/)?('.$url_objets.')([0-9]+)(?:\.html)?([?&].*)?$,';
215
+	$raccourci_url_page_id = ',^(?:[^?]*/)?('.$url_objets.')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,';
216
+	$raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?]('.$url_objets.')([0-9]+)=?(&.*)?$,';
217 217
 
218 218
 	if (
219 219
 		preg_match($raccourci_url_page_html, $url, $regs)
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 	static $furls = [];
252 252
 	if (!isset($furls[$objet])) {
253 253
 		if (
254
-			function_exists($f = 'generer_url_ecrire_' . $objet)
254
+			function_exists($f = 'generer_url_ecrire_'.$objet)
255 255
 			// ou definie par un plugin
256 256
 			or $f = charger_fonction($f, 'urls', true)
257 257
 		) {
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
 	if ($public or $connect) {
272 272
 		return generer_url_entite_absolue($id, $objet, $args, $ancre, $connect);
273 273
 	}
274
-	$a = id_table_objet($objet) . '=' . intval($id);
274
+	$a = id_table_objet($objet).'='.intval($id);
275 275
 	if (!function_exists('objet_info')) {
276 276
 		include_spip('inc/filtres');
277 277
 	}
278 278
 
279
-	return generer_url_ecrire(objet_info($objet, 'url_voir'), $a . ($args ? "&$args" : '')) . ($ancre ? "#$ancre" : '');
279
+	return generer_url_ecrire(objet_info($objet, 'url_voir'), $a.($args ? "&$args" : '')).($ancre ? "#$ancre" : '');
280 280
 }
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
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	// Regarder dans le repertoire local des images TeX et blocs MathML
40
-	if (!@is_dir($dir_tex = _DIR_VAR . 'cache-TeX/')) {
40
+	if (!@is_dir($dir_tex = _DIR_VAR.'cache-TeX/')) {
41 41
 		@mkdir($dir_tex, _SPIP_CHMOD);
42 42
 	}
43
-	$fichier = $dir_tex . md5(trim($tex)) . $ext;
43
+	$fichier = $dir_tex.md5(trim($tex)).$ext;
44 44
 
45 45
 
46 46
 	if (!@file_exists($fichier)) {
47 47
 		// Aller chercher l'image sur le serveur
48 48
 		if ($server) {
49
-			spip_log($url = $server . '?' . rawurlencode($tex));
49
+			spip_log($url = $server.'?'.rawurlencode($tex));
50 50
 			include_spip('inc/distant');
51 51
 			recuperer_url($url, ['file' => $fichier]);
52 52
 		}
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			return implode('', file($fichier));
62 62
 		} // TeX
63 63
 		else {
64
-			list(, , , $size) = @spip_getimagesize($fichier);
64
+			list(,,, $size) = @spip_getimagesize($fichier);
65 65
 			$alt = "alt=\"$tex\" title=\"$tex\"";
66 66
 
67 67
 			return "<img src=\"$fichier\" style=\"vertical-align:middle;\" $size $alt />";
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			if ($defaire_amp) {
129 129
 				$expression = str_replace('&amp;', '&', $expression);
130 130
 			}
131
-			$echap = "\n<p class=\"spip\" style=\"text-align: center;\">" . produire_image_math($expression) . "</p>\n";
131
+			$echap = "\n<p class=\"spip\" style=\"text-align: center;\">".produire_image_math($expression)."</p>\n";
132 132
 			$pos = strpos($texte_milieu, $regs[0]);
133 133
 			$texte_milieu = substr($texte_milieu, 0, $pos)
134 134
 				. code_echappement($echap, $source)
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 				. substr($texte_milieu, $pos + strlen($regs[0]));
149 149
 		}
150 150
 
151
-		$texte_a_voir = $texte_debut . $texte_milieu . $texte_fin;
151
+		$texte_a_voir = $texte_debut.$texte_milieu.$texte_fin;
152 152
 	}
153 153
 
154 154
 	return $texte_a_voir;
Please login to merge, or discard this patch.
ecrire/inc/filtres_dates.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 function extraire_date($texte) {
39 39
 	// format = 2001-08
40 40
 	if (preg_match(',([1-2][0-9]{3})[^0-9]*(1[0-2]|0?[1-9]),', $texte, $regs)) {
41
-		return $regs[1] . '-' . sprintf('%02d', $regs[2]) . '-01';
41
+		return $regs[1].'-'.sprintf('%02d', $regs[2]).'-01';
42 42
 	}
43 43
 }
44 44
 
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
 		}
69 69
 		if (preg_match('#^([12][0-9]{3})([-/]00)?( [-0-9:]+)?$#', $date, $regs)) {
70 70
 			$regs = array_pad($regs, 4, null); // eviter notice php
71
-			$date = $regs[1] . '-00-00' . $regs[3];
71
+			$date = $regs[1].'-00-00'.$regs[3];
72 72
 		} else {
73 73
 			if (preg_match('#^([12][0-9]{3}[-/][01]?[0-9])([-/]00)?( [-0-9:]+)?$#', $date, $regs)) {
74 74
 				$regs = array_pad($regs, 4, null); // eviter notice php
75
-				$date = preg_replace('@/@', '-', $regs[1]) . '-00' . $regs[3];
75
+				$date = preg_replace('@/@', '-', $regs[1]).'-00'.$regs[3];
76 76
 			} else {
77 77
 				$date = date('Y-m-d H:i:s', strtotime($date));
78 78
 			}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 function vider_date($letexte, $verif_format_date = false) {
99 99
 	if (
100 100
 		!$verif_format_date
101
-		or (in_array(strlen($letexte), [10,19]) and
101
+		or (in_array(strlen($letexte), [10, 19]) and
102 102
 			  preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}(\s[0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $letexte))
103 103
 	) {
104 104
 		if (strncmp('0000-00-00', $letexte, 10) == 0) {
@@ -381,17 +381,17 @@  discard block
 block discarded – undo
381 381
 	if ($decal > 3600 * 24 * 30) {
382 382
 		$mois = floor($decal / (3600 * 24 * 30));
383 383
 		if ($mois < 2) {
384
-			$delai = "$mois " . _T('date_un_mois');
384
+			$delai = "$mois "._T('date_un_mois');
385 385
 		} else {
386
-			$delai = "$mois " . _T('date_mois');
386
+			$delai = "$mois "._T('date_mois');
387 387
 		}
388 388
 	} else {
389 389
 		if ($decal > 3600 * 24 * 7) {
390 390
 			$semaines = floor($decal / (3600 * 24 * 7));
391 391
 			if ($semaines < 2) {
392
-				$delai = "$semaines " . _T('date_une_semaine');
392
+				$delai = "$semaines "._T('date_une_semaine');
393 393
 			} else {
394
-				$delai = "$semaines " . _T('date_semaines');
394
+				$delai = "$semaines "._T('date_semaines');
395 395
 			}
396 396
 		} else {
397 397
 			if ($decal > 3600 * 24) {
@@ -399,30 +399,30 @@  discard block
 block discarded – undo
399 399
 				if ($jours < 2) {
400 400
 					return $il_y_a == 'date_dans' ? _T('date_demain') : _T('date_hier');
401 401
 				} else {
402
-					$delai = "$jours " . _T('date_jours');
402
+					$delai = "$jours "._T('date_jours');
403 403
 				}
404 404
 			} else {
405 405
 				if ($decal >= 3600) {
406 406
 					$heures = floor($decal / 3600);
407 407
 					if ($heures < 2) {
408
-						$delai = "$heures " . _T('date_une_heure');
408
+						$delai = "$heures "._T('date_une_heure');
409 409
 					} else {
410
-						$delai = "$heures " . _T('date_heures');
410
+						$delai = "$heures "._T('date_heures');
411 411
 					}
412 412
 				} else {
413 413
 					if ($decal >= 60) {
414 414
 						$minutes = floor($decal / 60);
415 415
 						if ($minutes < 2) {
416
-							$delai = "$minutes " . _T('date_une_minute');
416
+							$delai = "$minutes "._T('date_une_minute');
417 417
 						} else {
418
-							$delai = "$minutes " . _T('date_minutes');
418
+							$delai = "$minutes "._T('date_minutes');
419 419
 						}
420 420
 					} else {
421 421
 						$secondes = ceil($decal);
422 422
 						if ($secondes < 2) {
423
-							$delai = "$secondes " . _T('date_une_seconde');
423
+							$delai = "$secondes "._T('date_une_seconde');
424 424
 						} else {
425
-							$delai = "$secondes " . _T('date_secondes');
425
+							$delai = "$secondes "._T('date_secondes');
426 426
 						}
427 427
 					}
428 428
 				}
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
 		$njour = 0;
518 518
 	} else {
519 519
 		$njour = intval($jour);
520
-		if ($jourth = _T('date_jnum' . $jour)) {
520
+		if ($jourth = _T('date_jnum'.$jour)) {
521 521
 			$jour = $jourth;
522 522
 		}
523 523
 	}
@@ -525,10 +525,10 @@  discard block
 block discarded – undo
525 525
 	$mois = intval($mois);
526 526
 	if ($mois > 0 and $mois < 13) {
527 527
 		/* Traiter le cas "abbr" pour les noms de mois */
528
-		$param = ((isset($options['param']) and $options['param'] === 'abbr') ? '_' . $options['param'] : '');
529
-		$nommois = _T('date_mois_' . $mois . $param);
528
+		$param = ((isset($options['param']) and $options['param'] === 'abbr') ? '_'.$options['param'] : '');
529
+		$nommois = _T('date_mois_'.$mois.$param);
530 530
 		if ($jour) {
531
-			$jourmois = _T('date_de_mois_' . $mois, ['j' => $jour, 'nommois' => $nommois]);
531
+			$jourmois = _T('date_de_mois_'.$mois, ['j' => $jour, 'nommois' => $nommois]);
532 532
 		} else {
533 533
 			$jourmois = $nommois;
534 534
 		}
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 	}
539 539
 
540 540
 	if ($annee < 0) {
541
-		$annee = -$annee . ' ' . _T('date_avant_jc');
541
+		$annee = -$annee.' '._T('date_avant_jc');
542 542
 		$avjc = true;
543 543
 	} else {
544 544
 		$avjc = false;
@@ -564,11 +564,11 @@  discard block
 block discarded – undo
564 564
 				}
565 565
 			}
566 566
 			if ($vue == 'saison') {
567
-				return $saison ? _T('date_saison_' . $saison) : '';
567
+				return $saison ? _T('date_saison_'.$saison) : '';
568 568
 			} else {
569 569
 				return $saison ? trim(_T(
570 570
 					'date_fmt_saison_annee',
571
-					['saison' => _T('date_saison_' . $saison), 'annee' => $annee]
571
+					['saison' => _T('date_saison_'.$saison), 'annee' => $annee]
572 572
 				)) : '';
573 573
 			}
574 574
 
@@ -645,9 +645,9 @@  discard block
 block discarded – undo
645 645
 			}
646 646
 			$nom = mktime(1, 1, 1, $mois, $njour, $annee);
647 647
 			$nom = 1 + date('w', $nom);
648
-			$param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : '');
648
+			$param = ((isset($options['param']) and $options['param']) ? '_'.$options['param'] : '');
649 649
 
650
-			return _T('date_jour_' . $nom . $param);
650
+			return _T('date_jour_'.$nom.$param);
651 651
 
652 652
 		case 'mois_annee':
653 653
 			if ($avjc) {
@@ -1042,8 +1042,8 @@  discard block
 block discarded – undo
1042 1042
 
1043 1043
 	$dtstart = $dtend = $dtabbr = '';
1044 1044
 	if (strpos($forme, 'hcal') !== false) {
1045
-		$dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>";
1046
-		$dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>";
1045
+		$dtstart = "<abbr class='dtstart' title='".date_iso($date_debut)."'>";
1046
+		$dtend = "<abbr class='dtend' title='".date_iso($date_fin)."'>";
1047 1047
 		$dtabbr = '</abbr>';
1048 1048
 	}
1049 1049
 
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
 			}
1092 1092
 		} else {
1093 1093
 			if ($dtabbr && $dtstart) {
1094
-				$s = $dtstart . spip_ucfirst($s) . $dtabbr;
1094
+				$s = $dtstart.spip_ucfirst($s).$dtabbr;
1095 1095
 			} else {
1096 1096
 				$s = spip_ucfirst($s);
1097 1097
 			}
@@ -1114,8 +1114,8 @@  discard block
 block discarded – undo
1114 1114
 				$date_debut = _T('date_fmt_jour_heure', ['jour' => $date_debut, 'heure' => $hd]);
1115 1115
 				$date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]);
1116 1116
 			}
1117
-			$date_debut = $dtstart . $date_debut . $dtabbr;
1118
-			$date_fin = $dtend . $date_fin . $dtabbr;
1117
+			$date_debut = $dtstart.$date_debut.$dtabbr;
1118
+			$date_fin = $dtend.$date_fin.$dtabbr;
1119 1119
 
1120 1120
 			$s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]);
1121 1121
 		} else {
@@ -1132,8 +1132,8 @@  discard block
 block discarded – undo
1132 1132
 				$date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]);
1133 1133
 			}
1134 1134
 
1135
-			$date_debut = $dtstart . $date_debut . $dtabbr;
1136
-			$date_fin = $dtend . $date_fin . $dtabbr;
1135
+			$date_debut = $dtstart.$date_debut.$dtabbr;
1136
+			$date_fin = $dtend.$date_fin.$dtabbr;
1137 1137
 			$s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]);
1138 1138
 		}
1139 1139
 	}
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
 		$d = date('Y-m-d');
1238 1238
 	}
1239 1239
 
1240
-	return substr($d, 0, 4) . substr($d, 5, 2) . substr($d, 8, 2);
1240
+	return substr($d, 0, 4).substr($d, 5, 2).substr($d, 8, 2);
1241 1241
 }
1242 1242
 
1243 1243
 /**
@@ -1257,7 +1257,7 @@  discard block
 block discarded – undo
1257 1257
 		$d = date('Y-m-d');
1258 1258
 	}
1259 1259
 
1260
-	return substr($d, 0, 4) . substr($d, 5, 2);
1260
+	return substr($d, 0, 4).substr($d, 5, 2);
1261 1261
 }
1262 1262
 
1263 1263
 /**
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
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	) {
39 39
 		// Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé
40 40
 		include_spip('inc/autoriser');
41
-		if (!autoriser('configurer', '_' . substr($form, 11))) {
41
+		if (!autoriser('configurer', '_'.substr($form, 11))) {
42 42
 			return false;
43 43
 		}
44 44
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		and !charger_fonction('traiter', "formulaires/$form/", true) // sans fonction traiter()
73 73
 	) {
74 74
 		$trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']);
75
-		$flux['data'] = ['message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true];
75
+		$flux['data'] = ['message_ok' => _T('config_info_enregistree').$trace, 'editable' => true];
76 76
 	}
77 77
 
78 78
 	return $flux;
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$prefixe = $valeurs['_meta_prefixe'];
147 147
 	}
148 148
 	if (isset($valeurs['_meta_stockage'])) {
149
-		$stockage = $valeurs['_meta_stockage'] . '::';
149
+		$stockage = $valeurs['_meta_stockage'].'::';
150 150
 	}
151 151
 
152 152
 	// 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
 		and 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' and 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
 	list($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 ($valeurs as $k => $v) {
265 265
 		if (substr($k, 0, 1) !== '_') {
266
-			$valeurs[$k] = (isset($meta[$prefixe . $k]) ? $meta[$prefixe . $k] : null);
266
+			$valeurs[$k] = (isset($meta[$prefixe.$k]) ? $meta[$prefixe.$k] : null);
267 267
 		}
268 268
 	}
269 269
 }
Please login to merge, or discard this patch.
ecrire/inc/puce_statut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -416,7 +416,7 @@
 block discarded – undo
416 416
 	$h = generer_action_auteur('instituer_objet', "$type-$id-$statut");
417 417
 	$t = supprimer_tags($titre);
418 418
 
419
-	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>';
419
+	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>';
420 420
 }
421 421
 
422 422
 // compat
Please login to merge, or discard this patch.