Completed
Pull Request — master (#42)
by
unknown
01:14
created
ecrire/inc/icone_renommer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
 
48 48
 	$dir = 'images/';
49 49
 	$f = "$type-$size.png";
50
-	if ($icone = find_in_theme($dir . $f)) {
50
+	if ($icone = find_in_theme($dir.$f)) {
51 51
 		$dir = dirname($icone);
52 52
 		$fond = $icone;
53 53
 
54 54
 		if (
55 55
 			$rtl
56
-			and $fr = $dir . '/' . str_replace("$type-", "$type-rtl-", basename($icone))
56
+			and $fr = $dir.'/'.str_replace("$type-", "$type-rtl-", basename($icone))
57 57
 			and file_exists($fr)
58 58
 		) {
59 59
 			$fond = $fr;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		}
70 70
 
71 71
 		$fonction = '';
72
-		if (in_array($action, ['add','del', 'new', 'edit', 'config'])) {
72
+		if (in_array($action, ['add', 'del', 'new', 'edit', 'config'])) {
73 73
 			$fonction = $action;
74 74
 		}
75 75
 
Please login to merge, or discard this patch.
ecrire/inc/presenter_enfants.php 1 patch
Spacing   +25 added lines, -26 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	$result = sql_select(
44 44
 		'id_rubrique, id_parent, titre, descriptif, lang',
45 45
 		'spip_rubriques',
46
-		'id_parent=' . intval($collection),
46
+		'id_parent='.intval($collection),
47 47
 		'',
48 48
 		'0+titre,titre',
49 49
 		"$debut,$limite"
@@ -74,19 +74,18 @@  discard block
 block discarded – undo
74 74
 				}
75 75
 			}
76 76
 
77
-			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' :
78
-					http_img_pack(
77
+			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : http_img_pack(
79 78
 						'auteur-0minirezo-16.png',
80 79
 						'',
81 80
 						" width='16' height='16'",
82 81
 						_T('image_administrer_rubrique')
83
-					)) .
84
-				" <a class='titremlien' dir='$lang_dir'" .
85
-				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') .
86
-				" href='" .
87
-				generer_url_entite($id_rubrique, 'rubrique') .
88
-				"'><span class='titre'>" .
89
-				$rang . $titre
82
+					)).
83
+				" <a class='titremlien' dir='$lang_dir'".
84
+				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : '').
85
+				" href='".
86
+				generer_url_entite($id_rubrique, 'rubrique').
87
+				"'><span class='titre'>".
88
+				$rang.$titre
90 89
 				. '</span>'
91 90
 				. (is_string($logo) ? $logo : '')
92 91
 				. '</a>';
@@ -96,8 +95,8 @@  discard block
 block discarded – undo
96 95
 				;
97 96
 
98 97
 			$res[] =
99
-				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) .
100
-				$les_sous_enfants .
98
+				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre).
99
+				$les_sous_enfants.
101 100
 				fin_cadre_sous_rub(true);
102 101
 		}
103 102
 	}
@@ -116,7 +115,7 @@  discard block
 block discarded – undo
116 115
  *  Le contenu du bloc dépliable
117 116
  */
118 117
 function sous_enfant_rub($collection2) {
119
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($collection2));
118
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($collection2));
120 119
 
121 120
 	$retour = '';
122 121
 	$pagination = '';
@@ -128,23 +127,23 @@  discard block
 block discarded – undo
128 127
 	 * Si > 500 on affiche une pagination
129 128
 	 */
130 129
 	if ($nb > $limite) {
131
-		$debut = _request('debut_rubrique' . $collection2) ? _request('debut_rubrique' . $collection2) : $debut;
130
+		$debut = _request('debut_rubrique'.$collection2) ? _request('debut_rubrique'.$collection2) : $debut;
132 131
 		$pagination = chercher_filtre('pagination');
133
-		$pagination = '<p class="pagination">' . $pagination(
132
+		$pagination = '<p class="pagination">'.$pagination(
134 133
 			$nb,
135
-			'_rubrique' . $collection2,
134
+			'_rubrique'.$collection2,
136 135
 			$debut,
137 136
 			$limite,
138 137
 			true,
139 138
 			'prive'
140
-		) . '</p>';
139
+		).'</p>';
141 140
 		$limite = $debut + $limite;
142 141
 	}
143 142
 
