Completed
Push — master ( ffbbca...ad9227 )
by cam
01:32
created
ecrire/inc/svg.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 	if (!file_exists($fichier)) {
58 58
 		include_spip('inc/filtres');
59
-		$fichier  = supprimer_timestamp($fichier);
59
+		$fichier = supprimer_timestamp($fichier);
60 60
 		if (!file_exists($fichier)) {
61 61
 			return false;
62 62
 		}
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 function svg_change_balise_svg($svg, $old_balise_svg, $attributs) {
147 147
 	$new_balise_svg = '<svg';
148 148
 	foreach ($attributs as $k => $v) {
149
-		$new_balise_svg .= " $k=\"" . entites_html($v) . '"';
149
+		$new_balise_svg .= " $k=\"".entites_html($v).'"';
150 150
 	}
151 151
 	$new_balise_svg .= '>';
152 152
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 function svg_insert_shapes($svg, $shapes, $start = true) {
165 165
 
166 166
 	if ($start === false || $start === 'end') {
167
-		$svg = str_replace('</svg>', $shapes . '</svg>', $svg);
167
+		$svg = str_replace('</svg>', $shapes.'</svg>', $svg);
168 168
 	}
169 169
 	else {
170 170
 		$p = stripos($svg, '<svg');
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
  */
186 186
 function svg_clip_in_box($svg, $x, $y, $width, $height) {
187 187
 	$rect = "<rect x=\"$x\" y=\"$y\" width=\"$width\" height=\"$height\" />";
188
-	$id = 'clip-' . substr(md5($rect . strlen($svg)), 0, 8);
188
+	$id = 'clip-'.substr(md5($rect.strlen($svg)), 0, 8);
189 189
 	$clippath = "<clipPath id=\"$id\">$rect</clipPath>";
190 190
 	$g = "<g clip-path=\"url(#$id)\">";
191
-	$svg = svg_insert_shapes($svg, $clippath . $g);
191
+	$svg = svg_insert_shapes($svg, $clippath.$g);
192 192
 	return svg_insert_shapes($svg, '</g>', false);
193 193
 }
194 194
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	) {
207 207
 		[$balise_svg, $attributs] = $svg_infos;
208 208
 		if (!isset($attributs['viewBox'])) {
209
-			$attributs['viewBox'] = '0 0 ' . $attributs['width'] . ' ' . $attributs['height'];
209
+			$attributs['viewBox'] = '0 0 '.$attributs['width'].' '.$attributs['height'];
210 210
 		}
211 211
 		$attributs['width'] = (string) $new_width;
212 212
 		$attributs['height'] = (string) $new_height;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	else {
230 230
 		$couleur = couleur_html_to_hex($couleur);
231 231
 	}
232
-	return '#' . ltrim($couleur, '#');
232
+	return '#'.ltrim($couleur, '#');
233 233
 }
234 234
 
235 235
 /**
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 function svg_couleur_to_rgb($couleur) {
241 241
 	if (str_starts_with($couleur, 'rgb(')) {
242 242
 		$c = explode(',', substr($couleur, 4));
243
-		return ['red' => (int) $c[0],'green' => (int) $c[1],'blue' => (int) $c[2]];
243
+		return ['red' => (int) $c[0], 'green' => (int) $c[1], 'blue' => (int) $c[2]];
244 244
 	}
245 245
 	return _couleur_hex_to_dec($couleur);
246 246
 }
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 			$background_color = svg_couleur_to_hexa($background_color);
455 455
 			if (isset($attributs['viewBox'])) {
456 456
 				$viewBox = explode(' ', $attributs['viewBox']);
457
-				$rect = '<rect x="' . $viewBox[0] . '" y="' . $viewBox[1] . '" width="' . $viewBox[2] . '" height="' . $viewBox[3] . "\" fill=\"$background_color\"/>";
457
+				$rect = '<rect x="'.$viewBox[0].'" y="'.$viewBox[1].'" width="'.$viewBox[2].'" height="'.$viewBox[3]."\" fill=\"$background_color\"/>";
458 458
 			}
459 459
 			else {
460 460
 				$rect = "<rect width=\"100%\" height=\"100%\" fill=\"$background_color\"/>";
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 			$background_color = svg_couleur_to_hexa($background_color);
485 485
 			if (isset($attributs['viewBox'])) {
486 486
 				$viewBox = explode(' ', $attributs['viewBox']);
487
-				$rect = '<rect x="' . $viewBox[0] . '" y="' . $viewBox[1] . '" width="' . $viewBox[2] . '" height="' . $viewBox[3] . "\" fill=\"$background_color\" opacity=\"$opacity\"/>";
487
+				$rect = '<rect x="'.$viewBox[0].'" y="'.$viewBox[1].'" width="'.$viewBox[2].'" height="'.$viewBox[3]."\" fill=\"$background_color\" opacity=\"$opacity\"/>";
488 488
 			}
489 489
 			else {
490 490
 				$rect = "<rect width=\"100%\" height=\"100%\" fill=\"$background_color\"/>";
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 			$g = '<g';
514 514
 			foreach ($attributs as $k => $v) {
515 515
 				if (strlen($v)) {
516
-					$g .= " $k=\"" . attribut_html($v) . '"';
516
+					$g .= " $k=\"".attribut_html($v).'"';
517 517
 				}
518 518
 			}
519 519
 			if (strlen($g) > 2) {
@@ -541,10 +541,10 @@  discard block
 block discarded – undo
541 541
 	) {
542 542
 		if ($filter_def) {
543 543
 			[$balise_svg, ] = $svg_infos;
544
-			$filter_id = 'filter-' . substr(md5($filter_def . strlen($svg)), 0, 8);
544
+			$filter_id = 'filter-'.substr(md5($filter_def.strlen($svg)), 0, 8);
545 545
 			$filter = "<defs><filter id=\"$filter_id\">$filter_def</filter></defs>";
546 546
 			$g = "<g filter=\"url(#$filter_id)\">";
547
-			$svg = svg_insert_shapes($svg, $filter . $g);
547
+			$svg = svg_insert_shapes($svg, $filter.$g);
548 548
 			$svg = svg_insert_shapes($svg, '</g>', false);
549 549
 		}
550 550
 		return $svg;
Please login to merge, or discard this patch.
ecrire/inc/distant.php 1 patch
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	define('_INC_DISTANT_CONTENT_ENCODING', 'gzip');
28 28
 }
29 29
 if (!defined('_INC_DISTANT_USER_AGENT')) {
30
-	define('_INC_DISTANT_USER_AGENT', 'SPIP-' . $GLOBALS['spip_version_affichee'] . ' (' . $GLOBALS['home_server'] . ')');
30
+	define('_INC_DISTANT_USER_AGENT', 'SPIP-'.$GLOBALS['spip_version_affichee'].' ('.$GLOBALS['home_server'].')');
31 31
 }
32 32
 if (!defined('_INC_DISTANT_MAX_SIZE')) {
33 33
 	define('_INC_DISTANT_MAX_SIZE', 2_097_152);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	define('_INC_DISTANT_CONNECT_TIMEOUT', 10);
37 37
 }
38 38
 
39
-define('_REGEXP_COPIE_LOCALE', ',' 	.
39
+define('_REGEXP_COPIE_LOCALE', ','.
40 40
 	preg_replace(
41 41
 		'@^https?:@',
42 42
 		'https?:',
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 	// si c'est la protection de soi-meme, retourner le path
75 75
 	if ($mode !== 'force' && preg_match(_REGEXP_COPIE_LOCALE, $source, $match)) {
76
-		$source = substr((string) _DIR_IMG, strlen((string) _DIR_RACINE)) . urldecode($match[1]);
76
+		$source = substr((string) _DIR_IMG, strlen((string) _DIR_RACINE)).urldecode($match[1]);
77 77
 
78 78
 		return @file_exists($source) ? $source : false;
79 79
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		return false;
94 94
 	}
95 95
 
96
-	$localrac = _DIR_RACINE . $local;
96
+	$localrac = _DIR_RACINE.$local;
97 97
 	$t = ($mode === 'force') ? false : @file_exists($localrac);
98 98
 
99 99
 	// test d'existence du fichier
@@ -113,17 +113,17 @@  discard block
 block discarded – undo
113 113
 		if (!$taille_max) {
114 114
 			$taille_max = _COPIE_LOCALE_MAX_SIZE;
115 115
 		}
116
-		$localrac_tmp = $localrac . '.tmp';
116
+		$localrac_tmp = $localrac.'.tmp';
117 117
 		$res = recuperer_url(
118 118
 			$source,
119 119
 			['file' => $localrac_tmp, 'taille_max' => $taille_max, 'if_modified_since' => $t ? filemtime($localrac) : '']
120 120
 		);
121 121
 
122 122
 		if (!$res || !$res['length'] && $res['status'] != 304) {
123
-			spip_log("copie_locale : Echec recuperation $source sur $localrac_tmp status : " . ($res ? $res['status'] : '-'), 'distant' . _LOG_INFO_IMPORTANTE);
123
+			spip_log("copie_locale : Echec recuperation $source sur $localrac_tmp status : ".($res ? $res['status'] : '-'), 'distant'._LOG_INFO_IMPORTANTE);
124 124
 			@unlink($localrac_tmp);
125 125
 		} else {
126
-			spip_log("copie_locale : recuperation $source sur $localrac_tmp OK | taille " . $res['length'] . ' status ' . $res['status'], 'distant');
126
+			spip_log("copie_locale : recuperation $source sur $localrac_tmp OK | taille ".$res['length'].' status '.$res['status'], 'distant');
127 127
 		}
128 128
 		if (!$res || !$res['length']) {
129 129
 			// si $t c'est sans doute juste un not-modified-since
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 			&& is_callable($callback_valider_url)
137 137
 			&& !$callback_valider_url($res['url'])
138 138
 		) {
139
-			spip_log('copie_locale : url finale ' . $res['url'] . " non valide, on refuse le fichier $localrac_tmp", 'distant' . _LOG_INFO_IMPORTANTE);
139
+			spip_log('copie_locale : url finale '.$res['url']." non valide, on refuse le fichier $localrac_tmp", 'distant'._LOG_INFO_IMPORTANTE);
140 140
 			@unlink($localrac_tmp);
141 141
 			return $t ? $local : false;
142 142
 		}
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
 	if (!$is_known_host) {
228 228
 		$host = trim($parsed_url['host'], '.');
229
-		if (! $ip = filter_var($host, FILTER_VALIDATE_IP)) {
229
+		if (!$ip = filter_var($host, FILTER_VALIDATE_IP)) {
230 230
 			$ip = gethostbyname($host);
231 231
 			if ($ip === $host) {
232 232
 				// Error condition for gethostbyname()
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 				$ip = false;
247 247
 			}
248 248
 		}
249
-		if ($ip && ! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
249
+		if ($ip && !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
250 250
 			return false;
251 251
 		}
252 252
 	}
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 				}
328 328
 			}
329 329
 			if ($taille > 500) {
330
-				$boundary = substr(md5(random_int(0, mt_getrandmax()) . 'spip'), 0, 8);
330
+				$boundary = substr(md5(random_int(0, mt_getrandmax()).'spip'), 0, 8);
331 331
 			}
332 332
 		}
333 333
 
@@ -360,10 +360,10 @@  discard block
 block discarded – undo
360 360
 				foreach ($donnees as $cle => $valeur) {
361 361
 					if (is_array($valeur)) {
362 362
 						foreach ($valeur as $val2) {
363
-							$chaines[] = rawurlencode($cle) . '[]=' . rawurlencode((string) $val2);
363
+							$chaines[] = rawurlencode($cle).'[]='.rawurlencode((string) $val2);
364 364
 						}
365 365
 					} else {
366
-						$chaines[] = rawurlencode($cle) . '=' . rawurlencode((string) $valeur);
366
+						$chaines[] = rawurlencode($cle).'='.rawurlencode((string) $valeur);
367 367
 					}
368 368
 				}
369 369
 				$chaine = implode('&', $chaines);
@@ -466,13 +466,13 @@  discard block
 block discarded – undo
466 466
 		$options['taille_max'] = $copy ? _COPIE_LOCALE_MAX_SIZE : _INC_DISTANT_MAX_SIZE;
467 467
 	}
468 468
 
469
-	spip_log('recuperer_url ' . $options['methode'] . " sur $url", 'distant' . _LOG_DEBUG);
469
+	spip_log('recuperer_url '.$options['methode']." sur $url", 'distant'._LOG_DEBUG);
470 470
 
471 471
 	// Ajout des en-têtes spécifiques si besoin
472 472
 	$formatted_data = '';
473 473
 	if (!empty($options['headers'])) {
474 474
 		foreach ($options['headers'] as $champ => $valeur) {
475
-			$formatted_data .= $champ . ': ' . $valeur . "\r\n";
475
+			$formatted_data .= $champ.': '.$valeur."\r\n";
476 476
 		}
477 477
 	}
478 478
 
@@ -480,9 +480,9 @@  discard block
 block discarded – undo
480 480
 		[$head, $postdata] = prepare_donnees_post($options['datas'], $options['boundary']);
481 481
 		$head .= $formatted_data;
482 482
 		if (stripos($head, 'Content-Length:') === false) {
483
-			$head .= 'Content-Length: ' . strlen((string) $postdata) . "\r\n";
483
+			$head .= 'Content-Length: '.strlen((string) $postdata)."\r\n";
484 484
 		}
485
-		$formatted_data = $head . "\r\n" . $postdata;
485
+		$formatted_data = $head."\r\n".$postdata;
486 486
 		if (
487 487
 			strlen((string) $postdata) && !$methode_demandee
488 488
 		) {
@@ -495,9 +495,9 @@  discard block
 block discarded – undo
495 495
 	// Accepter les URLs au format feed:// ou qui ont oublie le http:// ou les urls relatives au protocole
496 496
 	$url = preg_replace(',^feed://,i', 'http://', $url);
497 497
 	if (!tester_url_absolue($url)) {
498
-		$url = 'http://' . $url;
498
+		$url = 'http://'.$url;
499 499
 	} elseif (str_starts_with($url, '//')) {
500
-		$url = 'http:' . $url;
500
+		$url = 'http:'.$url;
501 501
 	}
502 502
 
503 503
 	$url = url_to_ascii($url);
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 		$options['if_modified_since']
527 527
 	);
528 528
 	if (!$handle) {
529
-		spip_log("ECHEC init_http $url", 'distant' . _LOG_ERREUR);
529
+		spip_log("ECHEC init_http $url", 'distant'._LOG_ERREUR);
530 530
 
531 531
 		return false;
532 532
 	}
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 					'status' => 200,
557 557
 				];
558 558
 			} else {
559
-				spip_log("ECHEC chinoiserie $url", 'distant' . _LOG_ERREUR);
559
+				spip_log("ECHEC chinoiserie $url", 'distant'._LOG_ERREUR);
560 560
 				return false;
561 561
 			}
562 562
 		} elseif ($res['location'] && $options['follow_location']) {
@@ -573,11 +573,11 @@  discard block
 block discarded – undo
573 573
 				$options['methode'] = 'GET';
574 574
 				$options['datas'] = '';
575 575
 			}
576
-			spip_log('recuperer_url recommence ' . $options['methode'] . " sur $url", 'distant' . _LOG_DEBUG);
576
+			spip_log('recuperer_url recommence '.$options['methode']." sur $url", 'distant'._LOG_DEBUG);
577 577
 
578 578
 			return recuperer_url($url, $options);
579 579
 		} elseif ($res['status'] !== 200) {
580
-			spip_log('HTTP status ' . $res['status'] . " pour $url", 'distant');
580
+			spip_log('HTTP status '.$res['status']." pour $url", 'distant');
581 581
 		}
582 582
 		$result['status'] = $res['status'];
583 583
 		if (isset($res['headers'])) {
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 
597 597
 	// on ne veut que les entetes
598 598
 	if (!$options['taille_max'] || $options['methode'] == 'HEAD' || $result['status'] == '304') {
599
-		spip_log('RESULTAT recuperer_url ' . $options['methode'] . " sur $url : " . json_encode($result, JSON_THROW_ON_ERROR), 'distant' . _LOG_DEBUG);
599
+		spip_log('RESULTAT recuperer_url '.$options['methode']." sur $url : ".json_encode($result, JSON_THROW_ON_ERROR), 'distant'._LOG_DEBUG);
600 600
 		return $result;
601 601
 	}
602 602
 
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 
607 607
 	$gz = false;
608 608
 	if (preg_match(",\bContent-Encoding: .*gzip,is", (string) $result['headers'])) {
609
-		$gz = (_DIR_TMP . md5(uniqid(random_int(0, mt_getrandmax()))) . '.tmp.gz');
609
+		$gz = (_DIR_TMP.md5(uniqid(random_int(0, mt_getrandmax()))).'.tmp.gz');
610 610
 	}
611 611
 
612 612
 	// si on n'a pas deja récupéré le contenu par une methode detournée
@@ -650,10 +650,10 @@  discard block
 block discarded – undo
650 650
 		$trace = json_decode(json_encode($result, JSON_THROW_ON_ERROR), true, 512, JSON_THROW_ON_ERROR);
651 651
 	} catch (JsonException $e) {
652 652
 		$trace = [];
653
-		spip_log('Failed to parse Json data : ' . $e->getMessage(), _LOG_ERREUR);
653
+		spip_log('Failed to parse Json data : '.$e->getMessage(), _LOG_ERREUR);
654 654
 	}
655 655
 	$trace['page'] = '...';
656
-	spip_log('RESULTAT recuperer_url ' . $options['methode'] . " sur $url : " . json_encode($trace, JSON_THROW_ON_ERROR), 'distant' . _LOG_DEBUG);
656
+	spip_log('RESULTAT recuperer_url '.$options['methode']." sur $url : ".json_encode($trace, JSON_THROW_ON_ERROR), 'distant'._LOG_DEBUG);
657 657
 
658 658
 	return $result;
659 659
 }
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
 	$sig['url'] = $url;
708 708
 
709 709
 	$dir = sous_repertoire(_DIR_CACHE, 'curl');
710
-	$cache = md5(serialize($sig)) . '-' . substr(preg_replace(',\W+,', '_', $url), 0, 80);
710
+	$cache = md5(serialize($sig)).'-'.substr(preg_replace(',\W+,', '_', $url), 0, 80);
711 711
 	$sub = sous_repertoire($dir, substr($cache, 0, 2));
712 712
 	$cache = "$sub$cache";
713 713
 
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
 	$fp = false;
762 762
 	if ($fichier) {
763 763
 		include_spip('inc/acces');
764
-		$tmpfile = "$fichier." . creer_uniqid() . '.tmp';
764
+		$tmpfile = "$fichier.".creer_uniqid().'.tmp';
765 765
 		$fp = spip_fopen_lock($tmpfile, 'w', LOCK_EX);
766 766
 		if (!$fp && file_exists($fichier)) {
767 767
 			return filesize($fichier);
@@ -850,11 +850,11 @@  discard block
 block discarded – undo
850 850
 	}
851 851
 	$result['status'] = (int) $r[1];
852 852
 	while ($s = trim(fgets($handle, 16384))) {
853
-		$result['headers'][] = $s . "\n";
853
+		$result['headers'][] = $s."\n";
854 854
 		preg_match(',^([^:]*): *(.*)$,i', $s, $r);
855 855
 		[, $d, $v] = $r;
856 856
 		$d = strtolower(trim($d));
857
-		if ( $d === 'location' && $result['status'] >= 300 && $result['status'] < 400) {
857
+		if ($d === 'location' && $result['status'] >= 300 && $result['status'] < 400) {
858 858
 			$result['location'] = $v;
859 859
 		} elseif ($d === 'last-modified') {
860 860
 			$result['last_modified'] = strtotime($v);
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 
903 903
 	// on se place tout le temps comme si on était a la racine
904 904
 	if (_DIR_RACINE) {
905
-		$d = preg_replace(',^' . preg_quote((string) _DIR_RACINE, ',') . ',', '', (string) $d);
905
+		$d = preg_replace(',^'.preg_quote((string) _DIR_RACINE, ',').',', '', (string) $d);
906 906
 	}
907 907
 
908 908
 	$m = md5($source);
@@ -910,18 +910,18 @@  discard block
 block discarded – undo
910 910
 	$filename =
911 911
 		$d
912 912
 		. substr(preg_replace(',[^\w-],', '', basename($source, $extension)), 0, 16)
913
-		. '-' . substr($m, 0, 8)
913
+		. '-'.substr($m, 0, 8)
914 914
 		. ".$extension";
915 915
 
916 916
 	// ancien nommage des fichiers distants : renommer le fichier a la volee si besoin pour eviter de dupliquer les caches
917 917
 	$legacy_filename =
918 918
 		$d
919
-		. substr(preg_replace(',[^\w-],', '', basename($source)) . '-' . $m, 0, 12)
919
+		. substr(preg_replace(',[^\w-],', '', basename($source)).'-'.$m, 0, 12)
920 920
 		. substr($m, 0, 4)
921 921
 		. ".$extension";
922 922
 
923
-	if (file_exists(_DIR_RACINE . $legacy_filename)) {
924
-		@rename(_DIR_RACINE . $legacy_filename, $filename);
923
+	if (file_exists(_DIR_RACINE.$legacy_filename)) {
924
+		@rename(_DIR_RACINE.$legacy_filename, $filename);
925 925
 	}
926 926
 
927 927
 	return $filename;
@@ -946,7 +946,7 @@  discard block
 block discarded – undo
946 946
 	// Si c'est deja local pas de souci
947 947
 	if (!tester_url_absolue($source)) {
948 948
 		if (_DIR_RACINE) {
949
-			$source = preg_replace(',^' . preg_quote((string) _DIR_RACINE, ',') . ',', '', $source);
949
+			$source = preg_replace(',^'.preg_quote((string) _DIR_RACINE, ',').',', '', $source);
950 950
 		}
951 951
 
952 952
 		return $source;
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
 		$ext
965 965
 		&& preg_match(',^\w+$,', $ext)
966 966
 		&& ($f = nom_fichier_copie_locale($source, $ext))
967
-		&& file_exists(_DIR_RACINE . $f)
967
+		&& file_exists(_DIR_RACINE.$f)
968 968
 	) {
969 969
 		return $f;
970 970
 	}
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
 
973 973
 	// Si c'est deja dans la table des documents,
974 974
 	// ramener le nom de sa copie potentielle
975
-	$ext = sql_getfetsel('extension', 'spip_documents', 'fichier=' . sql_quote($source) . " AND distant='oui' AND extension <> ''");
975
+	$ext = sql_getfetsel('extension', 'spip_documents', 'fichier='.sql_quote($source)." AND distant='oui' AND extension <> ''");
976 976
 
977 977
 	if ($ext) {
978 978
 		return nom_fichier_copie_locale($source, $ext);
@@ -983,9 +983,9 @@  discard block
 block discarded – undo
983 983
 
984 984
 	$ext = $path_parts ? $path_parts['extension'] : '';
985 985
 
986
-	if ($ext && sql_getfetsel('extension', 'spip_types_documents', 'extension=' . sql_quote($ext))) {
986
+	if ($ext && sql_getfetsel('extension', 'spip_types_documents', 'extension='.sql_quote($ext))) {
987 987
 		$f = nom_fichier_copie_locale($source, $ext);
988
-		if (file_exists(_DIR_RACINE . $f)) {
988
+		if (file_exists(_DIR_RACINE.$f)) {
989 989
 			return $f;
990 990
 		}
991 991
 	}
@@ -993,7 +993,7 @@  discard block
 block discarded – undo
993 993
 	// Ping  pour voir si son extension est connue et autorisee
994 994
 	// avec mise en cache du resultat du ping
995 995
 
996
-	$cache = sous_repertoire(_DIR_CACHE, 'rid') . md5($source);
996
+	$cache = sous_repertoire(_DIR_CACHE, 'rid').md5($source);
997 997
 	if (
998 998
 		!@file_exists($cache)
999 999
 		|| !($path_parts = @unserialize(spip_file_get_contents($cache)))
@@ -1003,11 +1003,11 @@  discard block
 block discarded – undo
1003 1003
 		ecrire_fichier($cache, serialize($path_parts));
1004 1004
 	}
1005 1005
 	$ext = empty($path_parts['extension']) ? '' : $path_parts['extension'];
1006
-	if ($ext && sql_getfetsel('extension', 'spip_types_documents', 'extension=' . sql_quote($ext))) {
1006
+	if ($ext && sql_getfetsel('extension', 'spip_types_documents', 'extension='.sql_quote($ext))) {
1007 1007
 		return nom_fichier_copie_locale($source, $ext);
1008 1008
 	}
1009 1009
 
1010
-	spip_log("pas de copie locale pour $source", 'distant' . _LOG_ERREUR);
1010
+	spip_log("pas de copie locale pour $source", 'distant'._LOG_ERREUR);
1011 1011
 	return null;
1012 1012
 }
1013 1013
 
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
 		} else {
1110 1110
 			if ($a['body']) {
1111 1111
 				$a['extension'] = corriger_extension($extension);
1112
-				$a['fichier'] = _DIR_RACINE . nom_fichier_copie_locale($source, $extension);
1112
+				$a['fichier'] = _DIR_RACINE.nom_fichier_copie_locale($source, $extension);
1113 1113
 				ecrire_fichier($a['fichier'], $a['body']);
1114 1114
 				$size_image = @spip_getimagesize($a['fichier']);
1115 1115
 				$a['largeur'] = (int) $size_image[0];
@@ -1181,20 +1181,20 @@  discard block
 block discarded – undo
1181 1181
 	$t = null;
1182 1182
 	if (in_array($mime_type, ['text/plain', '', 'application/octet-stream'])) {
1183 1183
 		if (!$t && preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $source, $rext)) {
1184
-			$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1184
+			$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1185 1185
 		}
1186 1186
 		if (
1187 1187
 			!$t
1188 1188
 			&& preg_match(',^Content-Disposition:\s*attachment;\s*filename=(.*)$,Uims', $headers, $m)
1189 1189
 			&& preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $m[1], $rext)
1190 1190
 		) {
1191
-			$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1191
+			$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1192 1192
 		}
1193 1193
 	}
1194 1194
 
1195 1195
 	// Autre mime/type (ou text/plain avec fichier d'extension inconnue)
1196 1196
 	if (!$t) {
1197
-		$t = sql_fetsel('extension', 'spip_types_documents', 'mime_type=' . sql_quote($mime_type));
1197
+		$t = sql_fetsel('extension', 'spip_types_documents', 'mime_type='.sql_quote($mime_type));
1198 1198
 	}
1199 1199
 
1200 1200
 	// Toujours rien ? (ex: audio/x-ogg au lieu de application/ogg)
@@ -1205,11 +1205,11 @@  discard block
 block discarded – undo
1205 1205
 		&& preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $source, $rext)
1206 1206
 	) {
1207 1207
 		# eviter xxx.3 => 3gp (> SPIP 3)
1208
-		$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1208
+		$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1209 1209
 	}
1210 1210
 
1211 1211
 	if ($t) {
1212
-		spip_log("mime-type $mime_type ok, extension " . $t['extension'], 'distant');
1212
+		spip_log("mime-type $mime_type ok, extension ".$t['extension'], 'distant');
1213 1213
 		return $t['extension'];
1214 1214
 	} else {
1215 1215
 		# par defaut on retombe sur '.bin' si c'est autorise
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
 		}
1313 1313
 	} else {
1314 1314
 		$scheme = $t['scheme'];
1315
-		$noproxy = $scheme . '://';
1315
+		$noproxy = $scheme.'://';
1316 1316
 	}
1317 1317
 	if (isset($t['user'])) {
1318 1318
 		// user et pass doivent être passés en urlencodé dans l'URL, on redecode ici
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
 	}
1328 1328
 
1329 1329
 	if (!empty($t['query'])) {
1330
-		$path .= '?' . $t['query'];
1330
+		$path .= '?'.$t['query'];
1331 1331
 	}
1332 1332
 
1333 1333
 	$f = lance_requete($method, $scheme, $user, $host, $path, $port, $noproxy, $refuse_gz, $referer, $datas, $vers, $date);
@@ -1401,29 +1401,29 @@  discard block
 block discarded – undo
1401 1401
 	$proxy_user = '';
1402 1402
 	$http_proxy = need_proxy($host);
1403 1403
 	if ($user) {
1404
-		$user = urlencode((string) $user[0]) . ':' . urlencode((string) $user[1]);
1404
+		$user = urlencode((string) $user[0]).':'.urlencode((string) $user[1]);
1405 1405
 	}
1406 1406
 
1407 1407
 	$connect = '';
1408 1408
 	if ($http_proxy) {
1409
-		if (!defined('_PROXY_HTTPS_NOT_VIA_CONNECT') && in_array($scheme, ['tls','ssl'])) {
1410
-			$path_host = ($user ? "$user@" : '') . $host . (($port != 80) ? ":$port" : '');
1411
-			$connect = 'CONNECT ' . $path_host . " $vers\r\n"
1409
+		if (!defined('_PROXY_HTTPS_NOT_VIA_CONNECT') && in_array($scheme, ['tls', 'ssl'])) {
1410
+			$path_host = ($user ? "$user@" : '').$host.(($port != 80) ? ":$port" : '');
1411
+			$connect = 'CONNECT '.$path_host." $vers\r\n"
1412 1412
 				. "Host: $path_host\r\n"
1413 1413
 				. "Proxy-Connection: Keep-Alive\r\n";
1414 1414
 		} else {
1415
-			$path = (in_array($scheme, ['tls','ssl']) ? 'https://' : "$scheme://")
1415
+			$path = (in_array($scheme, ['tls', 'ssl']) ? 'https://' : "$scheme://")
1416 1416
 				. ($user ? "$user@" : '')
1417
-				. "$host" . (($port != 80) ? ":$port" : '') . $path;
1417
+				. "$host".(($port != 80) ? ":$port" : '').$path;
1418 1418
 		}
1419 1419
 		$t2 = @parse_url($http_proxy);
1420 1420
 		$first_host = $t2['host'];
1421 1421
 		$first_port = ($t2['port'] ?? null) ?: 80;
1422 1422
 		if ($t2['user'] ?? null) {
1423
-			$proxy_user = base64_encode($t2['user'] . ':' . $t2['pass']);
1423
+			$proxy_user = base64_encode($t2['user'].':'.$t2['pass']);
1424 1424
 		}
1425 1425
 	} else {
1426
-		$first_host = $noproxy . $host;
1426
+		$first_host = $noproxy.$host;
1427 1427
 		$first_port = $port;
1428 1428
 	}
1429 1429
 
@@ -1446,7 +1446,7 @@  discard block
 block discarded – undo
1446 1446
 		);
1447 1447
 		spip_log("Recuperer $path sur $first_host:$first_port par $f (via CONNECT)", 'connect');
1448 1448
 		if (!$f) {
1449
-			spip_log("Erreur connexion $errno $errstr", 'distant' . _LOG_ERREUR);
1449
+			spip_log("Erreur connexion $errno $errstr", 'distant'._LOG_ERREUR);
1450 1450
 			return $errno;
1451 1451
 		}
1452 1452
 		stream_set_timeout($f, _INC_DISTANT_CONNECT_TIMEOUT);
@@ -1459,7 +1459,7 @@  discard block
 block discarded – undo
1459 1459
 			|| ($res = explode(' ', $res)) === []
1460 1460
 			|| $res[1] !== '200'
1461 1461
 		) {
1462
-			spip_log("Echec CONNECT sur $first_host:$first_port", 'connect' . _LOG_INFO_IMPORTANTE);
1462
+			spip_log("Echec CONNECT sur $first_host:$first_port", 'connect'._LOG_INFO_IMPORTANTE);
1463 1463
 			fclose($f);
1464 1464
 
1465 1465
 			return false;
@@ -1476,7 +1476,7 @@  discard block
 block discarded – undo
1476 1476
 		} while (!$f && $ntry-- && $errno !== 110 && sleep(1));
1477 1477
 		spip_log("Recuperer $path sur $first_host:$first_port par $f");
1478 1478
 		if (!$f) {
1479
-			spip_log("Erreur connexion $errno $errstr", 'distant' . _LOG_ERREUR);
1479
+			spip_log("Erreur connexion $errno $errstr", 'distant'._LOG_ERREUR);
1480 1480
 
1481 1481
 			return $errno;
1482 1482
 		}
@@ -1486,16 +1486,16 @@  discard block
 block discarded – undo
1486 1486
 	$site = $GLOBALS['meta']['adresse_site'] ?? '';
1487 1487
 
1488 1488
 	$host_port = $host;
1489
-	if ($port != (in_array($scheme, ['tls','ssl']) ? 443 : 80)) {
1489
+	if ($port != (in_array($scheme, ['tls', 'ssl']) ? 443 : 80)) {
1490 1490
 		$host_port .= ":$port";
1491 1491
 	}
1492 1492
 	$req = "$method $path $vers\r\n"
1493 1493
 		. "Host: $host_port\r\n"
1494
-		. 'User-Agent: ' . _INC_DISTANT_USER_AGENT . "\r\n"
1495
-		. ($refuse_gz ? '' : ('Accept-Encoding: ' . _INC_DISTANT_CONTENT_ENCODING . "\r\n"))
1494
+		. 'User-Agent: '._INC_DISTANT_USER_AGENT."\r\n"
1495
+		. ($refuse_gz ? '' : ('Accept-Encoding: '._INC_DISTANT_CONTENT_ENCODING."\r\n"))
1496 1496
 		. ($site ? "Referer: $site/$referer\r\n" : '')
1497
-		. ($date ? 'If-Modified-Since: ' . (gmdate('D, d M Y H:i:s', $date) . " GMT\r\n") : '')
1498
-		. ($user ? 'Authorization: Basic ' . base64_encode(urldecode($user)) . "\r\n" : '')
1497
+		. ($date ? 'If-Modified-Since: '.(gmdate('D, d M Y H:i:s', $date)." GMT\r\n") : '')
1498
+		. ($user ? 'Authorization: Basic '.base64_encode(urldecode($user))."\r\n" : '')
1499 1499
 		. ($proxy_user ? "Proxy-Authorization: Basic $proxy_user\r\n" : '')
1500 1500
 		. (strpos($vers, '1.1') ? "Keep-Alive: 300\r\nConnection: keep-alive\r\n" : '');
1501 1501
 
Please login to merge, or discard this patch.
ecrire/inc/autoriser.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 // mais apres la fonction autoriser()
120 120
 if ($f = find_in_path('mes_fonctions.php')) {
121 121
 	global $dossier_squelettes;
122
-	include_once(_ROOT_CWD . $f);
122
+	include_once(_ROOT_CWD.$f);
123 123
 }
124 124
 
125 125
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 		$qui = $GLOBALS['visiteur_session'] ?: [];
161 161
 		$qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui);
162 162
 	} elseif (is_numeric($qui)) {
163
-		$qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui);
163
+		$qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$qui);
164 164
 		if (!$qui) {
165 165
 			return false;
166 166
 		}
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
 	}
174 174
 
175 175
 	spip_log(
176
-		"autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?',
177
-		'autoriser' . _LOG_DEBUG
176
+		"autoriser $faire $type $id (".($qui['nom'] ?? '').') ?',
177
+		'autoriser'._LOG_DEBUG
178 178
 	);
179 179
 
180 180
 	$type = autoriser_type($type);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		isset($GLOBALS['autoriser_exception'][$faire][$type][$id])
185 185
 		&& autoriser_exception($faire, $type, $id, 'verifier') || isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) && autoriser_exception($faire, $type, '*', 'verifier')
186 186
 	) {
187
-		spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG);
187
+		spip_log("autoriser ($faire, $type, $id, ".($qui['nom'] ?? '').') : OK Exception', 'autoriser'._LOG_DEBUG);
188 188
 		return true;
189 189
 	}
190 190
 
@@ -193,18 +193,18 @@  discard block
 block discarded – undo
193 193
 	// autoriser_faire[_dist], autoriser_defaut[_dist]
194 194
 	$fonctions = $type
195 195
 		? [
196
-			'autoriser_' . $type . '_' . $faire,
197
-			'autoriser_' . $type . '_' . $faire . '_dist',
198
-			'autoriser_' . $type,
199
-			'autoriser_' . $type . '_dist',
200
-			'autoriser_' . $faire,
201
-			'autoriser_' . $faire . '_dist',
196
+			'autoriser_'.$type.'_'.$faire,
197
+			'autoriser_'.$type.'_'.$faire.'_dist',
198
+			'autoriser_'.$type,
199
+			'autoriser_'.$type.'_dist',
200
+			'autoriser_'.$faire,
201
+			'autoriser_'.$faire.'_dist',
202 202
 			'autoriser_defaut',
203 203
 			'autoriser_defaut_dist'
204 204
 		]
205 205
 		: [
206
-			'autoriser_' . $faire,
207
-			'autoriser_' . $faire . '_dist',
206
+			'autoriser_'.$faire,
207
+			'autoriser_'.$faire.'_dist',
208 208
 			'autoriser_defaut',
209 209
 			'autoriser_defaut_dist'
210 210
 		];
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
 	}
219 219
 
220 220
 	spip_log(
221
-		"$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'),
222
-		'autoriser' . _LOG_DEBUG
221
+		"$f($faire, $type, $id, ".($qui['nom'] ?? '').') : '.($a ? 'OK' : 'niet'),
222
+		'autoriser'._LOG_DEBUG
223 223
 	);
224 224
 
225 225
 	if (!is_bool($a)) {
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 function autoriser_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
386 386
 
387 387
 	// Le visiteur a-t-il un statut prevu par la config ?
388
-	if (str_contains((string) $GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',')) {
388
+	if (str_contains((string) $GLOBALS['meta']['preview'], ','.$qui['statut'].',')) {
389 389
 		return test_previsualiser_objet_champ($type, $id, $qui, $opt);
390 390
 	}
391 391
 
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 				} // pas de champ passe a la demande => NIET
440 440
 				$previsu = explode(',', (string) $c['previsu']);
441 441
 				// regarder si ce statut est autorise pour l'auteur
442
-				if (in_array($opt[$champ] . '/auteur', $previsu)) {
442
+				if (in_array($opt[$champ].'/auteur', $previsu)) {
443 443
 					// retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
444 444
 					// sinon l’auteur en session
445 445
 					include_spip('inc/securiser_action');
@@ -453,12 +453,12 @@  discard block
 block discarded – undo
453 453
 
454 454
 					if (!$id_auteur) {
455 455
 						return false;
456
-					} elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) {
456
+					} elseif (autoriser('previsualiser'.$opt[$champ], $type, 0, $id_auteur)) {
457 457
 						// dans ce cas (admin en general), pas de filtrage sur ce statut
458 458
 					} elseif (
459 459
 						!sql_countsel(
460 460
 							'spip_auteurs_liens',
461
-							'id_auteur=' . (int) $id_auteur . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . (int) $id
461
+							'id_auteur='.(int) $id_auteur.' AND objet='.sql_quote($type).' AND id_objet='.(int) $id
462 462
 						)
463 463
 					) {
464 464
 						return false;
@@ -503,14 +503,14 @@  discard block
 block discarded – undo
503 503
 			// multilinguisme par secteur et objet rattaché à une rubrique
504 504
 			$primary = id_table_objet($type);
505 505
 			$id_rubrique = $table != 'spip_rubriques'
506
-				? sql_getfetsel('id_rubrique', "$table", "$primary=" . (int) $id)
506
+				? sql_getfetsel('id_rubrique', "$table", "$primary=".(int) $id)
507 507
 				: $id;
508
-			$id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique);
508
+			$id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique);
509 509
 			if (!$id_secteur > 0) {
510 510
 				$id_secteur = $id_rubrique;
511 511
 			}
512
-			$langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . (int) $id_secteur);
513
-			$langue_objet = sql_getfetsel('lang', "$table", "$primary=" . (int) $id);
512
+			$langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.(int) $id_secteur);
513
+			$langue_objet = sql_getfetsel('lang', "$table", "$primary=".(int) $id);
514 514
 			if ($langue_secteur != $langue_objet) {
515 515
 				// configuration incohérente, on laisse l'utilisateur corriger la situation
516 516
 				return true;
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 			if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques
519 519
 				return false;
520 520
 			} else {
521
-				$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . (int) $id);
521
+				$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.(int) $id);
522 522
 				if ($id_parent != 0) {
523 523
 					// sous-rubriques : pas de choix de langue
524 524
 					return false;
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 
571 571
 	if (!isset($opt['statut'])) {
572 572
 		if (isset($desc['field']['statut'])) {
573
-			$statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . (int) $id);
573
+			$statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type).'='.(int) $id);
574 574
 		} else {
575 575
 			$statut = 'publie';
576 576
 		} // pas de statut => publie
@@ -735,11 +735,11 @@  discard block
 block discarded – undo
735 735
 		return false;
736 736
 	}
737 737
 
738
-	if (sql_countsel('spip_rubriques', 'id_parent=' . (int) $id)) {
738
+	if (sql_countsel('spip_rubriques', 'id_parent='.(int) $id)) {
739 739
 		return false;
740 740
 	}
741 741
 
742
-	if (sql_countsel('spip_articles', 'id_rubrique=' . (int) $id . " AND (statut<>'poubelle')")) {
742
+	if (sql_countsel('spip_articles', 'id_rubrique='.(int) $id." AND (statut<>'poubelle')")) {
743 743
 		return false;
744 744
 	}
745 745
 
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 	if (!$id) {
777 777
 		return false;
778 778
 	}
779
-	$r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id));
779
+	$r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article='.sql_quote($id));
780 780
 
781 781
 	return $r && (
782 782
 		autoriser('publierdans', 'rubrique', $r['id_rubrique'], $qui, $opt)
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 			(!isset($opt['statut']) || !in_array($opt['statut'], ['publie', 'refuse'], true))
785 785
 			&& in_array($qui['statut'], ['0minirezo', '1comite'])
786 786
 			&& in_array($r['statut'], ['prop', 'prepa', 'poubelle'])
787
-			&& auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])
787
+			&& auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur'])
788 788
 		)
789 789
 	);
790 790
 }
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 		if (!$id) {
843 843
 			return false;
844 844
 		}
845
-		$statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . (int) $id);
845
+		$statut = sql_getfetsel('statut', 'spip_articles', 'id_article='.(int) $id);
846 846
 	}
847 847
 
848 848
 	return
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 		in_array($statut, ['prop', 'publie'])
852 852
 		// sinon si on est auteur, on a le droit de le voir, evidemment !
853 853
 
854
-		|| $id && $qui['id_auteur'] && auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']);
854
+		|| $id && $qui['id_auteur'] && auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']);
855 855
 }
856 856
 
857 857
 
@@ -872,8 +872,8 @@  discard block
 block discarded – undo
872 872
 function autoriser_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
873 873
 	# securite, mais on aurait pas du arriver ici !
874 874
 	if (
875
-		function_exists($f = 'autoriser_' . $type . '_voir')
876
-		|| function_exists($f = 'autoriser_' . $type . '_voir_dist')
875
+		function_exists($f = 'autoriser_'.$type.'_voir')
876
+		|| function_exists($f = 'autoriser_'.$type.'_voir_dist')
877 877
 	) {
878 878
 		return $f($faire, $type, $id, $qui, $opt);
879 879
 	}
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
 	$n = sql_fetsel(
999 999
 		'A.id_article',
1000 1000
 		'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)',
1001
-		"A.statut='publie' AND L.id_auteur=" . sql_quote($id)
1001
+		"A.statut='publie' AND L.id_auteur=".sql_quote($id)
1002 1002
 	);
1003 1003
 
1004 1004
 	return (bool) $n;
@@ -1196,7 +1196,7 @@  discard block
 block discarded – undo
1196 1196
 		&& ($r = sql_allfetsel(
1197 1197
 			'id_objet',
1198 1198
 			'spip_auteurs_liens',
1199
-			'id_auteur=' . (int) $id_auteur . " AND objet='rubrique' AND id_objet!=0"
1199
+			'id_auteur='.(int) $id_auteur." AND objet='rubrique' AND id_objet!=0"
1200 1200
 		))
1201 1201
 		&& (is_countable($r) ? count($r) : 0)
1202 1202
 	) {
@@ -1873,8 +1873,8 @@  discard block
 block discarded – undo
1873 1873
 function auteurs_objet($objet, $id_objet, $cond = '') {
1874 1874
 	$objet = objet_type($objet);
1875 1875
 	$where = [
1876
-		'objet=' . sql_quote($objet),
1877
-		'id_objet=' . (int) $id_objet
1876
+		'objet='.sql_quote($objet),
1877
+		'id_objet='.(int) $id_objet
1878 1878
 	];
1879 1879
 	if (!empty($cond)) {
1880 1880
 		if (is_array($cond)) {
Please login to merge, or discard this patch.
ecrire/tests/Texte/LiensTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 			['id_article', 'lang'],
24 24
 			'spip_articles',
25 25
 			[
26
-				'statut = ' . sql_quote('publie'),
27
-				'lang != ' . sql_quote('')
26
+				'statut = '.sql_quote('publie'),
27
+				'lang != '.sql_quote('')
28 28
 			],
29 29
 			limit: '0,1',
30 30
 		);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		// on se met dans une autre langue que celle de l'article
36 36
 		lang_select($lang === 'eo' ? 'fa' : 'eo');
37 37
 
38
-		$case = '[->' . $id_article . ']';
38
+		$case = '[->'.$id_article.']';
39 39
 		$propre = propre($case);
40 40
 		$this->assertEquals(
41 41
 			$lang,
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 	#[DataProvider('providerLiensClassCss')]
48 48
 	public function testLiensClassCss(string $table, ?string $short, bool $in) {
49
-		$id = sql_getfetsel(id_table_objet($table), $table, "statut='publie'", limit: '0,1');
49
+		$id = sql_getfetsel(id_table_objet($table), $table, "statut='publie'", limit : '0,1');
50 50
 		$type = objet_type($table);
51 51
 		if (!$id) {
52 52
 			$this->markTestSkipped(sprintf('Necessite un·e %s publié', $type));
Please login to merge, or discard this patch.
ecrire/public/assembler.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 	$GLOBALS['contexte'] = calculer_contexte();
35 35
 	$page = ['contexte_implicite' => calculer_contexte_implicite()];
36
-	$page['contexte_implicite']['cache'] = $fond . preg_replace(
36
+	$page['contexte_implicite']['cache'] = $fond.preg_replace(
37 37
 		',\.[a-zA-Z0-9]*$,',
38 38
 		'',
39 39
 		preg_replace('/[?].*$/', '', $GLOBALS['REQUEST_URI'])
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 			if ($page === '') {
134 134
 				$erreur = _T(
135 135
 					'info_erreur_squelette2',
136
-					['fichier' => spip_htmlspecialchars($fond) . '.' . _EXTENSION_SQUELETTES]
136
+					['fichier' => spip_htmlspecialchars($fond).'.'._EXTENSION_SQUELETTES]
137 137
 				);
138 138
 				erreur_squelette($erreur);
139 139
 				// eviter des erreurs strictes ensuite sur $page['cle'] en PHP >= 5.4
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	if (
175 175
 		$lastmodified && !isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && !isset($page['entetes']['Last-Modified'])
176 176
 	) {
177
-		$page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified) . ' GMT';
177
+		$page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified).' GMT';
178 178
 	}
179 179
 
180 180
 	// fermer la connexion apres les headers si requete HEAD
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 		if (!defined('_CONTEXTE_IGNORE_LISTE_VARIABLES')) {
207 207
 			nettoyer_uri_var('');
208 208
 		}
209
-		$preg_ignore_variables = '/(' . implode('|',_CONTEXTE_IGNORE_LISTE_VARIABLES) . ')/';
209
+		$preg_ignore_variables = '/('.implode('|', _CONTEXTE_IGNORE_LISTE_VARIABLES).')/';
210 210
 	}
211 211
 
212 212
 	$contexte = [];
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 		'spip_version_code' => $GLOBALS['spip_version_code'],
248 248
 	];
249 249
 	if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
250
-		$contexte_implicite['host'] .= '|' . $_SERVER['HTTP_X_FORWARDED_HOST'];
250
+		$contexte_implicite['host'] .= '|'.$_SERVER['HTTP_X_FORWARDED_HOST'];
251 251
 	}
252 252
 
253 253
 	return $contexte_implicite;
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 			}
583 583
 		}
584 584
 		if (is_null($id)) {
585
-			$msg = "modeles/$modele : " . _T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]);
585
+			$msg = "modeles/$modele : "._T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]);
586 586
 			erreur_squelette($msg);
587 587
 			// on passe id=0 au routeur pour tomber sur le modele par defaut et eviter une seconde erreur sur un modele inexistant
588 588
 			$id = 0;
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 		}
626 626
 
627 627
 		if (preg_match(',^[a-z0-9_]+$,', $soustype)) {
628
-			if (!trouve_modele($fond = ($type . '_' . $soustype))) {
628
+			if (!trouve_modele($fond = ($type.'_'.$soustype))) {
629 629
 				$fond = '';
630 630
 				$class = $soustype;
631 631
 			}
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 		$compteur--;
641 641
 		return false;
642 642
 	}
643
-	$fond = 'modeles/' . $fond;
643
+	$fond = 'modeles/'.$fond;
644 644
 	// Creer le contexte
645 645
 	$contexte = $env;
646 646
 	// securiser le contexte des modèles : tout ce qui arrive de _request() doit être sanitizé
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
 			if (is_scalar($v)) {
651 651
 				$v = spip_securise_valeur_env_modele($v);
652 652
 			} else {
653
-				array_walk_recursive($v, function (&$value, $index) {
653
+				array_walk_recursive($v, function(&$value, $index) {
654 654
 					$value = spip_securise_valeur_env_modele($value);
655 655
 				});
656 656
 			}
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 	// sinon, s'il y a un lien, on l'ajoute classiquement
696 696
 	if (
697 697
 		strstr(
698
-			' ' . ($classes = extraire_attribut($retour, 'class')) . ' ',
698
+			' '.($classes = extraire_attribut($retour, 'class')).' ',
699 699
 			'spip_lien_ok'
700 700
 		)
701 701
 	) {
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 		);
707 707
 	} else {
708 708
 		if ($lien) {
709
-			$retour = '<a href="' . $lien['href'] . '" class="' . $lien['class'] . '">' . $retour . '</a>';
709
+			$retour = '<a href="'.$lien['href'].'" class="'.$lien['class'].'">'.$retour.'</a>';
710 710
 		}
711 711
 	}
712 712
 
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
 	if (is_numeric($valeur) || is_bool($valeur) || is_null($valeur)) {
732 732
 		return $valeur;
733 733
 	}
734
-	$valeur = (string)$valeur;
734
+	$valeur = (string) $valeur;
735 735
 	if (str_starts_with($valeur, '@') && is_numeric(substr($valeur, 1))) {
736 736
 		return $valeur;
737 737
 	}
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 		return $page;
752 752
 	}
753 753
 	// eval $page et affecte $res
754
-	include _ROOT_RESTREINT . 'public/evaluer_page.php';
754
+	include _ROOT_RESTREINT.'public/evaluer_page.php';
755 755
 
756 756
 	// Lever un drapeau (global) si le fond utilise #SESSION
757 757
 	// a destination de public/parametrer
@@ -819,16 +819,16 @@  discard block
 block discarded – undo
819 819
 			if (($pos = strpos($head, '<head>')) !== false) {
820 820
 				$head = substr_replace($head, $base, $pos + 6, 0);
821 821
 			} elseif (preg_match(',<head[^>]*>,i', $head, $r)) {
822
-				$head = str_replace($r[0], $r[0] . $base, $head);
822
+				$head = str_replace($r[0], $r[0].$base, $head);
823 823
 			}
824
-			$texte = $head . substr($texte, $poshead);
824
+			$texte = $head.substr($texte, $poshead);
825 825
 		}
826 826
 		if ($href_base) {
827 827
 			// gerer les ancres
828 828
 			$base = $_SERVER['REQUEST_URI'];
829 829
 			// pas de guillemets ni < dans l'URL qu'on insere dans le HTML
830 830
 			if (str_contains($base, "'") || str_contains($base, '"') || str_contains($base, '<')) {
831
-				$base = str_replace(["'",'"','<'], ['%27','%22','%3C'], $base);
831
+				$base = str_replace(["'", '"', '<'], ['%27', '%22', '%3C'], $base);
832 832
 			}
833 833
 			if (str_contains($texte, "href='#")) {
834 834
 				$texte = str_replace("href='#", "href='$base#", $texte);
Please login to merge, or discard this patch.
ecrire/inc/flock.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 		$contenu = @gzfile($fichier);
122 122
 	}
123 123
 
124
-	return is_array($contenu) ? implode('', $contenu) : (string)$contenu;
124
+	return is_array($contenu) ? implode('', $contenu) : (string) $contenu;
125 125
 }
126 126
 
127 127
 
@@ -321,9 +321,9 @@  discard block
 block discarded – undo
321 321
  */
322 322
 function ecrire_fichier_securise($fichier, $contenu, $ecrire_quand_meme = false, $truncate = true) {
323 323
 	if (!str_ends_with($fichier, '.php')) {
324
-		spip_log('Erreur de programmation: ' . $fichier . ' doit finir par .php');
324
+		spip_log('Erreur de programmation: '.$fichier.' doit finir par .php');
325 325
 	}
326
-	$contenu = '<' . "?php die ('Acces interdit'); ?" . ">\n" . $contenu;
326
+	$contenu = '<'."?php die ('Acces interdit'); ?".">\n".$contenu;
327 327
 
328 328
 	return ecrire_fichier($fichier, $contenu, $ecrire_quand_meme, $truncate);
329 329
 }
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
  * @return bool
337 337
  */
338 338
 function ecrire_fichier_calcule_si_modifie($fichier, $contenu, $force = false, $use_copy = false) {
339
-	$fichier_tmp = $fichier . '.last';
339
+	$fichier_tmp = $fichier.'.last';
340 340
 	if (!ecrire_fichier($fichier_tmp, $contenu, true)) {
341 341
 		return false;
342 342
 	}
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
  */
377 377
 function lire_fichier_securise($fichier, &$contenu, $options = []) {
378 378
 	if ($res = lire_fichier($fichier, $contenu, $options)) {
379
-		$contenu = substr((string) $contenu, strlen('<?php die (\'Acces interdit\'); ?>' . "\n"));
379
+		$contenu = substr((string) $contenu, strlen('<?php die (\'Acces interdit\'); ?>'."\n"));
380 380
 	}
381 381
 
382 382
 	return $res;
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 				$wait = 0;
547 547
 			}
548 548
 		}
549
-		spip_log('Probleme de configuration opcache.revalidate_freq ' . $duree . 's : on attend ' . $wait . 's', _LOG_INFO_IMPORTANTE);
549
+		spip_log('Probleme de configuration opcache.revalidate_freq '.$duree.'s : on attend '.$wait.'s', _LOG_INFO_IMPORTANTE);
550 550
 		if ($wait) {
551 551
 			sleep($duree + 1);
552 552
 		}
@@ -574,9 +574,9 @@  discard block
 block discarded – undo
574 574
 		if ($item == '.' || $item == '..') {
575 575
 			continue;
576 576
 		}
577
-		if (!supprimer_repertoire($dir . '/' . $item)) {
578
-			@chmod($dir . '/' . $item, 0777);
579
-			if (!supprimer_repertoire($dir . '/' . $item)) {
577
+		if (!supprimer_repertoire($dir.'/'.$item)) {
578
+			@chmod($dir.'/'.$item, 0777);
579
+			if (!supprimer_repertoire($dir.'/'.$item)) {
580 580
 				return false;
581 581
 			}
582 582
 		};
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 	if (!strlen($subdir)) {
622 622
 		$n = strrpos($base, '/');
623 623
 		if ($n === false) {
624
-			return $nobase ? '' : ($base . '/');
624
+			return $nobase ? '' : ($base.'/');
625 625
 		}
626 626
 		$subdir = substr($base, $n + 1);
627 627
 		$base = substr($base, 0, $n + 1);
@@ -631,14 +631,14 @@  discard block
 block discarded – undo
631 631
 	}
632 632
 
633 633
 	$baseaff = $nobase ? '' : $base;
634
-	if (isset($dirs[$base . $subdir])) {
635
-		return $baseaff . $dirs[$base . $subdir];
634
+	if (isset($dirs[$base.$subdir])) {
635
+		return $baseaff.$dirs[$base.$subdir];
636 636
 	}
637 637
 
638
-	$path = $base . $subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf'
638
+	$path = $base.$subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf'
639 639
 
640 640
 	if (file_exists("$path/.ok")) {
641
-		return $baseaff . ($dirs[$base . $subdir] = "$subdir/");
641
+		return $baseaff.($dirs[$base.$subdir] = "$subdir/");
642 642
 	}
643 643
 
644 644
 	@mkdir($path, _SPIP_CHMOD);
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
 		@touch("$path/.ok");
649 649
 		spip_log("creation $base$subdir/");
650 650
 
651
-		return $baseaff . ($dirs[$base . $subdir] = "$subdir/");
651
+		return $baseaff.($dirs[$base.$subdir] = "$subdir/");
652 652
 	}
653 653
 
654 654
 	// en cas d'echec c'est peut etre tout simplement que le disque est plein :
@@ -659,10 +659,10 @@  discard block
 block discarded – undo
659 659
 	}
660 660
 	// FIXME: throw an Exception…
661 661
 	if (!_DIR_RESTREINT) {
662
-		$base = preg_replace(',^' . _DIR_RACINE . ',', '', $base);
662
+		$base = preg_replace(',^'._DIR_RACINE.',', '', $base);
663 663
 	}
664 664
 	$base .= $subdir;
665
-	raler_fichier($base . '/.ok');
665
+	raler_fichier($base.'/.ok');
666 666
 }
667 667
 
668 668
 
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 								$maxfiles - $nbfiles,
735 735
 								$recurs
736 736
 							);
737
-							$fichiers = array_merge((array)$beginning, (array)$end);
737
+							$fichiers = array_merge((array) $beginning, (array) $end);
738 738
 							$nbfiles = count($fichiers);
739 739
 						}
740 740
 					}
