Completed
Push — master ( b5065b...b2f238 )
by cam
01:06
created
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/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/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.
ecrire/inc/filtres_mini.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	if ($query) {
48
-		$url .= '?' . $query;
48
+		$url .= '?'.$query;
49 49
 	}
50 50
 
51
-	return '/' . preg_replace(',^/,S', '', $url);
51
+	return '/'.preg_replace(',^/,S', '', $url);
52 52
 }
53 53
 
54 54
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	if (preg_match(';^((?:[a-z]{3,33}:)?//.*?)(/.*)?$;iS', $lien, $r)) {
76 76
 		$r = array_pad($r, 3, null);
77 77
 
78
-		return $r[1] . resolve_path($r[2]);
78
+		return $r[1].resolve_path($r[2]);
79 79
 	}
80 80
 
81 81
 	# L'url site spip est un lien absolu aussi
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
 	}
97 97
 	switch (substr($lien, 0, 1)) {
98 98
 		case '/':
99
-			return $debut . resolve_path($lien);
99
+			return $debut.resolve_path($lien);
100 100
 		case '#':
101
-			return $debut . resolve_path($dir . $mot . $get . $lien);
101
+			return $debut.resolve_path($dir.$mot.$get.$lien);
102 102
 		case '':
103
-			return $debut . resolve_path($dir . $mot . $get . $hash);
103
+			return $debut.resolve_path($dir.$mot.$get.$hash);
104 104
 		default:
105
-			return $debut . resolve_path($dir . $lien);
105
+			return $debut.resolve_path($dir.$lien);
106 106
 	}
107 107
 }
108 108
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		return '';
131 131
 	}
132 132
 	if (!$base) {
133
-		$base = url_de_base() . (_DIR_RACINE ? _DIR_RESTREINT_ABS : '');
133
+		$base = url_de_base().(_DIR_RACINE ? _DIR_RESTREINT_ABS : '');
134 134
 	}
135 135
 
136 136
 	return suivre_lien($base, $url);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
  * @param array $protocoles_autorises
154 154
  * @return bool
155 155
  */