144 143
 	$result = sql_select(
145 144
 		'id_rubrique, id_parent, titre, lang',
146 145
 		'spip_rubriques',
147
-		'id_parent=' . intval($collection2),
146
+		'id_parent='.intval($collection2),
148 147
 		'',
149 148
 		'0+titre,titre',
150 149
 		"$debut,$limite"
@@ -164,14 +163,14 @@  discard block
 block discarded – undo
164 163
 		changer_typo($row['lang']);
165 164
 		$lang_dir = lang_dir($row['lang']);
166 165
 		if (autoriser('voir', 'rubrique', $id_rubrique2)) {
167
-			$retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_url_entite(
166
+			$retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_url_entite(
168 167
 				$id_rubrique2,
169 168
 				'rubrique'
170
-			) . "'>" . $rang2 . $titre2 . "</a></li>\n";
169
+			)."'>".$rang2.$titre2."</a></li>\n";
171 170
 		}
172 171
 	}
173 172
 
174
-	$retour = $pagination . $retour . $pagination;
173
+	$retour = $pagination.$retour.$pagination;
175 174
 
176 175
 	if (!$retour) {
177 176
 		return '';
@@ -180,7 +179,7 @@  discard block
 block discarded – undo
180 179
 	return debut_block_depliable($debut > 0 ? true : false, "enfants$collection2")
181 180
 	. "\n<ul class='liste-items sous-sous-rub'>\n"
182 181
 	. $retour
183
-	. "</ul>\n" . fin_block() . "\n\n";
182
+	. "</ul>\n".fin_block()."\n\n";
184 183
 }
185 184
 