Please login to merge, or discard this patch.
ecrire/inc_version.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -21,22 +21,22 @@  discard block
 block discarded – undo
21 21
 	return;
22 22
 }
23 23
 
24
-require_once __DIR__ . '/bootstrap/config/initial.php';
24
+require_once __DIR__.'/bootstrap/config/initial.php';
25 25
 
26 26
 // inclure l'ecran de securite si il n'a pas été inclus en prepend php
27 27
 if (
28 28
 	!defined('_ECRAN_SECURITE')
29
-	&& @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')
29
+	&& @file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES.'ecran_securite.php')
30 30
 ) {
31 31
 	include $f;
32 32
 }
33 33
 
34 34
 // et on peut lancer l'autoloader
35
-require_once dirname(__DIR__) . '/vendor/autoload.php';
35
+require_once dirname(__DIR__).'/vendor/autoload.php';
36 36
 
37
-require_once __DIR__ . '/bootstrap/config/globals.php';
38
-require_once __DIR__ . '/bootstrap/proxy.php';
39
-require_once __DIR__ . '/bootstrap/mitigation.php';
37
+require_once __DIR__.'/bootstrap/config/globals.php';
38
+require_once __DIR__.'/bootstrap/proxy.php';
39
+require_once __DIR__.'/bootstrap/mitigation.php';
40 40
 
