Completed
Push — master ( db70c0...a01cf2 )
by cam
01:03
created
ecrire/action/editer_logo.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	if ($logo) {
41 41
 		# TODO : deprecated, a supprimer -> anciens logos IMG/artonxx.png pas en base
42 42
 		if ((is_countable($logo) ? count($logo) : 0) < 6) {
43
-			spip_log('Supprimer ancien logo ' . json_encode($logo, JSON_THROW_ON_ERROR), 'logo');
43
+			spip_log('Supprimer ancien logo '.json_encode($logo, JSON_THROW_ON_ERROR), 'logo');
44 44
 			spip_unlink($logo[0]);
45 45
 		}
46 46
 		elseif (
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		return $erreur;
90 90
 	}
91 91
 	// chercher dans la base
92
-	$mode_document = 'logo' . $mode;
92
+	$mode_document = 'logo'.$mode;
93 93
 
94 94
 	include_spip('inc/documents');
95 95
 	$erreur = '';
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 		$tmp_name = false;
107 107
 		if (file_exists($source)) {
108 108
 			$tmp_name = $source;
109
-		} elseif (file_exists($f = determine_upload() . $source)) {
109
+		} elseif (file_exists($f = determine_upload().$source)) {
110 110
 			$tmp_name = $f;
111 111
 		}
112 112
 		if (!$tmp_name) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 	if (!is_numeric($id_document)) {
144 144
 		$erreur = ($id_document ?: 'Erreur inconnue');
145
-		spip_log("Erreur ajout logo : $erreur pour source=" . json_encode($source, JSON_THROW_ON_ERROR), 'logo');
145
+		spip_log("Erreur ajout logo : $erreur pour source=".json_encode($source, JSON_THROW_ON_ERROR), 'logo');
146 146
 		return $erreur;
147 147
 	}
148 148
 
@@ -175,23 +175,23 @@  discard block
 block discarded – undo
175 175
 	$GLOBALS['meta']['articles_modif'] = 'non';
176 176
 
177 177
 	foreach (['on', 'off'] as $mode) {
178
-		$nom_base = $type . $mode;
178
+		$nom_base = $type.$mode;
179 179
 		$dir = (defined('_DIR_LOGOS') ? _DIR_LOGOS : _DIR_IMG);
180 180
 
181
-		$files = glob($dir . $nom_base . '*');
181
+		$files = glob($dir.$nom_base.'*');
182 182
 		// est-ce que c'est une nouvelle tentative de migration ?
183 183
 		// dans ce cas les logos sont deja dans IMG/logo/
184 184
 		if (!(is_countable($files) ? count($files) : 0)) {
185
-			$files = glob($dir_logos . $nom_base . '*');
185
+			$files = glob($dir_logos.$nom_base.'*');
186 186
 			if (is_countable($files) ? count($files) : 0) {
187 187
 				// mais il faut verifier si ils ont pas deja ete migres pour tout ou partie
188 188
 				$filescheck = [];
189 189
 				foreach ($files as $file) {
190
-					$short = basename(dirname($file)) . DIRECTORY_SEPARATOR . basename($file);
190
+					$short = basename(dirname($file)).DIRECTORY_SEPARATOR.basename($file);
191 191
 					$filescheck[$short] = $file;
192 192
 				}
193 193
 				// trouver ceux deja migres
194
-				$deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck)) . " AND mode LIKE 'logo%'");
194
+				$deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck))." AND mode LIKE 'logo%'");
195 195
 				if (is_countable($deja) ? count($deja) : 0) {
196 196
 					$deja = array_column($deja, 'fichier');
197 197
 					$restant = array_diff(array_keys($filescheck), $deja);
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
 		}
212 212
 
213 213
 		$count = (is_countable($files) ? count($files) : 0);
214
-		spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
214
+		spip_log("logo_migrer_en_base $objet $mode : ".$count.' logos restant', 'maj'._LOG_INFO_IMPORTANTE);
215 215
 
216 216
 		$deja = [];