186 185
 /**
@@ -199,13 +198,13 @@  discard block
 block discarded – undo
199 198
 	$debut = 0;
200 199
 	$limite = 500;
201 200
 
202
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique));
201
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique));
203 202
 
204 203
 	if ($nb > $limite) {
205
-		$debut = _request('debut_rubrique' . $id_rubrique) ? _request('debut_rubrique' . $id_rubrique) : $debut;
204
+		$debut = _request('debut_rubrique'.$id_rubrique) ? _request('debut_rubrique'.$id_rubrique) : $debut;
206 205
 		$pagination = chercher_filtre('pagination');
207
-		$pagination = '<br class="nettoyeur"><p class="pagination">' .
208
-			$pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') .
206
+		$pagination = '<br class="nettoyeur"><p class="pagination">'.
207
+			$pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive').
209 208
 		'</p>';
210 209
 	}
211 210
 
Please login to merge, or discard this patch.
ecrire/inc/charsets.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		}
74 74
 	}
75 75
 
76
-	if (find_in_path($charset . '.php', 'charsets/', true)) {
76
+	if (find_in_path($charset.'.php', 'charsets/', true)) {
77 77
 		return $charset;
78 78
 	} else {
79 79
 		spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'");
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	static $pcre_ok = 0;
161 161
 
162 162
 	if (!$pcre_ok) {
163
-		$s = ' ' . chr(195) . chr(169) . 't' . chr(195) . chr(169) . ' ';
163
+		$s = ' '.chr(195).chr(169).'t'.chr(195).chr(169).' ';
164 164
 		if (preg_match(',\W...\W,u', $s)) {
165 165
 			$pcre_ok = 1;
166 166
 		} else {
@@ -261,38 +261,38 @@  discard block
 block discarded – undo
261 261
 
262 262
 	if (!isset($trans[$charset][$charset_cible])) {
263 263
 		$trans[$charset][$charset_cible] = [
264
-			$p . chr(128) => '&#8364;',
265
-			$p . chr(129) => ' ', # pas affecte
266
-			$p . chr(130) => '&#8218;',
267
-			$p . chr(131) => '&#402;',
268
-			$p . chr(132) => '&#8222;',
269
-			$p . chr(133) => '&#8230;',
270
-			$p . chr(134) => '&#8224;',
271
-			$p . chr(135) => '&#8225;',
272
-			$p . chr(136) => '&#710;',
273
-			$p . chr(137) => '&#8240;',
274
-			$p . chr(138) => '&#352;',
275
-			$p . chr(139) => '&#8249;',
276
-			$p . chr(140) => '&#338;',
277
-			$p . chr(141) => ' ', # pas affecte
278
-			$p . chr(142) => '&#381;',
279
-			$p . chr(143) => ' ', # pas affecte
280
-			$p . chr(144) => ' ', # pas affecte
281
-			$p . chr(145) => '&#8216;',
282
-			$p . chr(146) => '&#8217;',
283
-			$p . chr(147) => '&#8220;',
284
-			$p . chr(148) => '&#8221;',
285
-			$p . chr(149) => '&#8226;',
286
-			$p . chr(150) => '&#8211;',
287
-			$p . chr(151) => '&#8212;',
288
-			$p . chr(152) => '&#732;',
289
-			$p . chr(153) => '&#8482;',
290
-			$p . chr(154) => '&#353;',
291
-			$p . chr(155) => '&#8250;',
292
-			$p . chr(156) => '&#339;',
293
-			$p . chr(157) => ' ', # pas affecte
294
-			$p . chr(158) => '&#382;',
295
-			$p . chr(159) => '&#376;',
264
+			$p.chr(128) => '&#8364;',
265
+			$p.chr(129) => ' ', # pas affecte
266
+			$p.chr(130) => '&#8218;',
267
+			$p.chr(131) => '&#402;',
268
+			$p.chr(132) => '&#8222;',
269
+			$p.chr(133) => '&#8230;',
270
+			$p.chr(134) => '&#8224;',
271
+			$p.chr(135) => '&#8225;',
272
+			$p.chr(136) => '&#710;',
273
+			$p.chr(137) => '&#8240;',
274
+			$p.chr(138) => '&#352;',
275
+			$p.chr(139) => '&#8249;',
276
+			$p.chr(140) => '&#338;',
277
+			$p.chr(141) => ' ', # pas affecte
278
+			$p.chr(142) => '&#381;',
279
+			$p.chr(143) => ' ', # pas affecte
280
+			$p.chr(144) => ' ', # pas affecte
281
+			$p.chr(145) => '&#8216;',
282
+			$p.chr(146) => '&#8217;',
283
+			$p.chr(147) => '&#8220;',
284
+			$p.chr(148) => '&#8221;',
285
+			$p.chr(149) => '&#8226;',
286
+			$p.chr(150) => '&#8211;',
287
+			$p.chr(151) => '&#8212;',
288
+			$p.chr(152) => '&#732;',
289
+			$p.chr(153) => '&#8482;',
290
+			$p.chr(154) => '&#353;',
291
+			$p.chr(155) => '&#8250;',
292
+			$p.chr(156) => '&#339;',
293
+			$p.chr(157) => ' ', # pas affecte
294
+			$p.chr(158) => '&#382;',
295
+			$p.chr(159) => '&#376;',
296 296
 		];
297 297
 		if ($charset_cible != 'unicode') {
298 298
 			foreach ($trans[$charset][$charset_cible] as $k => $c) {
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 					and is_array($GLOBALS['CHARSET'][$cset])
434 434
 				) {
435 435
 					foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
436
-						$trans[$charset][chr($key)] = '&#' . $val . ';';
436
+						$trans[$charset][chr($key)] = '&#'.$val.';';
437 437
 					}
438 438
 				}
439 439
 			}
@@ -500,11 +500,11 @@  discard block
 block discarded – undo
500 500
 					$h = dechex($e);
501 501
 					if ($s = isset($CHARSET_REVERSE[$charset][$e])) {
502 502
 						$s = $CHARSET_REVERSE[$charset][$e];
503
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($s);
504
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($s);
503
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($s);
504
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($s);
505 505
 					} else {
506
-						$t['&#' . $e . ';'] = $t['&#0' . $e . ';'] = $t['&#00' . $e . ';'] = chr($e);
507
-						$t['&#x' . $h . ';'] = $t['&#x0' . $h . ';'] = $t['&#x00' . $h . ';'] = chr($e);
506
+						$t['&#'.$e.';'] = $t['&#0'.$e.';'] = $t['&#00'.$e.';'] = chr($e);
507
+						$t['&#x'.$h.';'] = $t['&#x0'.$h.';'] = $t['&#x00'.$h.';'] = chr($e);
508 508
 					}
509 509
 				}
510 510
 			}
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 				and is_array($GLOBALS['CHARSET'][$cset])
551 551
 			) {
552 552
 				foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) {
553
-					$trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';');
553
+					$trans[$charset][chr($key)] = unicode2charset('&#'.$val.';');
554 554
 				}
555 555
 			}
556 556
 		}
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 				}
658 658
 				$thisPos++;
659 659
 			}
660
-			$encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';';
660
+			$encodedLetter = '&#'.preg_replace('/^0+/', '', $decimalCode).';';
661 661
 			$encodedString .= $encodedLetter;
662 662
 		}
663 663
 	}
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 			} // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html
701 701
 			else {
702 702
 				if ($word != 65279) {
703
-					$texte .= '&#' . $word . ';';
703
+					$texte .= '&#'.$word.';';
704 704
 				}
705 705
 			}
706 706
 		}
@@ -728,13 +728,13 @@  discard block
 block discarded – undo
728 728
 		return chr($num);
729 729
 	}
730 730
 	if ($num < 2048) {
731
-		return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
731
+		return chr(($num >> 6) + 192).chr(($num & 63) + 128);
732 732
 	}
733 733
 	if ($num < 65536) {
734
-		return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
734
+		return chr(($num >> 12) + 224).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
735 735
 	}
736 736
 	if ($num < 1114112) {
737
-		return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
737
+		return chr(($num >> 18) + 240).chr((($num >> 12) & 63) + 128).chr((($num >> 6) & 63) + 128).chr(($num & 63) + 128);
738 738
 	}
739 739
 
740 740
 	return '';
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 	while (preg_match(',&#0*([0-9]+);,S', $texte, $regs) and !isset($vu[$regs[1]])) {
802 802
 		$num = $regs[1];
803 803
 		$vu[$num] = true;
804
-		$s = '\u' . sprintf('%04x', $num);
804
+		$s = '\u'.sprintf('%04x', $num);
805 805
 		$texte = str_replace($regs[0], $s, $texte);
806 806
 	}
807 807
 
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
  **/
