Completed
Push — master ( 51674a...9b54d2 )
by cam
01:35
created
ecrire/inc/journal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 		return;
28 28
 	}
29 29
 	if ($opt) {
30
-		$phrase .= ' :: ' . str_replace("\n", ' ', implode(', ', $opt));
30
+		$phrase .= ' :: '.str_replace("\n", ' ', implode(', ', $opt));
31 31
 	}
32 32
 	spip_log($phrase, 'journal');
33 33
 }
Please login to merge, or discard this patch.
ecrire/inc/envoyer_mail.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
 	// ceci est la RegExp NO_REAL_NAME faisant hurler SpamAssassin
133 133
 	if (preg_match('/^["\s]*\<?\S+\@\S+\>?\s*$/', (string) $from)) {
134
-		$from .= ' (' . str_replace(')', '', translitteration(str_replace('@', ' at ', (string) $from))) . ')';
134
+		$from .= ' ('.str_replace(')', '', translitteration(str_replace('@', ' at ', (string) $from))).')';
135 135
 	}
136 136
 
137 137
 	// nettoyer les &eacute; &#8217, &emdash; etc...
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		if (!_TEST_EMAIL_DEST) {
170 170
 			return false;
171 171
 		} else {
172
-			$texte = "Dest : $destinataire\r\n" . $texte;
172
+			$texte = "Dest : $destinataire\r\n".$texte;
173 173
 			$destinataire = _TEST_EMAIL_DEST;
174 174
 		}
175 175
 	}
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	// Ajouter le Content-Type et consort s'il n'y est pas deja
194 194
 	if (!str_contains($headers, 'Content-Type: ')) {
195 195
 		$type =
196
-			"Content-Type: text/plain;charset=\"$charset\";\n" .
196
+			"Content-Type: text/plain;charset=\"$charset\";\n".
197 197
 			"Content-Transfer-Encoding: 8bit\n";
198 198
 	} else {
199 199
 		$type = '';
@@ -201,16 +201,16 @@  discard block
 block discarded – undo
201 201
 
202 202
 	// calculer un identifiant unique
203 203
 	// Marie Toto <[email protected]> => @toto.com
204
-	$domain = preg_match('/@[^\s>]+/', $from, $domain) ? $domain[0] : '@unknown-' . md5($from) . '.org';
205
-	$uniq = random_int(0, mt_getrandmax()) . '_' . md5($to . $texte) . $domain;
204
+	$domain = preg_match('/@[^\s>]+/', $from, $domain) ? $domain[0] : '@unknown-'.md5($from).'.org';
205
+	$uniq = random_int(0, mt_getrandmax()).'_'.md5($to.$texte).$domain;
206 206
 
207 207
 	// Si multi-part, s'en servir comme borne ...
208 208
 	if ($parts) {
209
-		$texte = "--$uniq\n$type\n" . $texte . "\n";
209
+		$texte = "--$uniq\n$type\n".$texte."\n";
210 210
 		foreach ($parts as $part) {
211
-			$n = strlen((string) $part[1]) . ($part[0] ? "\n" : '');
211
+			$n = strlen((string) $part[1]).($part[0] ? "\n" : '');
212 212
 			$e = implode("\n", $part[0]);
213
-			$texte .= "\n--$uniq\nContent-Length: $n$e\n\n" . $part[1];
213
+			$texte .= "\n--$uniq\nContent-Length: $n$e\n\n".$part[1];
214 214
 		}
215 215
 		$texte .= "\n\n--$uniq--\n";
216 216
 		// Si boundary n'est pas entre guillemets,
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 
221 221
 	// .. et s'en servir pour plaire a SpamAssassin
222 222
 
223
-	$mid = 'Message-Id: <' . $uniq . '>';
223
+	$mid = 'Message-Id: <'.$uniq.'>';
224 224
 
225 225
 	// indispensable pour les sites qui collent d'office From: serveur-http
226 226
 	// sauf si deja mis par l'envoyeur
Please login to merge, or discard this patch.
ecrire/inc/lien_court.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	$coupe_url = defined('_MAX_COUPE_URL') ? _MAX_COUPE_URL : 35;
26 26
 
27 27
 	if (strlen((string) $url) > $long_url) {
28
-		$url = substr((string) $url, 0, $coupe_url) . '...';
28
+		$url = substr((string) $url, 0, $coupe_url).'...';
29 29
 	}
30 30
 
31 31
 	return $url;
Please login to merge, or discard this patch.
ecrire/inc/lien.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	return $r ?: traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo);
106 106
 }
