Completed
Push — master ( 350a8b...37aa61 )
by cam
01:39
created
ecrire/inc/boutons.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 			&& autoriser('onglet', "_$id")
51 51
 		) {
52 52
 			$onglets[$id] = new Bouton(
53
-				isset($infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
54
-				$infos['titre'],  // titre
53
+				isset($infos['icone']) ? find_in_theme($infos['icone']) : '', // icone
54
+				$infos['titre'], // titre
55 55
 				(isset($infos['action']) && $infos['action'])
56 56
 					? generer_url_ecrire(
57 57
 						$infos['action'],
@@ -89,5 +89,5 @@  discard block
 block discarded – undo
89 89
 		$res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
90 90
 	}
91 91
 
92
-	return $res ? debut_onglet($class) . $res . fin_onglet() : ('');
92
+	return $res ? debut_onglet($class).$res.fin_onglet() : ('');
93 93
 }
Please login to merge, or discard this patch.
ecrire/inc/invalideur.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	$n = 0;
45 45
 	$time = $GLOBALS['meta']['cache_mark'] ?? 0;
46 46
 	for ($i = 0; $i < 256; $i++) {
47
-		$dir = _DIR_CACHE . sprintf('%02s', dechex($i));
47
+		$dir = _DIR_CACHE.sprintf('%02s', dechex($i));
48 48
 		if (@is_dir($dir) && is_readable($dir) && ($d = opendir($dir))) {
49 49
 			while (($f = readdir($d)) !== false) {
50 50
 				if (preg_match(',^[[0-9a-f]+\.cache$,S', $f) && ($a = stat("$dir/$f"))) {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 	// stocker la date_modif_$objet (ne sert a rien pour le moment)
103 103
 	if (isset($objet)) {
104
-		ecrire_meta('derniere_modif_' . $objet, time());
104
+		ecrire_meta('derniere_modif_'.$objet, time());
105 105
 	}
106 106
 
107 107
 	// si $derniere_modif_invalide est un array('article', 'rubrique')
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 	// sur certains sites on veut absolument garder certains caches référencés dans un CDN
146 146
 	// on peut donc inhiber la purge de ces répertoires pour eviter tout probleme
147
-	if (file_exists(rtrim($dir, '/') . '/inhib_purger_repertoire.txt')) {
147
+	if (file_exists(rtrim($dir, '/').'/inhib_purger_repertoire.txt')) {
148 148
 		return 0;
149 149
 	}
150 150
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 		)
206 206
 	) {
207 207
 		// supprimer le fichier (de facon propre)
208
-		supprimer_fichier(_DIR_CACHE . $cache);
208
+		supprimer_fichier(_DIR_CACHE.$cache);
209 209
 	} else {
210 210
 		spip_log("Nom de fichier cache incorrect : $cache");
211 211
 	}
Please login to merge, or discard this patch.
ecrire/inc/charsets.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		$charset = 'cp1256';
90 90
 	}
91 91
 
92
-	if (find_in_path($charset . '.php', 'charsets/', true)) {
92
+	if (find_in_path($charset.'.php', 'charsets/', true)) {
93 93
 		return $charset;
94 94
 	} else {
95 95
 		spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'");
@@ -190,38 +190,38 @@  discard block
 block discarded – undo
190 190
 
191 191
 	if (!isset($trans[$charset][$charset_cible])) {
192 192
 		$trans[$charset][$charset_cible] = [
193
-			$p . chr(128) => '&#8364;',
194
-			$p . chr(129) => ' ', # pas affecte
195
-			$p . chr(130) => '&#8218;',
196
-			$p . chr(131) => '&#402;',
197
-			$p . chr(132) => '&#8222;',
198
-			$p . chr(133) => '&#8230;',
199
-			$p . chr(134) => '&#8224;',
200
-			$p . chr(135) => '&#8225;',
201
-			$p . chr(136) => '&#710;',
202
-			$p . chr(137) => '&#8240;',
203
-			$p . chr(138) => '&#352;',
204
-			$p . chr(139) => '&#8249;',
205
-			$p . chr(140) => '&#338;',
206
-			$p . chr(141) => ' ', # pas affecte
207
-			$p . chr(142) => '&#381;',
208
-			$p . chr(143) => ' ', # pas affecte
209
-			$p . chr(144) => ' ', # pas affecte
210
-			$p . chr(145) => '&#8216;',
211
-			$p . chr(146) => '&#8217;',
212
-			$p . chr(147) => '&#8220;',
213
-			$p . chr(148) => '&#8221;',
214
-			$p . chr(149) => '&#8226;',
215
-			$p . chr(150) => '&#8211;',
216
-			$p . chr(151) => '&#8212;',
217
-			$p . chr(152) => '&#732;',
218
-			$p . chr(153) => '&#8482;',
219
-			$p . chr(154) => '&#353;',
220
-			$p . chr(155) => '&#8250;',
221
-			$p . chr(156) => '&#339;',
222
-			$p . chr(157) => ' ', # pas affecte
223
-			$p . chr(158) => '&#382;',
224
-			$p . chr(159) => '&#376;',
193
+			$p.chr(128) => '&#8364;',
194
+			$p.chr(129) => ' ', # pas affecte
195
+			$p.chr(130) => '&#8218;',
196
+			$p.chr(131) => '&#402;',
197
+			$p.chr(132) => '&#8222;',
198
+			$p.chr(133) => '&#8230;',
199
+			$p.chr(134) => '&#8224;',
200
+			$p.chr(135) => '&#8225;',
201
+			$p.chr(136) => '&#710;',
202
+			$p.chr(137) => '&#8240;',
203
+			$p.chr(138) => '&#352;',
204
+			$p.chr(139) => '&#8249;',
205
+			$p.chr(140) => '&#338;',
206
+			$p.chr(141) => ' ', # pas affecte
207
+			$p.chr(142) => '&#381;',
208
+			$p.chr(143) => ' ', # pas affecte
209
+			$p.chr(144) => ' ', # pas affecte
210
+			$p.chr(145) => '&#8216;',
211
+			$p.chr(146) => '&#8217;',
212
+			$p.chr(147) => '&#8220;',
213
+			$p.chr(148) => '&#8221;',
214
+			$p.chr(149) => '&#8226;',
215
+			$p.chr(150) => '&#8211;',
216
+			$p.chr(151) => '&#8212;',
217
+			$p.chr(152) => '&#732;',
218
+			$p.chr(153) => '&#8482;',
219
+			$p.chr(154) => '&#353;',
220
+			$p.chr(155) => '&#8250;',
221
+			$p.chr(156) => '&#339;',
222
+			$p.chr(157) => ' ', # pas affecte
223
+			$p.chr(158) => '&#382;',
224
+			$p.chr(159) => '&#376;',
225 225
 		];
226 226
 		if ($charset_cible != 'unicode') {
227 227
 			foreach ($trans[$charset][$charset_cible] as $k => $c) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 			// Sinon, peut-etre connaissons-nous ce charset ?
359 359
 			if (!isset($trans[$charset]) && (($cset = load_charset($charset)) && is_array($GLOBALS['CHARSET'][$cset]))) {
360 360
 				foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
361
-					$trans[$charset][chr($key)] = '&#' . $val . ';';
361
+					$trans[$charset][chr($key)] = '&#'.$val.';';
362 362
 				}
363 363
 			}
364 364
 			if (isset($trans[$charset]) && (is_countable($trans[$charset]) ? count($trans[$charset]) : 0)) {
@@ -423,11 +423,11 @@  discard block
 block discarded – undo
423 423
 					$h = dechex($e);
424 424
 					if ($s = isset($CHARSET_REVERSE[$charset][$e])) {
425 425
 						$s = $CHARSET_REVERSE[$charset][$e];
426
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($s);
427
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($s);
426
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($s);
427
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($s);
428 428
 					} else {
429
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($e);
430
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($e);
429
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($e);
430
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($e);
431 431
 					}
432 432
 				}
433 433
 			}
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 			&& is_array($GLOBALS['CHARSET'][$cset]))
474 474
 		) {
475 475
 			foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
476
-				$trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';');
476
+				$trans[$charset][chr($key)] = unicode2charset('&#'.$val.';');
477 477
 			}
478 478
 		}
479 479
 		if (is_countable($trans[$charset]) ? count($trans[$charset]) : 0) {
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 				}
580 580
 				$thisPos++;
581 581
 			}
582
-			$encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';';
582
+			$encodedLetter = '&#'.preg_replace('/^0+/', '', $decimalCode).';';
583 583
 			$encodedString .= $encodedLetter;
584 584
 		}