156
-function protocole_verifier($url_absolue, $protocoles_autorises = ['http','https']) {
156
+function protocole_verifier($url_absolue, $protocoles_autorises = ['http', 'https']) {
157 157
 
158 158
 	if (preg_match(';^([a-z]{3,7})://;i', $url_absolue, $m)) {
159 159
 		$protocole = $m[1];
Please login to merge, or discard this patch.
ecrire/inc/presentation_mini.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$rejouer = (_SESSION_REJOUER === true) ? rejouer_session() : _SESSION_REJOUER;
189 189
 	}
190 190
 
191
-	return $rejouer . (defined('_TESTER_NOSCRIPT') ? _TESTER_NOSCRIPT : '');
191
+	return $rejouer.(defined('_TESTER_NOSCRIPT') ? _TESTER_NOSCRIPT : '');
192 192
 }
193 193
 
194 194
 /**
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
 	//
235 235
 	if ($vcs = version_vcs_courante(_DIR_RACINE, true)) {
236 236
 		if ($vcs['vcs'] === 'GIT') {
237
-			$url = 'https://git.spip.net/spip/spip/commit/' . $vcs['commit'];
237
+			$url = 'https://git.spip.net/spip/spip/commit/'.$vcs['commit'];
238 238
 		} elseif ($vcs['vcs'] === 'SVN') {
239
-			$url = 'https://core.spip.net/projects/spip/repository/revisions/' . $vcs['commit'];
239
+			$url = 'https://core.spip.net/projects/spip/repository/revisions/'.$vcs['commit'];
240 240
 		} else {
241 241
 			$url = '';
242 242
 		}
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
 			$commit = "<a href=\"$url\" target=\"_blank\" rel=\"noopener noreferrer\">$commit</a>";
247 247
 		}
248 248
 		if ($vcs['branch']) {
249
-			$commit = $vcs['branch'] . ': ' . $commit;
249
+			$commit = $vcs['branch'].': '.$commit;
250 250
 		}
251 251
 		$version .= " {$vcs['vcs']} [$commit]";
252 252
 	}
253 253
 
254 254
 	// et la version de l'ecran de securite
255 255
 	$secu = defined('_ECRAN_SECURITE')
256
-		? '<br />' . _T('ecran_securite', ['version' => _ECRAN_SECURITE])
256
+		? '<br />'._T('ecran_securite', ['version' => _ECRAN_SECURITE])
257 257
 		: '';
258 258
 
259 259
 	return _T(
@@ -261,10 +261,10 @@  discard block
 block discarded – undo
261 261
 		[
262 262
 			'spip' => "<b>SPIP $version</b> ",
263 263
 			'lien_gpl' =>
264
-				"<a href='" . generer_url_ecrire(
264
+				"<a href='".generer_url_ecrire(
265 265
 					'aide',
266
-					'aide=licence&var_lang=' . $GLOBALS['spip_lang']
267
-				) . "' class=\"aide popin\">" . _T('info_copyright_gpl') . '</a>'
266
+					'aide=licence&var_lang='.$GLOBALS['spip_lang']
267
+				)."' class=\"aide popin\">"._T('info_copyright_gpl').'</a>'
268 268
 		]
269 269
 	)
270 270
 	. $secu;
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
 		$onfocus = '';
292 292
 	}
293 293
 
294
-	$form = '<input type="text" size="10" value="' . $recherche_aff . '" name="recherche" class="recherche" accesskey="r"' . $onfocus . ' />';
295
-	$form .= "<input type='image' src='" . chemin_image('rechercher-20.png') . "' name='submit' class='submit' alt='" . _T('info_rechercher') . "' />";
294
+	$form = '<input type="text" size="10" value="'.$recherche_aff.'" name="recherche" class="recherche" accesskey="r"'.$onfocus.' />';
295
+	$form .= "<input type='image' src='".chemin_image('rechercher-20.png')."' name='submit' class='submit' alt='"._T('info_rechercher')."' />";
296 296
 
297
-	return "<div class='spip_recherche'>" . generer_form_ecrire($page, $form . $complement, " method='get'") . '</div>';
297
+	return "<div class='spip_recherche'>".generer_form_ecrire($page, $form.$complement, " method='get'").'</div>';
298 298
 }
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
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 			&& autoriser('onglet', "_$id")
103 103
 		) {
104 104
 			$onglets[$id] = new Bouton(
105
-				isset($infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
106
-				$infos['titre'],  // titre
105
+				isset($infos['icone']) ? find_in_theme($infos['icone']) : '', // icone
106
+				$infos['titre'], // titre
107 107
 				(isset($infos['action']) and $infos['action'])
108 108
 					? generer_url_ecrire(
109 109
 						$infos['action'],
@@ -142,5 +142,5 @@  discard block
 block discarded – undo
142 142
 		$res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
143 143
 	}
144 144
 
145
-	return !$res ? '' : (debut_onglet($class) . $res . fin_onglet());
145
+	return !$res ? '' : (debut_onglet($class).$res.fin_onglet());
146 146
 }
Please login to merge, or discard this patch.
ecrire/inc/pipelines.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		}
66 66
 	}
67 67
 
68
-	$texte = $x . $texte;
68
+	$texte = $x.$texte;
69 69
 
70 70
 	return $texte;
71 71
 }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	|| ($pos = 0);
180 180
 
181 181
 	if (false === strpos(substr($texte, 0, $pos), '<!-- insert_head -->')) {
182
-		$insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n";
182
+		$insert = "\n".pipeline('insert_head', '<!-- f_insert_head -->')."\n";
183 183
 		$texte = substr_replace($texte, $insert, $pos, 0);
184 184
 	}
185 185
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 		}
212 212
 		$texte = substr_replace($texte, $x, $pos, 0);
213 213
 		// pas de preview en fenetre enfant
214
-		$x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='" . addslashes($GLOBALS['meta']['adresse_site']) . "';}</script>";
214
+		$x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='".addslashes($GLOBALS['meta']['adresse_site'])."';}</script>";
215 215
 		if (!$pos = stripos($texte, '<head') or !$pos = strpos($texte, '>', $pos)) {
216 216
 			$pos = -1;
217 217
 		}
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
 	// inserer avant le </body> fermant si on peut, a la fin de la page sinon
284 284
 	if (($p = strpos($texte, '</body>')) !== false) {
285
-		$texte = substr($texte, 0, $p) . $code . substr($texte, $p);
285
+		$texte = substr($texte, 0, $p).$code.substr($texte, $p);
286 286
 	} else {
287 287
 		$texte .= $code;
288 288
 	}
Please login to merge, or discard this patch.
ecrire/inc/recherche_to_array.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		$_id_table = reset($_id_table);
68 68
 	}
69 69
 
70
-	$requete['SELECT'][] = 't.' . $_id_table;
70
+	$requete['SELECT'][] = 't.'.$_id_table;
71 71
 	$a = [];
72 72
 	// Recherche fulltext
73 73
 	foreach ($champs as $champ => $poids) {
@@ -78,13 +78,13 @@  discard block
 block discarded – undo
78 78
 				$champ = "t.$champ";
79 79
 			}
80 80
 			$requete['SELECT'][] = $champ;
81
-			$a[] = $champ . ' ' . $methode . ' ' . $q;
81
+			$a[] = $champ.' '.$methode.' '.$q;
82 82
 		}
83 83
 	}
84 84
 	if ($a) {
85 85
 		$requete['WHERE'][] = join(' OR ', $a);
86 86
 	}
87
-	$requete['FROM'][] = table_objet_sql($table) . ' AS t';
87
+	$requete['FROM'][] = table_objet_sql($table).' AS t';
88 88
 
89 89
 	$results = [];
90 90
 
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
 					);
253 253
 				} // cas table de liaison generique spip_xxx_yyy
254 254
 				elseif (
255
-					$t = $trouver_table($table_arrivee . '_' . $table_depart, $serveur)
256
-					or $t = $trouver_table($table_depart . '_' . $table_arrivee, $serveur)
255
+					$t = $trouver_table($table_arrivee.'_'.$table_depart, $serveur)
256
+					or $t = $trouver_table($table_depart.'_'.$table_arrivee, $serveur)
257 257
 				) {
258 258
 					$s = sql_select(
259 259
 						"$cle_depart,$cle_arrivee",
@@ -292,12 +292,12 @@  discard block
 block discarded – undo
292 292
 				}
293 293
 				if (isset($joint['champs']) and $joint['champs']) {
294 294
 					foreach ($joint['champs'] as $c => $val) {
295
-						$results[$id]['champs'][$table_liee . '.' . $c] = $val;
295
+						$results[$id]['champs'][$table_liee.'.'.$c] = $val;
296 296
 					}
297 297
 				}
298 298
 				if (isset($joint['matches']) and $joint['matches']) {
299 299
 					foreach ($joint['matches'] as $c => $val) {
300
-						$results[$id]['matches'][$table_liee . '.' . $c] = $val;
300
+						$results[$id]['matches'][$table_liee.'.'.$c] = $val;
301 301
 					}
302 302
 				}
303 303
 			}
Please login to merge, or discard this patch.
ecrire/inc/icone_renommer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
 
48 48
 	$dir = 'images/';
49 49
 	$f = "$type-$size.png";
50
-	if ($icone = find_in_theme($dir . $f)) {
50
+	if ($icone = find_in_theme($dir.$f)) {
51 51
 		$dir = dirname($icone);
52 52
 		$fond = $icone;
53 53
 
54 54
 		if (
55 55
 			$rtl
56
-			and $fr = $dir . '/' . str_replace("$type-", "$type-rtl-", basename($icone))
56
+			and $fr = $dir.'/'.str_replace("$type-", "$type-rtl-", basename($icone))
57 57
 			and file_exists($fr)
58 58
 		) {
59 59
 			$fond = $fr;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		}
70 70
 
71 71
 		$fonction = '';
72
-		if (in_array($action, ['add','del', 'new', 'edit', 'config'])) {
72
+		if (in_array($action, ['add', 'del', 'new', 'edit', 'config'])) {
73 73
 			$fonction = $action;
74 74
 		}
75 75
 
Please login to merge, or discard this patch.