107 107
 
108
-define('_EXTRAIRE_LIEN', ',^\s*(?:' . _PROTOCOLES_STD . '):?/?/?\s*$,iS');
108
+define('_EXTRAIRE_LIEN', ',^\s*(?:'._PROTOCOLES_STD.'):?/?/?\s*$,iS');
109 109
 
110 110
 function traiter_lien_explicite($ref, $texte = '', $pour = 'url', string $connect = '', $echappe_typo = true) {
111 111
 	if (preg_match(_EXTRAIRE_LIEN, (string) $ref)) {
@@ -121,19 +121,19 @@  discard block
 block discarded – undo
121 121
 		$lien_court = charger_fonction('lien_court', 'inc');
122 122
 		$texte = $lien_court($texte);
123 123
 		if ($echappe_typo) {
124
-			$texte = '<html>' . quote_amp($texte) . '</html>';
124
+			$texte = '<html>'.quote_amp($texte).'</html>';
125 125
 		}
126 126
 	}
127 127
 
128 128
 	// petites corrections d'URL
129 129
 	if (preg_match('/^www\.[^@]+$/S', (string) $lien)) {
130
-		$lien = 'http://' . $lien;
130
+		$lien = 'http://'.$lien;
131 131
 	} else {
132 132
 		if (strpos((string) $lien, '@') && email_valide($lien)) {
133 133
 			if (!$texte) {
134 134
 				$texte = $lien;
135 135
 			}
136
-			$lien = 'mailto:' . $lien;
136
+			$lien = 'mailto:'.$lien;
137 137
 		}
138 138
 	}
139 139
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 }
150 150
 
151 151
 function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, string $connect = '') {
152
-	return function_exists($f = 'glossaire_' . $ancre) ? $f($texte, $id) : glossaire_std($texte);
152
+	return function_exists($f = 'glossaire_'.$ancre) ? $f($texte, $id) : glossaire_std($texte);
153 153
 }
154 154
 
155 155
 /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		return false;
177 177
 	}
178 178
 
179
-	[$type, , $id, , $args, , $ancre] = array_pad($match, 7, null);
179
+	[$type,, $id,, $args,, $ancre] = array_pad($match, 7, null);
180 180
 
181 181
 	# attention dans le cas des sites le lien doit pointer non pas sur
182 182
 	# la page locale du site, mais directement sur le site lui-meme
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	}
213 213
 
214 214
 	if (!@$r['titre']) {
215
-		$r['titre'] = _T($type) . " $id";
215
+		$r['titre'] = _T($type)." $id";
216 216
 	}
217 217
 