585 585
 	}
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
 			} // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html
623 623
 			else {
624 624
 				if ($word != 65279) {
625
-					$texte .= '&#' . $word . ';';
625
+					$texte .= '&#'.$word.';';
626 626
 				}
627 627
 			}
628 628
 		}
@@ -650,13 +650,13 @@  discard block
 block discarded – undo
650 650
 		return chr($num);
651 651
 	}
652 652
 	if ($num < 2048) {
653
-		return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
653
+		return chr(($num >> 6) + 192).chr(($num & 63) + 128);
654 654
 	}
655 655
 	if ($num < 65536) {
656
-		return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
656
+		return chr(($num >> 12) + 224).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
657 657
 	}
658 658
 	if ($num < 1_114_112) {
659
-		return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
659
+		return chr(($num >> 18) + 240).chr((($num >> 12) & 63) + 128).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
660 660
 	}
661 661
 
662 662
 	return '';
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 	while (preg_match(',&#0*(\d+);,S', $texte, $regs) && !isset($vu[$regs[1]])) {
724 724
 		$num = $regs[1];
725 725
 		$vu[$num] = true;
726
-		$s = '\u' . sprintf('%04x', $num);
726
+		$s = '\u'.sprintf('%04x', $num);
727 727
 		$texte = str_replace($regs[0], $s, $texte);
728 728
 	}