819 819
 function javascript_to_unicode($texte) {
820 820
 	while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) {
821
-		$texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte);
821
+		$texte = str_replace($regs[0], '&#'.hexdec($regs[1]).';', $texte);
822 822
 	}
823 823
 
824 824
 	return $texte;
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 		return $texte;
864 864
 	}
865 865
 
866
-	$table_translit = 'translit' . $complexe;
866
+	$table_translit = 'translit'.$complexe;
867 867
 
868 868
 	// 2. Translitterer grace a la table predefinie
869 869
 	if (!isset($trans[$complexe])) {
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 	if ($chiffres) {
925 925
 		$texte = preg_replace_callback(
926 926
 			"/[aeiuoyd]['`?~.^+(-]{1,2}/S",
927
-			function ($m) {
927
+			function($m) {
928 928
 			return translitteration_chiffree($m[0]);
929 929
 			},
930 930
 			$texte
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
  *    true s'il a un BOM
957 957
  **/
958 958
 function bom_utf8($texte) {
959
-	return (substr($texte, 0, 3) == chr(0xEF) . chr(0xBB) . chr(0xBF));
959
+	return (substr($texte, 0, 3) == chr(0xEF).chr(0xBB).chr(0xBF));
960 960
 }
961 961
 
962 962
 /**
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
 		// on prend n fois la longueur desiree, pour etre surs d'avoir tout
1153 1153
 		// (un caractere utf-8 prenant au maximum n bytes)
1154 1154
 		$n = 0;
1155
-		while (preg_match(',[\x80-\xBF]{' . (++$n) . '},', $c)) {
1155
+		while (preg_match(',[\x80-\xBF]{'.(++$n).'},', $c)) {
1156 1156
 			;
1157 1157
 		}
1158 1158
 		$c = substr($c, 0, $n * $length);
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 
1187 1187
 	$lettre1 = mb_strtoupper(spip_substr($c, 0, 1));
1188 1188
 
1189
-	return $lettre1 . spip_substr($c, 1);
1189
+	return $lettre1.spip_substr($c, 1);
1190 1190
 }
1191 1191
 
1192 1192
 /**
Please login to merge, or discard this patch.
ecrire/inc/presentation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 	];
45 45
 	$style_titre_mapping = ['couleur' => 'topper', 'trait-couleur' => 'section'];
46 46
 	$c = isset($style_mapping[$style]) ? $style_mapping[$style] : 'simple';
47
-	$class = $c . ($class ? " $class" : '');
47
+	$class = $c.($class ? " $class" : '');
48 48
 	if (!$padding) {
49
-		$class .= ($class ? ' ' : '') . 'no-padding';
49
+		$class .= ($class ? ' ' : '').'no-padding';
50 50
 	}
51 51
 
52 52
 	//($id?"id='$id' ":"")
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 		if ($fonction) {
62 62
 			// 2 images pour composer l'icone : le fond (article) en background,
63 63
 			// la fonction (new) en image
64
-			$icone = http_img_pack($fonction, '', "class='cadre-icone' width='$size' height='$size'\n" .
64
+			$icone = http_img_pack($fonction, '', "class='cadre-icone' width='$size' height='$size'\n".
65 65
 				http_style_background($fond, 'no-repeat center center', $size));
66 66
 		} else {
67 67
 			$icone = http_img_pack($fond, '', "class='cadre-icone' width='$size' height='$size'");
68 68
 		}
69
-		$titre = $icone . $titre;
69
+		$titre = $icone.$titre;
70 70
 	}
71 71
 
72 72
 	return boite_ouvrir($titre, $class, isset($style_titre_mapping[$style]) ? $style_titre_mapping[$style] : '', $id);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	$titre,
181 181
 	$ze_logo = ''
182 182
 ) {
183
-	return "<h1 class = 'grostitre'>" . $ze_logo . ' ' . typo($titre) . "</h1>\n";
183
+	return "<h1 class = 'grostitre'>".$ze_logo.' '.typo($titre)."</h1>\n";
184 184
 }
185 185
 
186 186
 // La boite des raccourcis
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 // https://code.spip.net/@bloc_des_raccourcis
189 189
 function bloc_des_raccourcis($bloc) {
190 190
 	return creer_colonne_droite()
191
-	. boite_ouvrir(_T('titre_cadre_raccourcis'), 'raccourcis') . $bloc . boite_fermer();
191
+	. boite_ouvrir(_T('titre_cadre_raccourcis'), 'raccourcis').$bloc.boite_fermer();
192 192
 }
193 193
 
194 194
 //
Please login to merge, or discard this patch.
ecrire/inc/prepare_recherche.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
 	$where_resultat_recent = sql_date_proche('maj', (0 - ($delai_fraicheur + 100)), ' SECOND');
83 83
 	if (!isset($cache[$serveur][$table][$recherche])) {
84 84
 		$hash_serv = ($serveur ? substr(md5($serveur), 0, 16) : '');
85
-		$hash = substr(md5($recherche . $table), 0, 16);
86
-		$where = "(resultats.recherche='$hash' AND resultats.table_objet=" . sql_quote($table) . " AND resultats.serveur='$hash_serv')";
85
+		$hash = substr(md5($recherche.$table), 0, 16);
86
+		$where = "(resultats.recherche='$hash' AND resultats.table_objet=".sql_quote($table)." AND resultats.serveur='$hash_serv')";
87 87
 		$row = sql_fetsel(
88 88
 			'recherche',
89 89
 			'spip_resultats AS resultats',
90
-			$where . " AND $where_resultat_recent",
90
+			$where." AND $where_resultat_recent",
91 91
 			'',
92 92
 			'',
93 93
 			'0,1'
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		}
197 197
 
198 198
 		foreach ($listes_ids as $p => $ids) {
199
-			$select .= "+$p*(" .
199
+			$select .= "+$p*(".
200 200
 				sql_in("$table.$primary", $ids, '', $serveur)
201 201
 				. ') ';
202 202
 		}
Please login to merge, or discard this patch.
ecrire/inc/exporter_csv.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	$champ = preg_replace(',[\s]+,ms', ' ', $champ);
39 39
 	$champ = str_replace('"', '""', $champ);
40 40
 
41
-	return '"' . $champ . '"';
41
+	return '"'.$champ.'"';
42 42
 }
43 43
 
44 44
 /**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	if ($callback) {
59 59
 		$ligne = call_user_func($callback, $nb, $ligne, $delim, $importer_charset);
60 60
 	}
61
-	$output = join($delim, array_map('exporter_csv_champ', $ligne)) . "\r\n";
61
+	$output = join($delim, array_map('exporter_csv_champ', $ligne))."\r\n";
62 62
 	if ($importer_charset) {
63 63
 		$output = str_replace('’', '\'', $output);
64 64
 		$output = unicode2charset(html2unicode(charset2unicode($output)), $importer_charset);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		$fichier = 'php://output';
176 176
 	}
177 177
 	else {
178
-	$fichier = sous_repertoire(_DIR_CACHE, 'export') . $filename;
178
+	$fichier = sous_repertoire(_DIR_CACHE, 'export').$filename;
179 179
 	}
180 180
 
181 181
 	$fp = fopen($fichier, 'w');
Please login to merge, or discard this patch.
ecrire/inc/rechercher.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	if (substr($recherche, 0, 1) == '/' and substr($recherche, -1, 1) == '/' and strlen($recherche) > 2) {
101 101
 		// c'est une preg
102 102
 		$recherche_trans = translitteration($recherche);
103
-		$preg = $recherche_trans . $options['preg_flags'];
103
+		$preg = $recherche_trans.$options['preg_flags'];
104 104
 		$is_preg = true;
105 105
 	} else {
106 106
 		// s'il y a plusieurs mots il faut les chercher tous : oblige REGEXP,
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 			}
121 121
 		}
122 122
 
123
-		if (preg_match(',\s+,' . $u, $recherche_mod)) {
123
+		if (preg_match(',\s+,'.$u, $recherche_mod)) {
124 124
 			$is_preg = true;
125 125
 
126 126
 			$recherche_inter = '|';
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			foreach ($recherche_mots as $mot) {
131 131
 				if (strlen($mot) >= $min_long) {
132 132
 					// echapper les caracteres de regexp qui sont eventuellement dans la recherche
133
-					$recherche_inter .= preg_quote($mot) . ' ';
133
+					$recherche_inter .= preg_quote($mot).' ';
134 134
 					$petits_mots = false;
135 135
 				}
136 136
 			}
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
 
139 139
 			// mais on cherche quand même l'expression complète, même si elle
140 140
 			// comporte des mots de moins de quatre lettres
141
-			$recherche = trim(preg_replace(',\s+,' . $u, '|', $recherche_inter), '|');
141
+			$recherche = trim(preg_replace(',\s+,'.$u, '|', $recherche_inter), '|');
142 142
 			if (!$recherche or $petits_mots) {
143 143
 				$recherche = preg_quote($recherche_org);
144 144
 			}
145 145
 			$recherche_trans = translitteration($recherche);
146 146
 		}
147 147
 
148
-		$preg = '/' . str_replace('/', '\\/', $recherche_trans) . '/' . $options['preg_flags'];
148
+		$preg = '/'.str_replace('/', '\\/', $recherche_trans).'/'.$options['preg_flags'];
149 149
 	}
150 150
 
151 151
 	// Si la chaine est inactive, on va utiliser LIKE pour aller plus vite
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 		}
186 186
 		$q = sql_quote(
187 187
 			'%'
188
-			. preg_replace(',\s+,' . $u, '%', $q)
188
+			. preg_replace(',\s+,'.$u, '%', $q)
189 189
 			. '%'
190 190
 		);
191 191
 
192
-		$preg = '/' . preg_replace(',\s+,' . $u, '.+', trim($recherche_mod)) . '/' . $options['preg_flags'];
192
+		$preg = '/'.preg_replace(',\s+,'.$u, '.+', trim($recherche_mod)).'/'.$options['preg_flags'];
193 193
 	} else {
194 194
 		$methode = 'REGEXP';
195 195
 		$q = sql_quote(trim($recherche, '/'));
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	foreach ($tables as $table => $champs) {
312 312
 		# lock via memoization, si dispo
313 313
 		if (function_exists('cache_lock')) {
314
-			cache_lock($lock = _RECHERCHE_LOCK_KEY . ' ' . $table . ' ' . $recherche);
314
+			cache_lock($lock = _RECHERCHE_LOCK_KEY.' '.$table.' '.$recherche);
315 315
 		}
316 316
 
317 317
 		spip_timer('rech');
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
 
328 328
 		spip_log(
329
-			"recherche $table ($recherche) : " . count($results[$table]) . ' resultats ' . spip_timer('rech'),
329
+			"recherche $table ($recherche) : ".count($results[$table]).' resultats '.spip_timer('rech'),
330 330
 			'recherche'
331 331
 		);
332 332
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
 	$results = recherche_en_base($recherche, $tables, $options);
363 363
 
364
-	$preg = '/' . str_replace('/', '\\/', $recherche) . '/' . $options['preg_flags'];
364
+	$preg = '/'.str_replace('/', '\\/', $recherche).'/'.$options['preg_flags'];
365 365
 
366 366
 	foreach ($results as $table => $r) {
367 367
 		$_id_table = id_table_objet($table);
Please login to merge, or discard this patch.
ecrire/inc/modifier.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 	// Appels incomplets (sans $c)
115 115
 	if (!is_array($c)) {
116
-		spip_log('erreur appel objet_modifier_champs(' . $objet . '), manque $c');
116
+		spip_log('erreur appel objet_modifier_champs('.$objet.'), manque $c');
117 117
 
118 118
 		return _T('erreur_technique_enregistrement_impossible');
119 119
 	}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 				$id_rubrique = 0;
203 203
 				if (isset($desc['field']['id_rubrique'])) {
204 204
 					$parent = ($objet == 'rubrique') ? 'id_parent' : 'id_rubrique';
205
-					$id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=" . intval($id_objet));
205
+					$id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=".intval($id_objet));
206 206
 				}
207 207
 				$instituer_langue_objet = charger_fonction('instituer_langue_objet', 'action');
208 208
 				$champs['lang'] = $instituer_langue_objet($objet, $id_objet, $id_rubrique, $changer_lang, $serveur);
@@ -224,13 +224,13 @@  discard block
 block discarded – undo
224 224
 		}
225 225
 
226 226
 		// allez on commit la modif
227
-		sql_updateq($spip_table_objet, $champs, "$id_table_objet=" . intval($id_objet), $serveur);
227
+		sql_updateq($spip_table_objet, $champs, "$id_table_objet=".intval($id_objet), $serveur);
228 228
 
229 229
 		// on verifie si elle est bien passee
230 230
 		$moof = sql_fetsel(
231 231
 			array_keys($champs),
232 232
 			$spip_table_objet,
233
-			"$id_table_objet=" . intval($id_objet),
233
+			"$id_table_objet=".intval($id_objet),
234 234
 			[],
235 235
 			[],
236 236
 			'',
@@ -266,13 +266,13 @@  discard block
 block discarded – undo
266 266
 			// c'est un cas exceptionnel
267 267
 			if (count($liste)) {
268 268
 				spip_log(
269
-					"Erreur enregistrement en base $objet/$id_objet champs :" . var_export($conflits, true),
270
-					'modifier.' . _LOG_CRITIQUE
269
+					"Erreur enregistrement en base $objet/$id_objet champs :".var_export($conflits, true),
270
+					'modifier.'._LOG_CRITIQUE
271 271
 				);
272 272
 
273 273
 				return _T(
274 274
 					'erreur_technique_enregistrement_champs',
275
-					['champs' => "<i>'" . implode("'</i>,<i>'", $liste) . "'</i>"]
275
+					['champs' => "<i>'".implode("'</i>,<i>'", $liste)."'</i>"]
276 276
 				);
277 277
 			}
278 278
 		}
@@ -312,10 +312,10 @@  discard block
 block discarded – undo
312 312
 	// message a affiner :-)
313 313
 	include_spip('inc/filtres_mini');
314 314
 	$qui = isset($GLOBALS['visiteur_session']['nom']) and $GLOBALS['visiteur_session']['nom'] ? $GLOBALS['visiteur_session']['nom'] : $GLOBALS['ip'];
315
-	journal(_L($qui . ' a &#233;dit&#233; l&#8217;' . $objet . ' ' . $id_objet . ' (' . join(
315
+	journal(_L($qui.' a &#233;dit&#233; l&#8217;'.$objet.' '.$id_objet.' ('.join(
316 316
 		'+',
317 317
 		array_diff(array_keys($champs), ['date_modif'])
318
-	) . ')'), [
318
+	).')'), [
319 319
 		'faire' => 'modifier',
320 320
 		'quoi' => $objet,
321 321
 		'id' => $id_objet
Please login to merge, or discard this patch.
ecrire/inc/svg.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		return $fichier;
57 57
 	}
58 58
 	if (!file_exists($fichier)) {
59
-		$fichier  = supprimer_timestamp($fichier);
59
+		$fichier = supprimer_timestamp($fichier);
60 60
 		if (!file_exists($fichier)) {
61 61
 			return false;
62 62
 		}
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 function svg_change_balise_svg($svg, $old_balise_svg, $attributs) {
171 171
 	$new_balise_svg = '<svg';
172 172
 	foreach ($attributs as $k => $v) {
173
-		$new_balise_svg .= " $k=\"" . entites_html($v) . '"';
173
+		$new_balise_svg .= " $k=\"".entites_html($v).'"';
174 174
 	}
175 175
 	$new_balise_svg .= '>';
176 176
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 function svg_insert_shapes($svg, $shapes, $start = true) {
190 190
 
191 191
 	if ($start === false or $start === 'end') {
192
-		$svg = str_replace('</svg>', $shapes . '</svg>', $svg);
192
+		$svg = str_replace('</svg>', $shapes.'</svg>', $svg);
193 193
 	}
194 194
 	else {
195 195
 		$p = stripos($svg, '<svg');
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
  */
211 211
 function svg_clip_in_box($svg, $x, $y, $width, $height) {
212 212
 	$rect = "<rect x=\"$x\" y=\"$y\" width=\"$width\" height=\"$height\" />";
213
-	$id = 'clip-' . substr(md5($rect . strlen($svg)), 0, 8);
213
+	$id = 'clip-'.substr(md5($rect.strlen($svg)), 0, 8);
214 214
 	$clippath = "<clipPath id=\"$id\">$rect</clipPath>";
215 215
 	$g = "<g clip-path=\"url(#$id)\">";
216
-	$svg = svg_insert_shapes($svg, $clippath . $g);
216
+	$svg = svg_insert_shapes($svg, $clippath.$g);
217 217
 	$svg = svg_insert_shapes($svg, '</g>', false);
218 218
 	return $svg;
219 219
 }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	) {
233 233
 		list($balise_svg, $attributs) = $svg_infos;
234 234
 		if (!isset($attributs['viewBox'])) {
235
-			$attributs['viewBox'] = '0 0 ' . $attributs['width'] . ' ' . $attributs['height'];
235
+			$attributs['viewBox'] = '0 0 '.$attributs['width'].' '.$attributs['height'];
236 236
 		}
237 237
 		$attributs['width'] = strval($new_width);
238 238
 		$attributs['height'] = strval($new_height);
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	else {
258 258
 		$couleur = couleur_html_to_hex($couleur);
259 259
 	}
260
-	$couleur = '#' . ltrim($couleur, '#');
260
+	$couleur = '#'.ltrim($couleur, '#');
261 261
 	return $couleur;
262 262
 }
263 263
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 function svg_couleur_to_rgb($couleur) {
270 270
 	if (strpos($couleur, 'rgb(') === 0) {
271 271
 		$c = explode(',', substr($couleur, 4));
272
-		return ['red' => intval($c[0]),'green' => intval($c[1]),'blue' => intval($c[2])];
272
+		return ['red' => intval($c[0]), 'green' => intval($c[1]), 'blue' => intval($c[2])];
273 273
 	}
274 274
 	return _couleur_hex_to_dec($couleur);
275 275
 }
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 			$background_color = svg_couleur_to_hexa($background_color);
475 475
 			if (isset($attributs['viewBox'])) {
476 476
 				$viewBox = explode(' ', $attributs['viewBox']);
477
-				$rect = '<rect x="' . $viewBox[0] . '" y="' . $viewBox[1] . '" width="' . $viewBox[2] . '" height="' . $viewBox[3] . "\" fill=\"$background_color\"/>";
477
+				$rect = '<rect x="'.$viewBox[0].'" y="'.$viewBox[1].'" width="'.$viewBox[2].'" height="'.$viewBox[3]."\" fill=\"$background_color\"/>";
478 478
 			}
479 479
 			else {
480 480
 				$rect = "<rect width=\"100%\" height=\"100%\" fill=\"$background_color\"/>";
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 			$background_color = svg_couleur_to_hexa($background_color);
505 505
 			if (isset($attributs['viewBox'])) {
506 506
 				$viewBox = explode(' ', $attributs['viewBox']);
507
-				$rect = '<rect x="' . $viewBox[0] . '" y="' . $viewBox[1] . '" width="' . $viewBox[2] . '" height="' . $viewBox[3] . "\" fill=\"$background_color\" opacity=\"$opacity\"/>";
507
+				$rect = '<rect x="'.$viewBox[0].'" y="'.$viewBox[1].'" width="'.$viewBox[2].'" height="'.$viewBox[3]."\" fill=\"$background_color\" opacity=\"$opacity\"/>";
508 508
 			}
509 509
 			else {
510 510
 				$rect = "<rect width=\"100%\" height=\"100%\" fill=\"$background_color\"/>";
@@ -529,11 +529,11 @@  discard block
 block discarded – undo
529 529
 		and $svg_infos = svg_lire_balise_svg($svg)
530 530
 	) {
531 531
 		if ($attributs) {
532
-			list($balise_svg, ) = $svg_infos;
532
+			list($balise_svg,) = $svg_infos;
533 533
 			$g = '<g';
534 534
 			foreach ($attributs as $k => $v) {
535 535
 				if (strlen($v)) {
536
-					$g .= " $k=\"" . attribut_html($v) . '"';
536
+					$g .= " $k=\"".attribut_html($v).'"';
537 537
 				}
538 538
 			}
539 539
 			if (strlen($g) > 2) {
@@ -560,11 +560,11 @@  discard block
 block discarded – undo
560 560
 		and $svg_infos = svg_lire_balise_svg($svg)
561 561
 	) {
562 562
 		if ($filter_def) {
563
-			list($balise_svg, ) = $svg_infos;
564
-			$filter_id = 'filter-' . substr(md5($filter_def . strlen($svg)), 0, 8);
563
+			list($balise_svg,) = $svg_infos;
564
+			$filter_id = 'filter-'.substr(md5($filter_def.strlen($svg)), 0, 8);
565 565
 			$filter = "<defs><filter id=\"$filter_id\">$filter_def</filter></defs>";
566 566
 			$g = "<g filter=\"url(#$filter_id)\">";
567
-			$svg = svg_insert_shapes($svg, $filter . $g);
567
+			$svg = svg_insert_shapes($svg, $filter.$g);
568 568
 			$svg = svg_insert_shapes($svg, '</g>', false);
569 569
 		}
570 570
 		return $svg;
Please login to merge, or discard this patch.