218 218
 	if ($pour == 'titre') {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		$type == 'document' && ($mime = sql_getfetsel(
227 227
 			'mime_type',
228 228
 			'spip_types_documents',
229
-			'extension IN (' . sql_get_select('extension', 'spip_documents', 'id_document=' . sql_quote($id)) . ')',
229
+			'extension IN ('.sql_get_select('extension', 'spip_documents', 'id_document='.sql_quote($id)).')',
230 230
 			'',
231 231
 			'',
232 232
 			'',
Please login to merge, or discard this patch.
ecrire/inc/boutons.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 			&& autoriser('onglet', "_$id")
51 51
 		) {
52 52
 			$onglets[$id] = new Bouton(
53
-				isset($infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
54
-				$infos['titre'],  // titre
53
+				isset($infos['icone']) ? find_in_theme($infos['icone']) : '', // icone
54
+				$infos['titre'], // titre
55 55
 				(isset($infos['action']) && $infos['action'])
56 56
 					? generer_url_ecrire(
57 57
 						$infos['action'],
@@ -89,5 +89,5 @@  discard block
 block discarded – undo
89 89
 		$res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
90 90
 	}
91 91
 
92
-	return $res ? debut_onglet($class) . $res . fin_onglet() : ('');
92
+	return $res ? debut_onglet($class).$res.fin_onglet() : ('');
93 93
 }
Please login to merge, or discard this patch.
ecrire/inc/invalideur.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	$n = 0;
45 45
 	$time = $GLOBALS['meta']['cache_mark'] ?? 0;
46 46
 	for ($i = 0; $i < 256; $i++) {
47
-		$dir = _DIR_CACHE . sprintf('%02s', dechex($i));
47
+		$dir = _DIR_CACHE.sprintf('%02s', dechex($i));
48 48
 		if (@is_dir($dir) && is_readable($dir) && ($d = opendir($dir))) {
49 49
 			while (($f = readdir($d)) !== false) {
50 50
 				if (preg_match(',^[[0-9a-f]+\.cache$,S', $f) && ($a = stat("$dir/$f"))) {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 	// stocker la date_modif_$objet (ne sert a rien pour le moment)
103 103
 	if (isset($objet)) {
104
-		ecrire_meta('derniere_modif_' . $objet, time());
104
+		ecrire_meta('derniere_modif_'.$objet, time());
105 105
 	}
106 106
 
107 107
 	// si $derniere_modif_invalide est un array('article', 'rubrique')
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 	// sur certains sites on veut absolument garder certains caches référencés dans un CDN
146 146
 	// on peut donc inhiber la purge de ces répertoires pour eviter tout probleme
147
-	if (file_exists(rtrim($dir, '/') . '/inhib_purger_repertoire.txt')) {
147
+	if (file_exists(rtrim($dir, '/').'/inhib_purger_repertoire.txt')) {
148 148
 		return 0;
149 149
 	}
150 150
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 		)
206 206
 	) {
207 207
 		// supprimer le fichier (de facon propre)
208
-		supprimer_fichier(_DIR_CACHE . $cache);
208
+		supprimer_fichier(_DIR_CACHE.$cache);
209 209
 	} else {
210 210
 		spip_log("Nom de fichier cache incorrect : $cache");
211 211
 	}
Please login to merge, or discard this patch.
ecrire/inc/charsets.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		$charset = 'cp1256';
90 90
 	}
91 91
 
92
-	if (find_in_path($charset . '.php', 'charsets/', true)) {
92
+	if (find_in_path($charset.'.php', 'charsets/', true)) {
93 93
 		return $charset;
94 94
 	} else {
95 95
 		spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'");
@@ -190,38 +190,38 @@  discard block
 block discarded – undo
190 190
 
191 191
 	if (!isset($trans[$charset][$charset_cible])) {
192 192
 		$trans[$charset][$charset_cible] = [
193
-			$p . chr(128) => '&#8364;',
194
-			$p . chr(129) => ' ', # pas affecte
195
-			$p . chr(130) => '&#8218;',
196
-			$p . chr(131) => '&#402;',
197
-			$p . chr(132) => '&#8222;',
198
-			$p . chr(133) => '&#8230;',
199
-			$p . chr(134) => '&#8224;',
200
-			$p . chr(135) => '&#8225;',
201
-			$p . chr(136) => '&#710;',
202
-			$p . chr(137) => '&#8240;',
203
-			$p . chr(138) => '&#352;',
204
-			$p . chr(139) => '&#8249;',
205
-			$p . chr(140) => '&#338;',
206
-			$p . chr(141) => ' ', # pas affecte
207
-			$p . chr(142) => '&#381;',
208
-			$p . chr(143) => ' ', # pas affecte
209
-			$p . chr(144) => ' ', # pas affecte
210
-			$p . chr(145) => '&#8216;',
211
-			$p . chr(146) => '&#8217;',
212
-			$p . chr(147) => '&#8220;',
213
-			$p . chr(148) => '&#8221;',
214
-			$p . chr(149) => '&#8226;',
215
-			$p . chr(150) => '&#8211;',
216
-			$p . chr(151) => '&#8212;',
217
-			$p . chr(152) => '&#732;',
218
-			$p . chr(153) => '&#8482;',
219
-			$p . chr(154) => '&#353;',
220
-			$p . chr(155) => '&#8250;',
221
-			$p . chr(156) => '&#339;',
222
-			$p . chr(157) => ' ', # pas affecte
223
-			$p . chr(158) => '&#382;',
224
-			$p . chr(159) => '&#376;',
193
+			$p.chr(128) => '&#8364;',
194
+			$p.chr(129) => ' ', # pas affecte
195
+			$p.chr(130) => '&#8218;',
196
+			$p.chr(131) => '&#402;',
197
+			$p.chr(132) => '&#8222;',
198
+			$p.chr(133) => '&#8230;',
199
+			$p.chr(134) => '&#8224;',
200
+			$p.chr(135) => '&#8225;',
201
+			$p.chr(136) => '&#710;',
202
+			$p.chr(137) => '&#8240;',
203
+			$p.chr(138) => '&#352;',
204
+			$p.chr(139) => '&#8249;',
205
+			$p.chr(140) => '&#338;',
206
+			$p.chr(141) => ' ', # pas affecte
207
+			$p.chr(142) => '&#381;',
208
+			$p.chr(143) => ' ', # pas affecte
209
+			$p.chr(144) => ' ', # pas affecte
210
+			$p.chr(145) => '&#8216;',
211
+			$p.chr(146) => '&#8217;',
212
+			$p.chr(147) => '&#8220;',
213
+			$p.chr(148) => '&#8221;',
214
+			$p.chr(149) => '&#8226;',
215
+			$p.chr(150) => '&#8211;',
216
+			$p.chr(151) => '&#8212;',
217
+			$p.chr(152) => '&#732;',
218
+			$p.chr(153) => '&#8482;',
219
+			$p.chr(154) => '&#353;',
220
+			$p.chr(155) => '&#8250;',
221
+			$p.chr(156) => '&#339;',
222
+			$p.chr(157) => ' ', # pas affecte
223
+			$p.chr(158) => '&#382;',
224
+			$p.chr(159) => '&#376;',
225 225
 		];
226 226
 		if ($charset_cible != 'unicode') {
227 227
 			foreach ($trans[$charset][$charset_cible] as $k => $c) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 			// Sinon, peut-etre connaissons-nous ce charset ?
359 359
 			if (!isset($trans[$charset]) && (($cset = load_charset($charset)) && is_array($GLOBALS['CHARSET'][$cset]))) {
360 360
 				foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
361
-					$trans[$charset][chr($key)] = '&#' . $val . ';';
361
+					$trans[$charset][chr($key)] = '&#'.$val.';';
362 362
 				}
363 363
 			}
364 364
 			if (isset($trans[$charset]) && (is_countable($trans[$charset]) ? count($trans[$charset]) : 0)) {
@@ -423,11 +423,11 @@  discard block
 block discarded – undo
423 423
 					$h = dechex($e);
424 424
 					if ($s = isset($CHARSET_REVERSE[$charset][$e])) {
425 425
 						$s = $CHARSET_REVERSE[$charset][$e];
426
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($s);
427
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($s);
426
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($s);
427
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($s);
428 428
 					} else {
429
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($e);
430
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($e);
429
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($e);
430
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($e);
431 431
 					}
432 432
 				}
433 433
 			}
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 			&& is_array($GLOBALS['CHARSET'][$cset]))
474 474
 		) {
475 475
 			foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
476
-				$trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';');
476
+				$trans[$charset][chr($key)] = unicode2charset('&#'.$val.';');
477 477
 			}
478 478
 		}
479 479
 		if (is_countable($trans[$charset]) ? count($trans[$charset]) : 0) {
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 				}
580 580
 				$thisPos++;
581 581
 			}
582
-			$encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';';
582
+			$encodedLetter = '&#'.preg_replace('/^0+/', '', $decimalCode).';';
583 583
 			$encodedString .= $encodedLetter;
584 584
 		}
585 585
 	}
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
 			} // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html