41 41
 // numero de branche, utilise par les plugins
42 42
 // pour specifier les versions de SPIP necessaires
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 //
71 71
 // Charger les fonctions liees aux serveurs Http et Sql.
72 72
 //
73
-require_once __DIR__ . '/bootstrap/functions.php';
73
+require_once __DIR__.'/bootstrap/functions.php';
74 74
 
75 75
 // Definition personnelles eventuelles
76 76
 
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
 // ===> on execute en neutralisant les messages d'erreur
95 95
 
96 96
 spip_initialisation_core(
97
-	(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
98
-	(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
99
-	(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
100
-	(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
97
+	(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
98
+	(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
99
+	(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
100
+	(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
101 101
 );
102 102
 
103 103
 // chargement des plugins : doit arriver en dernier
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		include_spip('inc/lang');
154 154
 		utiliser_langue_visiteur();
155 155
 		include_spip('inc/minipres');
156
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . '</p>', ['status' => 503]);
156
+		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>"._T('info_travaux_texte').'</p>', ['status' => 503]);
157 157
 		exit;
158 158
 	}
159 159
 	// autrement c'est une install ad hoc (spikini...), on sait pas faire
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
 	}
193 193
 	if (!isset($GLOBALS['spip_header_silencieux']) || !$GLOBALS['spip_header_silencieux']) {
194 194
 		include_spip('inc/filtres_mini');
195
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . 'config.txt'));
195
+		header(_HEADER_COMPOSED_BY." $spip_version_affichee @ www.spip.net + ".url_absolue(_DIR_VAR.'config.txt'));
196 196
 	} else {
197 197
 		// header minimal
198
-		header(_HEADER_COMPOSED_BY . ' @ www.spip.net');
198
+		header(_HEADER_COMPOSED_BY.' @ www.spip.net');
199 199
 	}
200 200
 }
201 201
 
202 202
 $methode = ($_SERVER['REQUEST_METHOD'] ?? ((php_sapi_name() == 'cli') ? 'cli' : ''));
203
-spip_log($methode . ' ' . self() . ' - ' . _FILE_CONNECT, _LOG_DEBUG);
203
+spip_log($methode.' '.self().' - '._FILE_CONNECT, _LOG_DEBUG);
Please login to merge, or discard this patch.
ecrire/bootstrap/config/globals.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
 # la matrice standard (fichiers definissant les fonctions a inclure)
165 165
 $spip_matrice = [];
166 166
 # les plugins a activer
167
-$plugins = [];  // voir le contenu du repertoire /plugins/
167
+$plugins = []; // voir le contenu du repertoire /plugins/
168 168
 # les surcharges de include_spip()
169 169
 $surcharges = []; // format 'inc_truc' => '/plugins/chose/inc_truc2.php'
170 170
 
Please login to merge, or discard this patch.
ecrire/bootstrap/functions.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
  * Ces fichiers ne peuvent pas être surchargés dans des plugins
7 7
  */
8 8
 
9
-include_once __DIR__ . '/inc/auth.php';
10
-include_once __DIR__ . '/inc/form.php';
11
-include_once __DIR__ . '/inc/initialization.php';
12
-include_once __DIR__ . '/inc/i18n.php';
13
-include_once __DIR__ . '/inc/jobs.php';
14
-include_once __DIR__ . '/inc/loading.php';
15
-include_once __DIR__ . '/inc/logging.php';
16
-include_once __DIR__ . '/inc/path.php';
17
-include_once __DIR__ . '/inc/pipeline.php';
18
-include_once __DIR__ . '/inc/request.php';
19
-include_once __DIR__ . '/inc/sanitize.php';
20
-include_once __DIR__ . '/inc/templating.php';
21
-include_once __DIR__ . '/inc/utils.php';
22
-include_once __DIR__ . '/inc/urls.php';
23
-require_once dirname(__DIR__) . '/base/connect_sql.php';
9
+include_once __DIR__.'/inc/auth.php';
10
+include_once __DIR__.'/inc/form.php';
11
+include_once __DIR__.'/inc/initialization.php';
12
+include_once __DIR__.'/inc/i18n.php';
13
+include_once __DIR__.'/inc/jobs.php';
14
+include_once __DIR__.'/inc/loading.php';
15
+include_once __DIR__.'/inc/logging.php';
16
+include_once __DIR__.'/inc/path.php';
17
+include_once __DIR__.'/inc/pipeline.php';
18
+include_once __DIR__.'/inc/request.php';
19
+include_once __DIR__.'/inc/sanitize.php';
20
+include_once __DIR__.'/inc/templating.php';
21
+include_once __DIR__.'/inc/utils.php';
22
+include_once __DIR__.'/inc/urls.php';
23
+require_once dirname(__DIR__).'/base/connect_sql.php';
24 24
 
Please login to merge, or discard this patch.