729 729
 
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
  **/
741 741
 function javascript_to_unicode($texte) {
742 742
 	while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) {
743
-		$texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte);
743
+		$texte = str_replace($regs[0], '&#'.hexdec($regs[1]).';', $texte);
744 744
 	}
745 745
 
746 746
 	return $texte;
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 		return $texte;
786 786
 	}
787 787
 
788
-	$table_translit = 'translit' . $complexe;
788
+	$table_translit = 'translit'.$complexe;
789 789
 
790 790
 	// 2. Translitterer grace a la table predefinie
791 791
 	if (!isset($trans[$complexe])) {
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
  *    true s'il a un BOM
877 877
  **/
878 878
 function bom_utf8($texte): bool {
879
-	return (substr($texte, 0, 3) === chr(0xEF) . chr(0xBB) . chr(0xBF));
879
+	return (substr($texte, 0, 3) === chr(0xEF).chr(0xBB).chr(0xBF));
880 880
 }
881 881
 
882 882
 /**
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
 
1044 1044
 	$lettre1 = mb_strtoupper(spip_substr($c, 0, 1));
1045 1045
 
1046
-	return $lettre1 . spip_substr($c, 1);
1046
+	return $lettre1.spip_substr($c, 1);
1047 1047
 }
1048 1048
 
1049 1049
 /**
Please login to merge, or discard this patch.
ecrire/inc/flock.php 1 patch
Spacing   +17 added lines, -17 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
 	}
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 				$wait = 0;
551 551
 			}
552 552
 		}
553
-		spip_log('Probleme de configuration opcache.revalidate_freq ' . $duree . 's : on attend ' . $wait . 's', _LOG_INFO_IMPORTANTE);
553
+		spip_log('Probleme de configuration opcache.revalidate_freq '.$duree.'s : on attend '.$wait.'s', _LOG_INFO_IMPORTANTE);
554 554
 		if ($wait) {
555 555
 			sleep($duree + 1);
556 556
 		}
@@ -578,9 +578,9 @@  discard block
 block discarded – undo
578 578
 		if ($item == '.' || $item == '..') {
579 579
 			continue;
580 580
 		}
581
-		if (!supprimer_repertoire($dir . '/' . $item)) {
582
-			@chmod($dir . '/' . $item, 0777);
583
-			if (!supprimer_repertoire($dir . '/' . $item)) {
581
+		if (!supprimer_repertoire($dir.'/'.$item)) {
582
+			@chmod($dir.'/'.$item, 0777);
583
+			if (!supprimer_repertoire($dir.'/'.$item)) {
584 584
 				return false;
585 585
 			}
586 586
 		};
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 	if (!strlen($subdir)) {
626 626
 		$n = strrpos($base, '/');
627 627
 		if ($n === false) {
628
-			return $nobase ? '' : ($base . '/');
628
+			return $nobase ? '' : ($base.'/');
629 629
 		}
630 630
 		$subdir = substr($base, $n + 1);
631 631
 		$base = substr($base, 0, $n + 1);
@@ -635,14 +635,14 @@  discard block
 block discarded – undo
635 635
 	}
636 636
 
637 637
 	$baseaff = $nobase ? '' : $base;
638
-	if (isset($dirs[$base . $subdir])) {
639
-		return $baseaff . $dirs[$base . $subdir];
638
+	if (isset($dirs[$base.$subdir])) {
639
+		return $baseaff.$dirs[$base.$subdir];
640 640
 	}
641 641
 
642
-	$path = $base . $subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf'
642
+	$path = $base.$subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf'
643 643
 
644 644
 	if (file_exists("$path/.ok")) {
645
-		return $baseaff . ($dirs[$base . $subdir] = "$subdir/");
645
+		return $baseaff.($dirs[$base.$subdir] = "$subdir/");
646 646
 	}
647 647
 
648 648
 	@mkdir($path, _SPIP_CHMOD);
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 		@touch("$path/.ok");
653 653
 		spip_log("creation $base$subdir/");
654 654
 
655
-		return $baseaff . ($dirs[$base . $subdir] = "$subdir/");
655
+		return $baseaff.($dirs[$base.$subdir] = "$subdir/");
656 656
 	}
657 657
 
658 658
 	// en cas d'echec c'est peut etre tout simplement que le disque est plein :
@@ -662,10 +662,10 @@  discard block
 block discarded – undo
662 662
 		return '';
663 663
 	}
664 664
 	if (!_DIR_RESTREINT) {
665
-		$base = preg_replace(',^' . _DIR_RACINE . ',', '', $base);
665
+		$base = preg_replace(',^'._DIR_RACINE.',', '', $base);
666 666
 	}
667 667
 	$base .= $subdir;
668
-	raler_fichier($base . '/.ok');
668
+	raler_fichier($base.'/.ok');
669 669
 }
670 670
 
671 671
 
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 								$maxfiles - $nbfiles,
739 739
 								$recurs
740 740
 							);
741
-							$fichiers = array_merge((array)$beginning, (array)$end);
741
+							$fichiers = array_merge((array) $beginning, (array) $end);
742 742
 							$nbfiles = count($fichiers);
743 743
 						}
744 744
 					}
Please login to merge, or discard this patch.
ecrire/inc/filtres_alertes.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	$_texte = ($_texte ?: "''");
51 51
 	$_titre = ($_titre ? ", $_titre" : ', null');
52 52
 	$_class = ($_class ? ", $_class" : ', null');
53
-	$_role  = ($_role  ? ", $_role"  : ', null');
54
-	$_id    = ($_id    ? ", $_id"    : ', null');
53
+	$_role  = ($_role ? ", $_role" : ', null');
54
+	$_id    = ($_id ? ", $_id" : ', null');
55 55
 
56 56
 	$f = chercher_filtre('message_alerte');
57 57
 	$p->code = "$f($_texte$_titre$_class$_role$_id)";
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
 	$_class = interprete_argument_balise(2, $p);
90 90
 	$_role  = interprete_argument_balise(3, $p);
91 91
 	$_id    = interprete_argument_balise(4, $p);
92
-	$_titre = ($_titre ? "$_titre"   : 'null');
92
+	$_titre = ($_titre ? "$_titre" : 'null');
93 93
 	$_class = ($_class ? ", $_class" : ', null');
94
-	$_role  = ($_role  ? ", $_role"  : ', null');
95
-	$_id    = ($_id    ? ", $_id"    : ', null');
94
+	$_role  = ($_role ? ", $_role" : ', null');
95
+	$_id    = ($_id ? ", $_id" : ', null');
96 96
 
97 97
 	$f = chercher_filtre('message_alerte_ouvrir');
98 98
 	$p->code = "$f($_titre$_class$_role$_id)";
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 	$message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir');
163 163
 	$message_alerte_fermer = chercher_filtre('message_alerte_fermer');
164 164
 
165
-	return $message_alerte_ouvrir($titre, $class, $role, $id) .
166
-		$texte .
165
+	return $message_alerte_ouvrir($titre, $class, $role, $id).
166
+		$texte.
167 167
 		$message_alerte_fermer();
168 168
 }
169 169
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	];
212 212
 	$type  = array_intersect(explode(' ', $class), $types);
213 213
 	$type  = reset($type);
214
-	$class = trim(str_replace($types, '', $class) . " $type");
214
+	$class = trim(str_replace($types, '', $class)." $type");
215 215
 
216 216
 	// Classes
217 217
 	$class_racine = 'msg-alert';
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
 	// Attributs
238 238
 	$attr_role = ($role ? "role=\"$role\"" : '');
239
-	$attr_id   = ($id   ? "id=\"$id\"" : '');
239
+	$attr_id   = ($id ? "id=\"$id\"" : '');
240 240
 	$attr_data = ($type ? "data-alert=\"$type\"" : '');
241 241
 
242 242
 	return "<div class=\"$class_alerte\" $attr_role $attr_id $attr_data>"
Please login to merge, or discard this patch.
ecrire/inc/cvt_configurer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	) {
38 38
 		// Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé
39 39
 		include_spip('inc/autoriser');
40
-		if (!autoriser('configurer', '_' . substr((string) $form, 11))) {
40
+		if (!autoriser('configurer', '_'.substr((string) $form, 11))) {
41 41
 			return false;
42 42
 		}
43 43
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		&& !charger_fonction('traiter', "formulaires/$form/", true) // sans fonction traiter()
72 72
 	) {
73 73
 		$trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']);
74
-		$flux['data'] = ['message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true];
74
+		$flux['data'] = ['message_ok' => _T('config_info_enregistree').$trace, 'editable' => true];
75 75
 	}
76 76
 
77 77
 	return $flux;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		$prefixe = $valeurs['_meta_prefixe'];
146 146
 	}
147 147
 	if (isset($valeurs['_meta_stockage'])) {
148
-		$stockage = $valeurs['_meta_stockage'] . '::';
148
+		$stockage = $valeurs['_meta_stockage'].'::';
149 149
 	}
150 150
 
151 151
 	// si on indique juste une table, il faut vider les autres proprietes
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
 	// sinon cas analyse du squelette
173 173
 	if (
174
-		($f = find_in_path($form . '.' . _EXTENSION_SQUELETTES, 'formulaires/'))
174
+		($f = find_in_path($form.'.'._EXTENSION_SQUELETTES, 'formulaires/'))
175 175
 		&& lire_fichier($f, $contenu)
176 176
 	) {
177 177
 		for ($i = 0; $i < 2; $i++) {
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
 		lire_metas($table);
229 229
 	}
230 230
 
231
-	$prefixe = ($prefixe ? $prefixe . '_' : '');
231
+	$prefixe = ($prefixe ? $prefixe.'_' : '');
232 232
 	$table = ($table) ? "/$table/" : '';
233
-	$casier = ($casier) ? rtrim((string) $casier, '/') . '/' : ''; // slash final, sinon rien
233
+	$casier = ($casier) ? rtrim((string) $casier, '/').'/' : ''; // slash final, sinon rien
234 234
 
235 235
 	foreach ($store as $k => $v) {
236 236
 		ecrire_config("$stockage$table$prefixe$casier$k", $v);
237 237
 		if (_request('var_mode') == 'configurer' && autoriser('webmestre')) {
238
-			$trace .= "<br />table $table : " . $prefixe . $k . " = $v;";
238
+			$trace .= "<br />table $table : ".$prefixe.$k." = $v;";
239 239
 		}
240 240
 	}
241 241
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	[$table, $casier, $prefixe, $stockage] = cvtconf_definir_configurer_conteneur($form, $valeurs);
253 253
 
254 254
 	$table = ($table) ? "/$table/" : '';
255
-	$prefixe = ($prefixe ? $prefixe . '_' : '');
255
+	$prefixe = ($prefixe ? $prefixe.'_' : '');
256 256
 	if ($casier) {
257 257
 		$meta = lire_config("$stockage$table$prefixe$casier");
258 258
 		$prefixe = '';
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
 	foreach (array_keys($valeurs) as $k) {
265 265
 		if (!str_starts_with($k, '_')) {
266
-			$valeurs[$k] = ($meta[$prefixe . $k] ?? null);
266
+			$valeurs[$k] = ($meta[$prefixe.$k] ?? null);
267 267
 		}
268 268
 	}
269 269
 }
Please login to merge, or discard this patch.
ecrire/base/repair.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 	$res = admin_repair_tables();
39 39
 	if (!$res) {
40
-		$res = "<div class='error'>" . _T('avis_erreur_mysql') . ' ' . sql_errno() . ': ' . sql_error() . "</div>\n";
40
+		$res = "<div class='error'>"._T('avis_erreur_mysql').' '.sql_errno().': '.sql_error()."</div>\n";
41 41
 	} else {
42 42
 		include_spip('inc/rubriques');
43 43
 		calculer_rubriques();
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	$res .= pipeline('base_admin_repair', $res);
48 48
 	echo minipres(
49 49
 		_T('texte_tentative_recuperation'),
50
-		$res . generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))
50
+		$res.generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))
51 51
 	);
52 52
 }
53 53
 
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
 		$count = sql_countsel($tab);
91 91
 
92 92
 		if ($count > 1) {
93
-			$m .= '(' . _T('texte_compte_elements', ['count' => $count]) . ")\n";
93
+			$m .= '('._T('texte_compte_elements', ['count' => $count]).")\n";
94 94
 		} else {
95 95
 			if ($count == 1) {
96
-				$m .= '(' . _T('texte_compte_element', ['count' => $count]) . ")\n";
96
+				$m .= '('._T('texte_compte_element', ['count' => $count]).")\n";
97 97
 			} else {
98
-				$m .= '(' . _T('texte_vide') . ")\n";
98
+				$m .= '('._T('texte_vide').")\n";
99 99
 			}
100 100
 		}
101 101
 
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 			&& ($msg = implode(
106 106
 				' ',
107 107
 				(is_resource($result_repair) || is_object($result_repair)) ? sql_fetch($result_repair) : $result_repair
108
-			) . ' ')
108
+			).' ')
109 109
 			&& !str_contains($msg, ' OK ')
110 110
 		) {
111 111
 			$class = " class='notice'";
112
-			$m .= '<br /><tt>' . spip_htmlentities($msg) . "</tt>\n";
112
+			$m .= '<br /><tt>'.spip_htmlentities($msg)."</tt>\n";
113 113
 		} else {
114
-			$m .= ' ' . _T('texte_table_ok');
114
+			$m .= ' '._T('texte_table_ok');
115 115
 		}
116 116
 
117 117
 		$res .= "<div$class>$m</div>";
Please login to merge, or discard this patch.
ecrire/base/objets.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 		$infos['url_voir'] = $infos['type'];
704 704
 	}
705 705
 	if (!isset($infos['url_edit'])) {
706
-		$infos['url_edit'] = $infos['url_voir'] . ($infos['editable'] ? '_edit' : '');
706
+		$infos['url_edit'] = $infos['url_voir'].($infos['editable'] ? '_edit' : '');
707 707
 	}
708 708
 	if (!isset($infos['icone_objet'])) {
709 709
 		$infos['icone_objet'] = $infos['type'];
@@ -715,48 +715,48 @@  discard block
 block discarded – undo
715 715
 		$infos['texte_retour'] = 'icone_retour';
716 716
 	}
717 717
 	if (!isset($infos['texte_modifier'])) {
718
-		$infos['texte_modifier'] = $infos['type'] . ':' . 'icone_modifier_' . $infos['type'];
718
+		$infos['texte_modifier'] = $infos['type'].':'.'icone_modifier_'.$infos['type'];
719 719
 	}
720 720
 	if (!isset($infos['texte_creer'])) {
721
-		$infos['texte_creer'] = $infos['type'] . ':' . 'icone_creer_' . $infos['type'];
721
+		$infos['texte_creer'] = $infos['type'].':'.'icone_creer_'.$infos['type'];
722 722
 	}
723 723
 	if (!isset($infos['texte_creer_associer'])) {
724
-		$infos['texte_creer_associer'] = $infos['type'] . ':' . 'texte_creer_associer_' . $infos['type'];
724
+		$infos['texte_creer_associer'] = $infos['type'].':'.'texte_creer_associer_'.$infos['type'];
725 725
 	}
726 726
 	if (!isset($infos['texte_ajouter'])) {
727 727
 		// Ajouter un X
728
-		$infos['texte_ajouter'] = $infos['type'] . ':' . 'texte_ajouter_' . $infos['type'];
728
+		$infos['texte_ajouter'] = $infos['type'].':'.'texte_ajouter_'.$infos['type'];
729 729
 	}
730 730
 	if (!isset($infos['texte_objets'])) {
731
-		$infos['texte_objets'] = $infos['type'] . ':' . 'titre_' . $infos['table_objet'];
731
+		$infos['texte_objets'] = $infos['type'].':'.'titre_'.$infos['table_objet'];
732 732
 	}
733 733
 	if (!isset($infos['texte_objet'])) {
734
-		$infos['texte_objet'] = $infos['type'] . ':' . 'titre_' . $infos['type'];
734
+		$infos['texte_objet'] = $infos['type'].':'.'titre_'.$infos['type'];
735 735
 	}
736 736
 	if (!isset($infos['texte_logo_objet'])) {
737 737
 		// objet:titre_logo_objet "Logo de ce X"
738
-		$infos['texte_logo_objet'] = $infos['type'] . ':' . 'titre_logo_' . $infos['type'];
738
+		$infos['texte_logo_objet'] = $infos['type'].':'.'titre_logo_'.$infos['type'];
739 739
 	}
740 740
 	if (!isset($infos['texte_langue_objet'])) {
741 741
 		// objet:texte_langue_objet "Langue de ce X"
742
-		$infos['texte_langue_objet'] = $infos['type'] . ':' . 'titre_langue_' . $infos['type'];
742
+		$infos['texte_langue_objet'] = $infos['type'].':'.'titre_langue_'.$infos['type'];
743 743
 	}
744 744
 	if (!isset($infos['texte_definir_comme_traduction_objet'])) {
745 745
 		// "Ce X est une traduction du X numéro :"
746
-		$infos['texte_definir_comme_traduction_objet'] = $infos['type'] . ':' . 'texte_definir_comme_traduction_' . $infos['type'];
746
+		$infos['texte_definir_comme_traduction_objet'] = $infos['type'].':'.'texte_definir_comme_traduction_'.$infos['type'];
747 747
 	}
748 748
 
749 749
 	// objet:info_aucun_objet
750 750
 	if (!isset($infos['info_aucun_objet'])) {
751
-		$infos['info_aucun_objet'] = $infos['type'] . ':' . 'info_aucun_' . $infos['type'];
751
+		$infos['info_aucun_objet'] = $infos['type'].':'.'info_aucun_'.$infos['type'];
752 752
 	}
753 753
 	// objet:info_1_objet
754 754
 	if (!isset($infos['info_1_objet'])) {
755
-		$infos['info_1_objet'] = $infos['type'] . ':' . 'info_1_' . $infos['type'];
755
+		$infos['info_1_objet'] = $infos['type'].':'.'info_1_'.$infos['type'];
756 756
 	}
757 757
 	// objet:info_nb_objets
758 758
 	if (!isset($infos['info_nb_objets'])) {
759
-		$infos['info_nb_objets'] = $infos['type'] . ':' . 'info_nb_' . $infos['table_objet'];
759
+		$infos['info_nb_objets'] = $infos['type'].':'.'info_nb_'.$infos['table_objet'];
760 760
 	}
761 761
 
762 762
 	if (!isset($infos['champs_editables'])) {
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
 		}
955 955
 		$ts = sql_alltable(null, $serveur); // toutes les tables "spip_" (ou prefixe perso)
956 956
 		$connexion = $GLOBALS['connexions'][$serveur ?: 0];
957
-		$spip = $connexion['prefixe'] . '_';
957
+		$spip = $connexion['prefixe'].'_';
958 958
 		foreach ($ts as $t) {
959 959
 			$t = substr((string) $t, strlen($spip));
960 960
 			$tables[$serveur]["spip_$t"] = $t;
@@ -1023,9 +1023,9 @@  discard block
 block discarded – undo
1023 1023
 	if ($serveur !== false) {
1024 1024
 		$t = lister_tables_spip($serveur);
1025 1025
 		$trouver_table = charger_fonction('trouver_table', 'base');
1026
-		$typetrim = rtrim($type, 's') . 's';
1026
+		$typetrim = rtrim($type, 's').'s';
1027 1027
 		if (
1028
-			(isset($t[$typetrim]) || in_array($typetrim, $t)) && ($desc = $trouver_table(rtrim($type, 's') . 's', $serveur))
1028
+			(isset($t[$typetrim]) || in_array($typetrim, $t)) && ($desc = $trouver_table(rtrim($type, 's').'s', $serveur))
1029 1029
 		) {
1030 1030
 			return $desc['id_table'];
1031 1031
 		} elseif (
@@ -1034,11 +1034,11 @@  discard block
 block discarded – undo
1034 1034
 			return $desc['id_table'];
1035 1035
 		}
1036 1036
 
1037
-		spip_log('table_objet(' . $type . ') calculee sans verification');
1037
+		spip_log('table_objet('.$type.') calculee sans verification');
1038 1038
 		#spip_log(debug_backtrace(),'db');
1039 1039
 	}
1040 1040
 
1041
-	return rtrim($type, 's') . 's'; # cas historique ne devant plus servir, sauf si $serveur=false
1041
+	return rtrim($type, 's').'s'; # cas historique ne devant plus servir, sauf si $serveur=false
1042 1042
 }
1043 1043
 
1044 1044
 /**
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
 function objet_test_si_publie($objet, $id_objet, $serveur = '') {
1222 1222
 	// voir si une fonction est definie pour faire le boulot
1223 1223
 	// elle a la priorite dans ce cas
1224
-	if ($f = charger_fonction($objet . '_test_si_publie', 'base', true)) {
1224
+	if ($f = charger_fonction($objet.'_test_si_publie', 'base', true)) {
1225 1225
 		return $f($objet, $id_objet, $serveur);
1226 1226
 	}
1227 1227
 
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
 		$boucle->sql_serveur = $serveur;
1244 1244
 		$boucle->select[] = $id_table_objet;
1245 1245
 		$boucle->from[$table_objet] = table_objet_sql($objet, $serveur);
1246
-		$boucle->where[] = $id_table . '.' . $id_table_objet . '=' . (int) $id_objet;
1246
+		$boucle->where[] = $id_table.'.'.$id_table_objet.'='.(int) $id_objet;
1247 1247
 
1248 1248
 		$boucle->descr['nom'] = 'objet_test_si_publie'; // eviter notice php
1249 1249
 		$boucle->descr['sourcefile'] = 'internal';
@@ -1366,7 +1366,7 @@  discard block
 block discarded – undo
1366 1366
 						? "{$parent_methode['source_champ']} = $id_objet"
1367 1367
 						: "$cle_objet = $id_objet";
1368 1368
 					if (isset($parent_methode['source_champ_type'])) {
1369
-						$where[] = "{$parent_methode['source_champ_type']} = " . sql_quote($objet);
1369
+						$where[] = "{$parent_methode['source_champ_type']} = ".sql_quote($objet);
1370 1370
 					}
1371 1371
 					// -- Condition supplémentaire sur la détection du parent
1372 1372
 					if (isset($parent_methode['table_condition'])) {
@@ -1490,11 +1490,11 @@  discard block
 block discarded – undo
1490 1490
 			$where = [];
1491 1491
 			// -- L'identifiant du parent
1492 1492
 			if (isset($_methode_parent['champ'])) {
1493
-				$where[] = $_methode_parent['champ'] . ' = ' . $id_objet;
1493
+				$where[] = $_methode_parent['champ'].' = '.$id_objet;
1494 1494
 			}
1495 1495
 			// -- Si le parent est variable
1496 1496
 			if (isset($_methode_parent['champ_type'])) {
1497
-				$where[] = $_methode_parent['champ_type'] . ' = ' . sql_quote($objet);
1497
+				$where[] = $_methode_parent['champ_type'].' = '.sql_quote($objet);
1498 1498
 			}
1499 1499
 
1500 1500
 			// On détermine la table, le champ id des enfants et on complète éventuellement les conditions
Please login to merge, or discard this patch.
ecrire/base/delete_all.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,5 +50,5 @@
 block discarded – undo
50 50
 	}
51 51
 	$d = is_countable($delete) ? count($delete) : 0;
52 52
 	$r = count($res);
53
-	spip_log("Tables detruites: $r sur $d: " . implode(', ', $res), _LOG_INFO_IMPORTANTE);
53
+	spip_log("Tables detruites: $r sur $d: ".implode(', ', $res), _LOG_INFO_IMPORTANTE);
54 54
 }
Please login to merge, or discard this patch.