623 623
 			else {
624 624
 				if ($word != 65279) {
625
-					$texte .= '&#' . $word . ';';
625
+					$texte .= '&#'.$word.';';
626 626
 				}
627 627
 			}
628 628
 		}
@@ -650,13 +650,13 @@  discard block
 block discarded – undo
650 650
 		return chr($num);
651 651
 	}
652 652
 	if ($num < 2048) {
653
-		return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
653
+		return chr(($num >> 6) + 192).chr(($num & 63) + 128);
654 654
 	}
655 655
 	if ($num < 65536) {
656
-		return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
656
+		return chr(($num >> 12) + 224).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
657 657
 	}
658 658
 	if ($num < 1_114_112) {
659
-		return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
659
+		return chr(($num >> 18) + 240).chr((($num >> 12) & 63) + 128).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
660 660
 	}
661 661
 
662 662
 	return '';
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 	while (preg_match(',&#0*(\d+);,S', $texte, $regs) && !isset($vu[$regs[1]])) {
724 724
 		$num = $regs[1];
725 725
 		$vu[$num] = true;
726
-		$s = '\u' . sprintf('%04x', $num);
726
+		$s = '\u'.sprintf('%04x', $num);
727 727
 		$texte = str_replace($regs[0], $s, $texte);
728 728
 	}