217 217
 		foreach ($files as $file) {
218
-			$logo = substr($file, strlen($dir . $nom_base));
218
+			$logo = substr($file, strlen($dir.$nom_base));
219 219
 			$logo = explode('.', $logo);
220 220
 			if (
221 221
 				is_numeric($logo[0])
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 					// if no logo in base
227 227
 					if (!$logo or (is_countable($logo) ? count($logo) : 0) < 6) {
228 228
 						foreach ($formats_logos as $format) {
229
-							if (@file_exists($d = ($dir . ($nom = $nom_base . intval($id_objet) . '.' . $format)))) {
229
+							if (@file_exists($d = ($dir.($nom = $nom_base.intval($id_objet).'.'.$format)))) {
230 230
 								if (isset($desc['field']['date_modif'])) {
231 231
 									$date_modif = sql_getfetsel('date_modif', $table, "$_id_objet=$id_objet");
232 232
 								} else {
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
 								// s'assurer que le logo a les bon droits au passage (evite un echec en cas de sanitization d'un svg)
236 236
 								@chmod($d, _SPIP_CHMOD & 0666);
237 237
 								// logo_modifier commence par supprimer le logo existant, donc on le deplace pour pas le perdre
238
-								@rename($d, $dir_logos . $nom);
238
+								@rename($d, $dir_logos.$nom);
239 239
 								// et on le declare comme nouveau logo
240
-								logo_modifier($objet, $id_objet, $mode, $dir_logos . $nom);
240
+								logo_modifier($objet, $id_objet, $mode, $dir_logos.$nom);
241 241
 								if ($date_modif) {
242 242
 									sql_updateq($table, ['date_modif' => $date_modif], "$_id_objet=$id_objet");
243 243
 								}
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
 			// si le fichier est encore la on le move : rien a faire ici
252 252
 			// (sauf si c'est une re-migration : il est deja dans logo/ donc il bouge pas)
253 253
 			if ($dir !== $dir_logos and file_exists($file)) {
254
-				@rename($file, $dir_logos_erreurs . basename($file));
254
+				@rename($file, $dir_logos_erreurs.basename($file));
255 255
 			}
256 256
 
257 257
 			$count--;
258 258
 			if ($count % 250 === 0) {
259
-				spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
259
+				spip_log("logo_migrer_en_base $objet $mode : ".$count.' logos restant', 'maj'._LOG_INFO_IMPORTANTE);
260 260
 			}
261 261
 
262 262
 			if ($time_limit and time() > $time_limit) {
Please login to merge, or discard this patch.
ecrire/inc/modeles.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	'(<([a-z_-]{3,})' # <modele
27 27
 	. '\s*([0-9]*)\s*' # id
28 28
 	. '([|](?:<[^<>]*>|[^>])*?)?' # |arguments (y compris des tags <...>)
29
-	. '\s*/?' . '>)' # fin du modele >
29
+	. '\s*/?'.'>)' # fin du modele >
30 30
 );
31 31
 
32 32
 define(
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	. '\s*(<\/a>)?' # eventuel </a>
36 36
 );
37 37
 
38
-define('_RACCOURCI_MODELE_DEBUT', '@^' . _RACCOURCI_MODELE . '@isS');
38
+define('_RACCOURCI_MODELE_DEBUT', '@^'._RACCOURCI_MODELE.'@isS');
39 39
 
40 40
 /**
41 41
  * Detecter et collecter les modeles d'un texte dans un tableau descriptif
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$pos = 0;
56 56
 		// Recuperer l'appel complet (y compris un eventuel lien)
57 57
 		foreach ($matches as $match) {
58
-			$a = strpos($texte, (string)$match[0], $pos);
58
+			$a = strpos($texte, (string) $match[0], $pos);
59 59
 
60 60
 			if (preg_match(_RACCOURCI_MODELE_DEBUT, substr($texte, $a), $regs)) {
61 61
 				// s'assurer qu'il y a toujours un 5e arg, eventuellement vide
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 				$modeles[] = $modele;
104 104
 			}
105
-			$pos = $a + strlen((string)$match[0]);
105
+			$pos = $a + strlen((string) $match[0]);
106 106
 		}
107 107
 	}
108 108
 	return $modeles;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
 		$offset_pos = 0;
132 132
 		foreach ($modeles as $m) {
133
-			$rempl = $markid . base64_encode($m['modele']) . '|@';
133
+			$rempl = $markid.base64_encode($m['modele']).'|@';
134 134
 			$texte = substr_replace($texte, $rempl, $m['pos'] + $offset_pos, $m['length']);
135 135
 			$offset_pos += strlen($rempl) - $m['length'];
136 136
 		}
Please login to merge, or discard this patch.
ecrire/inc/texte_mini.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
 	// celle du texte) et public (spip_lang est la langue du texte)
45 45
 	$dir = _DIR_RESTREINT ? lang_dir() : lang_dir($GLOBALS['spip_lang']);
46 46
 
47
-	$p = 'puce' . (test_espace_prive() ? '_prive' : '');
47
+	$p = 'puce'.(test_espace_prive() ? '_prive' : '');
48 48
 	if ($dir == 'rtl') {
49 49
 		$p .= '_rtl';
50 50
 	}
51 51
 
52 52
 	if (!isset($GLOBALS[$p])) {
53
-		$GLOBALS[$p] = '<span class="spip-puce ' . $dir . '"><b>–</b></span>';
53
+		$GLOBALS[$p] = '<span class="spip-puce '.$dir.'"><b>–</b></span>';
54 54
 	}
55 55
 
56 56
 	return $GLOBALS[$p];
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 if (!defined('_BALISES_BLOCS_REGEXP')) {
71
-	define('_BALISES_BLOCS_REGEXP', ',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS');
71
+	define('_BALISES_BLOCS_REGEXP', ',</?('._BALISES_BLOCS.')[>[:space:]],iS');
72 72
 }
73 73
 
74 74
 //
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 	// Tester si on echappe en span ou en div
87 87
 	if (is_null($mode) or !in_array($mode, ['div', 'span'])) {
88
-		$mode = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $rempl) ? 'div' : 'span';
88
+		$mode = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $rempl) ? 'div' : 'span';
89 89
 	}
90 90
 
91 91
 	// Decouper en morceaux, base64 a des probleme selon la taille de la pile
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	) {
121 121
 		foreach ($matches as $m) {
122 122
 			if ($m[1] === 'code') {
123
-				$code = '<code' . $m[2] . '>' . spip_htmlspecialchars($m[3]) . '</code>';
123
+				$code = '<code'.$m[2].'>'.spip_htmlspecialchars($m[3]).'</code>';
124 124
 				$pre = str_replace($m[0], $code, $pre);
125 125
 			}
126 126
 		}
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
 // Echapper les <code>...</ code>
132 132
 function traiter_echap_code_dist($regs, $options = []) {
133
-	[, , $att, $corps] = $regs;
133
+	[,, $att, $corps] = $regs;
134 134
 	$echap = spip_htmlspecialchars($corps); // il ne faut pas passer dans entites_html, ne pas transformer les &#xxx; du code !
135 135
 
136 136
 	// ne pas mettre le <div...> s'il n'y a qu'une ligne
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
 		$echap = nl2br($echap);
142 142
 		$echap = "<div style='text-align: left;' "
143 143
 			. "class='spip_code' dir='ltr'><code$att>"
144
-			. $echap . '</code></div>';
144
+			. $echap.'</code></div>';
145 145
 	} else {
146
-		$echap = "<code$att class='spip_code' dir='ltr'>" . $echap . '</code>';
146
+		$echap = "<code$att class='spip_code' dir='ltr'>".$echap.'</code>';
147 147
 	}
148 148
 
149 149
 	$echap = str_replace("\t", '&nbsp; &nbsp; &nbsp; &nbsp; ', $echap);
@@ -220,11 +220,11 @@  discard block
 block discarded – undo
220 220
 			else {
221 221
 				$callback_secure_prefix = ($callback_options['secure_prefix'] ?? '');
222 222
 				if (
223
-					function_exists($f = $callback_prefix . $callback_secure_prefix . 'traiter_echap_' . strtolower($regs[1]))
224
-					or function_exists($f = $f . '_dist')
223
+					function_exists($f = $callback_prefix.$callback_secure_prefix.'traiter_echap_'.strtolower($regs[1]))
224
+					or function_exists($f = $f.'_dist')
225 225
 					or ($callback_secure_prefix and (
226
-						function_exists($f = $callback_prefix . 'traiter_echap_' . strtolower($regs[1]))
227
-						or function_exists($f = $f . '_dist')
226
+						function_exists($f = $callback_prefix.'traiter_echap_'.strtolower($regs[1]))
227
+						or function_exists($f = $f.'_dist')
228 228
 					))
229 229
 				) {
230 230
 					$echap = $f($regs, $callback_options);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	// dans une callback autonommee
247 247
 	if (strpos($preg ?: _PROTEGE_BLOCS, 'script') !== false) {
248 248
 		if (
249
-			strpos($letexte, '<' . '?') !== false and preg_match_all(
249
+			strpos($letexte, '<'.'?') !== false and preg_match_all(
250 250
 				',<[?].*($|[?]>),UisS',
251 251
 				$letexte,
252 252
 				$matches,
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 			strpos($letexte, '<') !== false
279 279
 			and
280 280
 			preg_match_all(
281
-				',<(span|div)\sclass=[\'"]base64' . $source . '[\'"]\s(.*)>\s*</\1>,UmsS',
281
+				',<(span|div)\sclass=[\'"]base64'.$source.'[\'"]\s(.*)>\s*</\1>,UmsS',
282 282
 				$letexte,
283 283
 				$regs,
284 284
 				PREG_SET_ORDER
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 					}
296 296
 				}
297 297
 				if ($at) {
298
-					$rempl = '<' . $reg[1] . '>' . $rempl . '</' . $reg[1] . '>';
298
+					$rempl = '<'.$reg[1].'>'.$rempl.'</'.$reg[1].'>';
299 299
 					foreach ($at as $attr => $a) {
300 300
 						$rempl = inserer_attribut($rempl, $attr, $a);
301 301
 					}
@@ -376,8 +376,8 @@  discard block
 block discarded – undo
376 376
 	$texte = nettoyer_raccourcis_typo($texte);
377 377
 
378 378
 	// balises de sauts de ligne et paragraphe
379
-	$texte = preg_replace('/<p( [^>]*)?' . '>/', "\r", $texte);
380
-	$texte = preg_replace('/<br( [^>]*)?' . '>/', "\n", $texte);
379
+	$texte = preg_replace('/<p( [^>]*)?'.'>/', "\r", $texte);
380
+	$texte = preg_replace('/<br( [^>]*)?'.'>/', "\n", $texte);
381 381
 
382 382
 	// on repasse les doubles \n en \r que nettoyer_raccourcis_typo() a pu modifier
383 383
 	$texte = str_replace("\n\n", "\r", $texte);
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	// supprimer les tags
386 386
 	$texte = supprimer_tags($texte);
387 387
 	$texte = trim(str_replace("\n", ' ', $texte));
388
-	$texte .= "\n";  // marquer la fin
388
+	$texte .= "\n"; // marquer la fin
389 389
 
390 390
 	// corriger la longueur de coupe
391 391
 	// en fonction de la presence de caracteres utf
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 	// couper au mot precedent
401 401
 	$long = spip_substr($texte, 0, max($taille - 4, 1));
402 402
 	$u = $GLOBALS['meta']['pcre_u'];
403
-	$court = preg_replace("/([^\s][\s]+)[^\s]*\n?$/" . $u, "\\1", $long);
403
+	$court = preg_replace("/([^\s][\s]+)[^\s]*\n?$/".$u, "\\1", $long);
404 404
 	if (is_null($suite)) {
405 405
 		$suite = (defined('_COUPER_SUITE') ? _COUPER_SUITE : '&nbsp;(...)');
406 406
 	}
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 	if (spip_strlen($court) < max(0.75 * $taille, 2)) {
411 411
 		$points = '';
412 412
 		$long = spip_substr($texte, 0, $taille);
413
-		$texte = preg_replace("/([^\s][\s]+)[^\s]*\n?$/" . $u, "\\1", $long);
413
+		$texte = preg_replace("/([^\s][\s]+)[^\s]*\n?$/".$u, "\\1", $long);
414 414
 		// encore trop court ? couper au caractere
415 415
 		if (spip_strlen($texte) < 0.75 * $taille) {
416 416
 			$texte = $long;
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 	// supprimer l'eventuelle entite finale mal coupee
430 430
 	$texte = preg_replace('/&#?[a-z0-9]*$/S', '', $texte);
431 431
 
432
-	return quote_amp(trim($texte)) . $points;
432
+	return quote_amp(trim($texte)).$points;
433 433
 }
434 434
 
435 435
 
@@ -441,16 +441,16 @@  discard block
 block discarded – undo
441 441
 				define('_PROTEGE_JS_MODELES', creer_uniqid());
442 442
 			}
443 443
 			foreach ($r as $regs) {
444
-				$t = str_replace($regs[0], code_echappement($regs[0], 'javascript' . _PROTEGE_JS_MODELES), $t);
444
+				$t = str_replace($regs[0], code_echappement($regs[0], 'javascript'._PROTEGE_JS_MODELES), $t);
445 445
 			}
446 446
 		}
447
-		if (preg_match_all(',<\?php.*?($|\?' . '>),isS', $t, $r, PREG_SET_ORDER)) {
447
+		if (preg_match_all(',<\?php.*?($|\?'.'>),isS', $t, $r, PREG_SET_ORDER)) {
448 448
 			if (!defined('_PROTEGE_PHP_MODELES')) {
449 449
 				include_spip('inc/acces');
450 450
 				define('_PROTEGE_PHP_MODELES', creer_uniqid());
451 451
 			}
452 452
 			foreach ($r as $regs) {
453
-				$t = str_replace($regs[0], code_echappement($regs[0], 'php' . _PROTEGE_PHP_MODELES), $t);
453
+				$t = str_replace($regs[0], code_echappement($regs[0], 'php'._PROTEGE_PHP_MODELES), $t);
454 454
 			}
455 455
 		}
456 456
 	}
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 			if (!empty($options['wrap_suspect'])) {
566 566
 				$texte = wrap($texte, $options['wrap_suspect']);
567 567
 			}
568
-			$texte = "<mark class='danger-js' title='" . attribut_html(_T('erreur_contenu_suspect')) . "'>⚠️</mark> " . $texte;
568
+			$texte = "<mark class='danger-js' title='".attribut_html(_T('erreur_contenu_suspect'))."'>⚠️</mark> ".$texte;
569 569
 		}
570 570
 		$texte = modele_retablir_raccourcis_echappes($texte, $markid);
571 571
 	}
@@ -673,11 +673,11 @@  discard block
 block discarded – undo
673 673
  **/
674 674
 function supprime_img($letexte, $message = null) {
675 675
 	if ($message === null) {
676
-		$message = '(' . _T('img_indisponible') . ')';
676
+		$message = '('._T('img_indisponible').')';
677 677
 	}
678 678
 
679 679
 	return preg_replace(
680
-		',<(img|doc|emb)([0-9]+)(\|([^>]*))?' . '\s*/?' . '>,i',
680
+		',<(img|doc|emb)([0-9]+)(\|([^>]*))?'.'\s*/?'.'>,i',
681 681
 		$message,
682 682
 		$letexte
683 683
 	);
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
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	return $r ?: traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo);
112 112
 }
113 113
 
114
-define('_EXTRAIRE_LIEN', ',^\s*(?:' . _PROTOCOLES_STD . '):?/?/?\s*$,iS');
114
+define('_EXTRAIRE_LIEN', ',^\s*(?:'._PROTOCOLES_STD.'):?/?/?\s*$,iS');
115 115
 
116 116
 function traiter_lien_explicite($ref, $texte = '', $pour = 'url', string $connect = '', $echappe_typo = true) {
117 117
 	if (preg_match(_EXTRAIRE_LIEN, $ref)) {
@@ -127,19 +127,19 @@  discard block
 block discarded – undo
127 127
 		$lien_court = charger_fonction('lien_court', 'inc');
128 128
 		$texte = $lien_court($texte);
129 129
 		if ($echappe_typo) {
130
-			$texte = '<html>' . quote_amp($texte) . '</html>';
130
+			$texte = '<html>'.quote_amp($texte).'</html>';
131 131
 		}
132 132
 	}
133 133
 
134 134
 	// petites corrections d'URL
135 135
 	if (preg_match('/^www\.[^@]+$/S', $lien)) {
136
-		$lien = 'http://' . $lien;
136
+		$lien = 'http://'.$lien;
137 137
 	} else {
138 138
 		if (strpos($lien, '@') && email_valide($lien)) {
139 139
 			if (!$texte) {
140 140
 				$texte = $lien;
141 141
 			}
142
-			$lien = 'mailto:' . $lien;
142
+			$lien = 'mailto:'.$lien;
143 143
 		}
144 144
 	}
145 145
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 }
156 156
 
157 157
 function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, string $connect = '') {
158
-	if (function_exists($f = 'glossaire_' . $ancre)) {
158
+	if (function_exists($f = 'glossaire_'.$ancre)) {
159 159
 		$url = $f($texte, $id);
160 160
 	} else {
161 161
 		$url = glossaire_std($texte);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		return false;
189 189
 	}
190 190
 
191
-	[$type, , $id, , $args, , $ancre] = array_pad($match, 7, null);
191
+	[$type,, $id,, $args,, $ancre] = array_pad($match, 7, null);
192 192
 
193 193
 	# attention dans le cas des sites le lien doit pointer non pas sur
194 194
 	# la page locale du site, mais directement sur le site lui-meme
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	}
225 225
 
226 226
 	if (!@$r['titre']) {
227
-		$r['titre'] = _T($type) . " $id";
227
+		$r['titre'] = _T($type)." $id";
228 228
 	}
229 229
 
230 230
 	if ($pour == 'titre') {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 		and $mime = sql_getfetsel(
240 240
 			'mime_type',
241 241
 			'spip_types_documents',
242
-			'extension IN (' . sql_get_select('extension', 'spip_documents', 'id_document=' . sql_quote($id)) . ')',
242
+			'extension IN ('.sql_get_select('extension', 'spip_documents', 'id_document='.sql_quote($id)).')',
243 243
 			'',
244 244
 			'',
245 245
 			'',
Please login to merge, or discard this patch.
ecrire/inc/filtres_selecteur_generique.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 		$type = reset($objets);
162 162
 		$type = objet_type($type);
163 163
 		$id = intval($ref);
164
-		$ref = $type . $ref;
164
+		$ref = $type.$ref;
165 165
 	}
166 166
 	else {
167 167
 		// Si la référence ne correspond à rien, c'est fini
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 			return json_export(false);
170 170
 		}
171 171
 		// Sinon on récupère les infos utiles
172
-		[$type, , $id, , , , ] = array_pad($match, 7, null);
172
+		[$type,, $id,,,,] = array_pad($match, 7, null);
173 173
 
174 174
 		// On regarde si le type trouvé fait partie des objets sélectionnables
175 175
 		if (!in_array(table_objet($type), $objets)) {
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
 		$types = (is_array($types) ? array_filter($types) : []);
216 216
 
217 217
 		// recuperer tous les freres et soeurs de la rubrique visee
218
-		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
219
-		$fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . intval($id_parent));
218
+		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
219
+		$fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent='.intval($id_parent));
220 220
 		$fratrie = array_column($fratrie, 'id_rubrique');
221 221
 		$has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie));
222 222
 		$has = array_column($has, 'id_parent');
Please login to merge, or discard this patch.