729 729
 
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
  **/
741 741
 function javascript_to_unicode($texte) {
742 742
 	while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) {
743
-		$texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte);
743
+		$texte = str_replace($regs[0], '&#'.hexdec($regs[1]).';', $texte);
744 744
 	}
745 745
 
746 746
 	return $texte;
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 		return $texte;
786 786
 	}
787 787
 
788
-	$table_translit = 'translit' . $complexe;
788
+	$table_translit = 'translit'.$complexe;
789 789
 
790 790
 	// 2. Translitterer grace a la table predefinie
791 791
 	if (!isset($trans[$complexe])) {
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
  *    true s'il a un BOM
877 877
  **/
878 878
 function bom_utf8($texte): bool {
879
-	return (substr($texte, 0, 3) === chr(0xEF) . chr(0xBB) . chr(0xBF));
879
+	return (substr($texte, 0, 3) === chr(0xEF).chr(0xBB).chr(0xBF));
880 880
 }
881 881
 
882 882
 /**
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
 
1044 1044
 	$lettre1 = mb_strtoupper(spip_substr($c, 0, 1));
1045 1045
 
1046
-	return $lettre1 . spip_substr($c, 1);
1046
+	return $lettre1.spip_substr($c, 1);
1047 1047
 }
1048 1048
 
1049 1049
 /**
Please login to merge, or discard this patch.
ecrire/inc/filtres_alertes.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	$_texte = ($_texte ?: "''");
51 51
 	$_titre = ($_titre ? ", $_titre" : ', null');
52 52
 	$_class = ($_class ? ", $_class" : ', null');
53
-	$_role  = ($_role  ? ", $_role"  : ', null');
54
-	$_id    = ($_id    ? ", $_id"    : ', null');
53
+	$_role  = ($_role ? ", $_role" : ', null');
54
+	$_id    = ($_id ? ", $_id" : ', null');
55 55
 
56 56
 	$f = chercher_filtre('message_alerte');
57 57
 	$p->code = "$f($_texte$_titre$_class$_role$_id)";
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
 	$_class = interprete_argument_balise(2, $p);
90 90
 	$_role  = interprete_argument_balise(3, $p);
91 91
 	$_id    = interprete_argument_balise(4, $p);
92
-	$_titre = ($_titre ? "$_titre"   : 'null');
92
+	$_titre = ($_titre ? "$_titre" : 'null');
93 93
 	$_class = ($_class ? ", $_class" : ', null');
94
-	$_role  = ($_role  ? ", $_role"  : ', null');
95
-	$_id    = ($_id    ? ", $_id"    : ', null');
94
+	$_role  = ($_role ? ", $_role" : ', null');
95
+	$_id    = ($_id ? ", $_id" : ', null');
96 96
 
97 97
 	$f = chercher_filtre('message_alerte_ouvrir');
98 98
 	$p->code = "$f($_titre$_class$_role$_id)";
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 	$message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir');
163 163
 	$message_alerte_fermer = chercher_filtre('message_alerte_fermer');
164 164
 
165
-	return $message_alerte_ouvrir($titre, $class, $role, $id) .
166
-		$texte .
165
+	return $message_alerte_ouvrir($titre, $class, $role, $id).
166
+		$texte.
167 167
 		$message_alerte_fermer();
168 168
 }
169 169
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	];
212 212
 	$type  = array_intersect(explode(' ', $class), $types);
213 213
 	$type  = reset($type);
214
-	$class = trim(str_replace($types, '', $class) . " $type");
214
+	$class = trim(str_replace($types, '', $class)." $type");
215 215
 
216 216
 	// Classes
217 217
 	$class_racine = 'msg-alert';
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
 	// Attributs
238 238
 	$attr_role = ($role ? "role=\"$role\"" : '');
239
-	$attr_id   = ($id   ? "id=\"$id\"" : '');
239
+	$attr_id   = ($id ? "id=\"$id\"" : '');
240 240
 	$attr_data = ($type ? "data-alert=\"$type\"" : '');
241 241
 
242 242
 	return "<div class=\"$class_alerte\" $attr_role $attr_id $attr_data>"
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((string) $form, 11))) {
40
+		if (!autoriser('configurer', '_'.substr((string) $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((string) $casier, '/') . '/' : ''; // slash final, sinon rien
233
+	$casier = ($casier) ? rtrim((string) $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.