Completed
Push — master ( 190d73...9bf890 )
by cam
01:11
created
ecrire/inc/cvt_configurer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	) {
39 39
 		// Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé
40 40
 		include_spip('inc/autoriser');
41
-		if (!autoriser('configurer', '_' . substr($form, 11))) {
41
+		if (!autoriser('configurer', '_'.substr($form, 11))) {
42 42
 			return false;
43 43
 		}
44 44
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		and !charger_fonction('traiter', "formulaires/$form/", true) // sans fonction traiter()
73 73
 	) {
74 74
 		$trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']);
75
-		$flux['data'] = ['message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true];
75
+		$flux['data'] = ['message_ok' => _T('config_info_enregistree').$trace, 'editable' => true];
76 76
 	}
77 77
 
78 78
 	return $flux;
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$prefixe = $valeurs['_meta_prefixe'];
147 147
 	}
148 148
 	if (isset($valeurs['_meta_stockage'])) {
149
-		$stockage = $valeurs['_meta_stockage'] . '::';
149
+		$stockage = $valeurs['_meta_stockage'].'::';
150 150
 	}
151 151
 
152 152
 	// 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
 		and 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($casier, '/') . '/' : ''; // slash final, sinon rien
233
+	$casier = ($casier) ? rtrim($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' and 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 ($valeurs as $k => $v) {
265 265
 		if (substr($k, 0, 1) !== '_') {
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/inc/idna_convert.class.php 1 patch
Spacing   +43 added lines, -46 removed lines patch added patch discarded remove patch
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
     protected $_lcount = 19;
74 74
     protected $_vcount = 21;
75 75
     protected $_tcount = 28;
76
-    protected $_ncount = 588;   // _vcount * _tcount
76
+    protected $_ncount = 588; // _vcount * _tcount
77 77
     protected $_scount = 11172; // _lcount * _tcount * _vcount
78 78
     protected $_error = false;
79 79
     protected static $_mb_string_overload = null;
80 80
     // See {@link set_paramter()} for details of how to change the following
81 81
     // settings from within your script / application
82
-    protected $_api_encoding = 'utf8';   // Default input charset is UTF-8
83
-    protected $_allow_overlong = false;  // Overlong UTF-8 encodings are forbidden
84
-    protected $_strict_mode = false;     // Behave strict or not
85
-    protected $_idn_version = 2003;      // Can be either 2003 (old, default) or 2008
82
+    protected $_api_encoding = 'utf8'; // Default input charset is UTF-8
83
+    protected $_allow_overlong = false; // Overlong UTF-8 encodings are forbidden
84
+    protected $_strict_mode = false; // Behave strict or not
85
+    protected $_idn_version = 2003; // Can be either 2003 (old, default) or 2008
86 86
 
87 87
     /**
88 88
      * the constructor
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                             $this->_api_encoding = $v;
141 141
                             break;
142 142
                         default:
143
-                            $this->_error('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k);
143
+                            $this->_error('Set Parameter: Unknown parameter '.$v.' for option '.$k);
144 144
                             return false;
145 145
                     }
146 146
                     break;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                     if (in_array($v, array('2003', '2008'))) {
155 155
                         $this->_idn_version = $v;
156 156
                     } else {
157
-                        $this->_error('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k);
157
+                        $this->_error('Set Parameter: Unknown parameter '.$v.' for option '.$k);
158 158
                     }
159 159
                     break;
160 160
                 case 'encode_german_sz': // Deprecated
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                     }
166 166
                     break;
167 167
                 default:
168
-                    $this->_error('Set Parameter: Unknown option ' . $k);
168
+                    $this->_error('Set Parameter: Unknown option '.$k);
169 169
                     return false;
170 170
             }
171 171
         }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 case 'ucs4_array':
189 189
                     break;
190 190
                 default:
191
-                    $this->_error('Unknown encoding ' . $one_time_encoding);
191
+                    $this->_error('Unknown encoding '.$one_time_encoding);
192 192
                     return false;
193 193
             }
194 194
         }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             [$email_pref, $input] = explode('@', $input, 2);
207 207
             $arr = explode('.', $input);
208 208
             foreach ($arr as $k => $v) {
209
-                if (preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $v)) {
209
+                if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) {
210 210
                     $conv = $this->_decode($v);
211 211
                     if ($conv) {
212 212
                         $arr[$k] = $conv;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             $input = join('.', $arr);
217 217
             $arr = explode('.', $email_pref);
218 218
             foreach ($arr as $k => $v) {
219
-                if (preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $v)) {
219
+                if (preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $v)) {
220 220
                     $conv = $this->_decode($v);
221 221
                     if ($conv) {
222 222
                         $arr[$k] = $conv;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                 }
225 225
             }
226 226
             $email_pref = join('.', $arr);
227
-            $return = $email_pref . '@' . $input;
227
+            $return = $email_pref.'@'.$input;
228 228
         } elseif (preg_match('![:\./]!', $input)) { // Or a complete domain name (with or without paths / parameters)
229 229
             // No no in strict mode
230 230
             if ($this->_strict_mode) {
@@ -241,13 +241,13 @@  discard block
 block discarded – undo
241 241
                     }
242 242
                 }
243 243
                 $parsed['host'] = join('.', $arr);
244
-                $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'] . (strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')).
245
-                        (empty($parsed['user']) ? '' : $parsed['user'] . (empty($parsed['pass']) ? '' : ':' . $parsed['pass']) . '@').
244
+                $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'].(strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')).
245
+                        (empty($parsed['user']) ? '' : $parsed['user'].(empty($parsed['pass']) ? '' : ':'.$parsed['pass']).'@').
246 246
                         $parsed['host'].
247
-                        (empty($parsed['port']) ? '' : ':' . $parsed['port']).
247
+                        (empty($parsed['port']) ? '' : ':'.$parsed['port']).
248 248
                         (empty($parsed['path']) ? '' : $parsed['path']).
249
-                        (empty($parsed['query']) ? '' : '?' . $parsed['query']).
250
-                        (empty($parsed['fragment']) ? '' : '#' . $parsed['fragment']);
249
+                        (empty($parsed['query']) ? '' : '?'.$parsed['query']).
250
+                        (empty($parsed['fragment']) ? '' : '#'.$parsed['fragment']);
251 251
             } else { // parse_url seems to have failed, try without it
252 252
                 $arr = explode('.', $input);
253 253
                 foreach ($arr as $k => $v) {
@@ -265,8 +265,8 @@  discard block
 block discarded – undo
265 265
         // The output is UTF-8 by default, other output formats need conversion here
266 266
         // If one time encoding is given, use this, else the objects property
267 267
         switch ($one_time_encoding ?: $this->_api_encoding) {
268
-            case 'utf8':        return $return; // break;
269
-            case 'ucs4_string': return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return));  // break;
268
+            case 'utf8' : return $return; // break;
269
+            case 'ucs4_string': return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); // break;
270 270
             case 'ucs4_array':  return $this->_utf8_to_ucs4($return); // break;
271 271
             default:            $this->_error('Unsupported output format'); return false;
272 272
         }
@@ -283,15 +283,14 @@  discard block
 block discarded – undo
283 283
         // Forcing conversion of input to UCS4 array
284 284
         // If one time encoding is given, use this, else the objects property
285 285
         switch ($one_time_encoding ?: $this->_api_encoding) {
286
-            case 'utf8':
287
-                $decoded = $this->_utf8_to_ucs4($decoded);
286
+            case 'utf8' : $decoded = $this->_utf8_to_ucs4($decoded);
288 287
                 break;
289 288
             case 'ucs4_string':
290 289
                 $decoded = $this->_ucs4_string_to_ucs4($decoded);
291 290
             case 'ucs4_array':
292 291
                 break;
293 292
             default:
294
-                $this->_error('Unsupported input format: ' . ($one_time_encoding ?: $this->_api_encoding));
293
+                $this->_error('Unsupported input format: '.($one_time_encoding ?: $this->_api_encoding));
295 294
                 return false;
296 295
         }
297 296
 
@@ -380,13 +379,13 @@  discard block
 block discarded – undo
380 379
             }
381 380
         }
382 381
         $parsed['host'] = join('.', $arr);
383
-        $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'] . (strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')).
384
-                (empty($parsed['user']) ? '' : $parsed['user'] . (empty($parsed['pass']) ? '' : ':' . $parsed['pass']) . '@').
382
+        $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'].(strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')).
383
+                (empty($parsed['user']) ? '' : $parsed['user'].(empty($parsed['pass']) ? '' : ':'.$parsed['pass']).'@').
385 384
                 $parsed['host'].
386
-                (empty($parsed['port']) ? '' : ':' . $parsed['port']).
385
+                (empty($parsed['port']) ? '' : ':'.$parsed['port']).
387 386
                 (empty($parsed['path']) ? '' : $parsed['path']).
388
-                (empty($parsed['query']) ? '' : '?' . $parsed['query']).
389
-                (empty($parsed['fragment']) ? '' : '#' . $parsed['fragment']);
387
+                (empty($parsed['query']) ? '' : '?'.$parsed['query']).
388
+                (empty($parsed['fragment']) ? '' : '#'.$parsed['fragment']);
390 389
         return $return;
391 390
     }
392 391
 
@@ -409,11 +408,11 @@  discard block
 block discarded – undo
409 408
     {
410 409
         $decoded = array();
411 410
         // find the Punycode prefix
412
-        if (!preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $encoded)) {
411
+        if (!preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $encoded)) {
413 412
             $this->_error('This is not a punycode string');
414 413
             return false;
415 414
         }
416
-        $encode_test = preg_replace('!^' . preg_quote($this->_punycode_prefix, '!') . '!', '', $encoded);
415
+        $encode_test = preg_replace('!^'.preg_quote($this->_punycode_prefix, '!').'!', '', $encoded);
417 416
         // If nothing left after removing the prefix, it is hopeless
418 417
         if (!$encode_test) {
419 418
             $this->_error('The given encoded string was empty');
@@ -439,8 +438,7 @@  discard block
 block discarded – undo
439 438
             for ($old_idx = $idx, $w = 1, $k = $this->_base; 1; $k += $this->_base) {
440 439
                 $digit = $this->_decode_digit($encoded[$enco_idx++]);
441 440
                 $idx += $digit * $w;
442
-                $t = ($k <= $bias) ? $this->_tmin :
443
-                        (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias));
441
+                $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias));
444 442
                 if ($digit < $t) {
445 443
                     break;
446 444
                 }
@@ -513,7 +511,7 @@  discard block
 block discarded – undo
513 511
             return $encoded; // All codepoints were basic ones
514 512
         }
515 513
         // Start with the prefix; copy it to output
516
-        $encoded = $this->_punycode_prefix . $encoded;
514
+        $encoded = $this->_punycode_prefix.$encoded;
517 515
         // If we have basic code points in output, add an hyphen to the end
518 516
         if ($codecount) {
519 517
             $encoded .= '-';
@@ -540,8 +538,7 @@  discard block
 block discarded – undo
540 538
                     $delta++;
541 539
                 } elseif ($decoded[$i] == $cur_code) {
542 540
                     for ($q = $delta, $k = $this->_base; 1; $k += $this->_base) {
543
-                        $t = ($k <= $bias) ? $this->_tmin :
544
-                                (($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias);
541
+                        $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias);
545 542
                         if ($q < $t) {
546 543
                             break;
547 544
                         }
@@ -628,12 +625,12 @@  discard block
 block discarded – undo
628 625
             }
629 626
             // Try to find prohibited input
630 627
             if (in_array($v, self::$NP['prohibit']) || in_array($v, self::$NP['general_prohibited'])) {
631
-                $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v));
628
+                $this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v));
632 629
                 return false;
633 630
             }
634 631
             foreach (self::$NP['prohibit_ranges'] as $range) {
635 632
                 if ($range[0] <= $v && $v <= $range[1]) {
636
-                    $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v));
633
+                    $this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v));
637 634
                     return false;
638 635
                 }
639 636
             }
@@ -871,7 +868,7 @@  discard block
 block discarded – undo
871 868
                 $output[$out_len] = $v;
872 869
                 ++$out_len;
873 870
                 if ('add' == $mode) {
874
-                    $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k);
871
+                    $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte '.$k);
875 872
                     return false;
876 873
                 }
877 874
                 continue;
@@ -896,7 +893,7 @@  discard block
 block discarded – undo
896 893
                     $next_byte = 4;
897 894
                     $v = ($v - 252) << 30;
898 895
                 } else {
899
-                    $this->_error('This might be UTF-8, but I don\'t understand it at byte ' . $k);
896
+                    $this->_error('This might be UTF-8, but I don\'t understand it at byte '.$k);
900 897
                     return false;
901 898
                 }
902 899
                 if ('add' == $mode) {
@@ -909,7 +906,7 @@  discard block
 block discarded – undo
909 906
                 if (!$this->_allow_overlong && $test == 'range') {
910 907
                     $test = 'none';
911 908
                     if (($v < 0xA0 && $start_byte == 0xE0) || ($v < 0x90 && $start_byte == 0xF0) || ($v > 0x8F && $start_byte == 0xF4)) {
912
-                        $this->_error('Bogus UTF-8 character detected (out of legal range) at byte ' . $k);
909
+                        $this->_error('Bogus UTF-8 character detected (out of legal range) at byte '.$k);
913 910
                         return false;
914 911
                     }
915 912
                 }
@@ -918,7 +915,7 @@  discard block
 block discarded – undo
918 915
                     $output[($out_len - 1)] += $v;
919 916
                     --$next_byte;
920 917
                 } else {
921
-                    $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k);
918
+                    $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte '.$k);
922 919
                     return false;
923 920
                 }
924 921
                 if ($next_byte < 0) {
@@ -942,13 +939,13 @@  discard block
 block discarded – undo
942 939
             if ($v < 128) { // 7bit are transferred literally
943 940
                 $output .= chr($v);
944 941
             } elseif ($v < (1 << 11)) { // 2 bytes
945
-                $output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63));
942
+                $output .= chr(192 + ($v >> 6)).chr(128 + ($v & 63));
946 943
             } elseif ($v < (1 << 16)) { // 3 bytes
947
-                $output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
944
+                $output .= chr(224 + ($v >> 12)).chr(128 + (($v >> 6) & 63)).chr(128 + ($v & 63));
948 945
             } elseif ($v < (1 << 21)) { // 4 bytes
949
-                $output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
946
+                $output .= chr(240 + ($v >> 18)).chr(128 + (($v >> 12) & 63)).chr(128 + (($v >> 6) & 63)).chr(128 + ($v & 63));
950 947
             } else {
951
-                $this->_error('Conversion from UCS-4 to UTF-8 failed: malformed input at byte ' . $k);
948
+                $this->_error('Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k);
952 949
                 return false;
953 950
             }
954 951
         }
@@ -967,7 +964,7 @@  discard block
 block discarded – undo
967 964
         // Take array values and split output to 4 bytes per value
968 965
         // The bit mask is 255, which reads &11111111
969 966
         foreach ($input as $v) {
970
-            $output .= chr(($v >> 24) & 255) . chr(($v >> 16) & 255) . chr(($v >> 8) & 255) . chr($v & 255);
967
+            $output .= chr(($v >> 24) & 255).chr(($v >> 16) & 255).chr(($v >> 8) & 255).chr($v & 255);
971 968
         }
972 969
         return $output;
973 970
     }
@@ -997,7 +994,7 @@  discard block
 block discarded – undo
997 994
                 $out_len++;
998 995
                 $output[$out_len] = 0;
999 996
             }
1000
-            $output[$out_len] += ord($input[$i]) << (8 * (3 - ($i % 4) ) );
997
+            $output[$out_len] += ord($input[$i]) << (8 * (3 - ($i % 4)));
1001 998
         }
1002 999
         return $output;
1003 1000
     }
Please login to merge, or discard this patch.
ecrire/inc/filtres_ecrire.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	if ($objet == 'rubrique') {
115 115
 		// si c'est une rubrique-secteur contenant des breves, demander la
116 116
 		// confirmation du deplacement
117
-		$contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . intval($id_objet));
117
+		$contient_breves = sql_countsel('spip_breves', 'id_rubrique='.intval($id_objet));
118 118
 
119 119
 		if ($contient_breves > 0) {
120 120
 			$scb = ($contient_breves > 1 ? 's' : '');
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 			);
128 128
 			$confirm .= "\n<div class='confirmer_deplacement verdana2'>"
129 129
 				. "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>"
130
-				. $scb .
130
+				. $scb.
131 131
 				"</label></div></div>\n";
132 132
 		} else {
133 133
 			$confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n";
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 	$form .= $confirm;
137 137
 	if ($actionable) {
138 138
 		if (strpos($form, '<select') !== false) {
139
-			$form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
140
-				. '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>'
139
+			$form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>"
140
+				. '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>'
141 141
 				. '</div>';
142 142
 		}
143
-		$form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form;
143
+		$form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form;
144 144
 		if ($action = charger_fonction("editer_$objet", 'action', true)) {
145 145
 			$form = generer_action_auteur(
146 146
 				"editer_$objet",
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
 	include_spip('inc/presentation');
168 168
 
169
-	return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur();
169
+	return debut_cadre_couleur($logo, true, '', $titre).$form.fin_cadre_couleur();
170 170
 }
171 171
 
172 172
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 	if ($statut == 'nouveau') {
243 243
 		if ($attente) {
244 244
 			$statut = $attente;
245
-			$plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')';
245
+			$plus = ' ('._T('info_statut_auteur_a_confirmer').')';
246 246
 		} else {
247 247
 			return _T('info_statut_auteur_a_confirmer');
248 248
 		}
@@ -255,16 +255,16 @@  discard block
 block discarded – undo
255 255
 		'5poubelle' => _T('texte_statut_poubelle'), // bouh
256 256
 	];
257 257
 	if (isset($recom[$statut])) {
258
-		return $recom[$statut] . $plus;
258
+		return $recom[$statut].$plus;
259 259
 	}
260 260
 
261 261
 	// retrouver directement par le statut sinon
262 262
 	if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) {
263 263
 		if (isset($recom[$t])) {
264
-			return $recom[$t] . $plus;
264
+			return $recom[$t].$plus;
265 265
 		}
266 266
 
267
-		return _T($t) . $plus;
267
+		return _T($t).$plus;
268 268
 	}
269 269
 
270 270
 	// si on a pas reussi a le traduire, retournons la chaine telle quelle
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 	if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) {
389 389
 		$in = !(is_countable($GLOBALS['connect_id_rubrique']) ? count($GLOBALS['connect_id_rubrique']) : 0)
390 390
 			? ''
391
-			: (' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
391
+			: (' AND '.sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
392 392
 
393 393
 		// on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement
394 394
 		if ($objet == 'rubrique') {
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 		return '';
423 423
 	}
424 424
 
425
-	return propre('[->' . $virtuel . ']');
425
+	return propre('[->'.$virtuel.']');
426 426
 }
427 427
 
428 428
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 	$args = param_low_sec($op, $args, $lang, 'rss');
451 451
 	$url = generer_url_public('rss', $args);
452 452
 
453
-	return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>";
453
+	return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>";
454 454
 }
455 455
 
456 456
 
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 	);
527 527
 
528 528
 	if ($alertes = array_filter($alertes)) {
529
-		return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" .
529
+		return "<div class='wrap-messages-alertes'><div class='messages-alertes'>".
530 530
 		join(' | ', $alertes)
531 531
 		. '</div></div>';
532 532
 	}
@@ -560,13 +560,13 @@  discard block
 block discarded – undo
560 560
  */
561 561
 function afficher_plus_info($lien, $titre = '+', $titre_lien = '') {
562 562
 	$titre = attribut_html($titre);
563
-	$icone = "\n<a href='$lien' title='$titre' class='plus_info'>" .
564
-		http_img_pack('information-16.png', $titre) . '</a>';
563
+	$icone = "\n<a href='$lien' title='$titre' class='plus_info'>".
564
+		http_img_pack('information-16.png', $titre).'</a>';
565 565
 
566 566
 	if (!$titre_lien) {
567 567
 		return $icone;
568 568
 	} else {
569
-		return $icone . "\n<a href='$lien'>$titre_lien</a>";
569
+		return $icone."\n<a href='$lien'>$titre_lien</a>";
570 570
 	}
571 571
 }
572 572
 
Please login to merge, or discard this patch.
ecrire/inc/plugin.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 /** l'adresse du repertoire de telechargement et de decompactage des plugins */
24 24
 if (!defined('_DIR_PLUGINS_AUTO')) {
25
-	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/');
25
+	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/');
26 26
 }
27 27
 
28 28
 #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins.
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 				if ($dir) {
374 374
 					$dir .= '/';
375 375
 				}
376
-				$dir .= 'procure:' . $procure['nom'];
376
+				$dir .= 'procure:'.$procure['nom'];
377 377
 
378 378
 				$procure['etat'] = '?';
379 379
 				$procure['dir_type'] = $resume['dir_type'];
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 		$plug = $resume['dir'];
558 558
 		$k = $infos[$dir_type][$plug];
559 559
 
560
-		$plug = constant($dir_type) . $plug;
560
+		$plug = constant($dir_type).$plug;
561 561
 		if (!isset($msg[$p])) {
562 562
 			if (isset($resume['erreur']) and $resume['erreur']) {
563 563
 				$msg[$p] = [$resume['erreur']];
@@ -600,10 +600,10 @@  discard block
 block discarded – undo
600 600
 		$list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation'];
601 601
 	} elseif (!$raw) {
602 602
 		foreach ($list as $plug => $msg) {
603
-			$list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug])
604
-				. '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>';
603
+			$list[$plug] = '<li>'._T('plugin_impossible_activer', ['plugin' => $plug])
604
+				. '<ul><li>'.implode('</li><li>', $msg).'</li></ul></li>';
605 605
 		}
606
-		$list = '<ul>' . join("\n", $list) . '</ul>';
606
+		$list = '<ul>'.join("\n", $list).'</ul>';
607 607
 	}
608 608
 	if ($raz) {
609 609
 		effacer_meta('plugin_erreur_activation');
@@ -717,13 +717,13 @@  discard block
 block discarded – undo
717 717
 			if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
718 718
 				return _T("plugin_${balise}_${type}", [
719 719
 					'plugin' => $nom,
720
-					'version' => ' &ge; ' . $minimum
720
+					'version' => ' &ge; '.$minimum
721 721
 				]);
722 722
 			}
723 723
 			if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
724 724
 				return _T("plugin_${balise}_${type}", [
725 725
 					'plugin' => $nom,
726
-					'version' => ' &gt; ' . $minimum
726
+					'version' => ' &gt; '.$minimum
727 727
 				]);
728 728
 			}
729 729
 		}
@@ -732,13 +732,13 @@  discard block
 block discarded – undo
732 732
 			if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
733 733
 				return _T("plugin_${balise}_${type}", [
734 734
 					'plugin' => $nom,
735
-					'version' => ' &le; ' . $maximum
735
+					'version' => ' &le; '.$maximum
736 736
 				]);
737 737
 			}
738 738
 			if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
739 739
 				return _T("plugin_${balise}_plugin", [
740 740
 					'plugin' => $nom,
741
-					'version' => ' &lt; ' . $maximum
741
+					'version' => ' &lt; '.$maximum
742 742
 				]);
743 743
 			}
744 744
 		}
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 		include_spip('inc/charger_plugin');
758 758
 		$url = '<br />'	. bouton_telechargement_plugin($url, 'lib');
759 759
 	}*/
760
-	return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>";
760
+	return _T('plugin_necessite_lib', ['lib' => $lib])." <a href='$url'>$url</a>";
761 761
 }
762 762
 
763 763
 
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 	foreach ($plugin_valides as $p => $resume) {
858 858
 		// Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
859 859
 		if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') {
860
-			$header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : '');
860
+			$header[] = $p.($resume['version'] ? '('.$resume['version'].')' : '');
861 861
 		}
862 862
 		if ($resume['dir']) {
863 863
 			foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
@@ -882,11 +882,11 @@  discard block
 block discarded – undo
882 882
 	$header = strtolower(implode(',', $header));
883 883
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
884 884
 		ecrire_fichier(
885
-			_DIR_VAR . 'config.txt',
886
-			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header
885
+			_DIR_VAR.'config.txt',
886
+			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP').' '.$GLOBALS['spip_version_affichee'].' @ www.spip.net + '.$header
887 887
 		);
888 888
 	} else {
889
-		@unlink(_DIR_VAR . 'config.txt');
889
+		@unlink(_DIR_VAR.'config.txt');
890 890
 	}
891 891
 	// generer charger_plugins_chemin.php
892 892
 	plugins_precompile_chemin($plugin_valides, $ordre);
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
 			// definir le plugin, donc le path avant l'include du fichier options
941 941
 			// permet de faire des include_spip pour attraper un inc_ du plugin
942 942
 
943
-			$dir = $dir_type . ".'" . $plug . "/'";
943
+			$dir = $dir_type.".'".$plug."/'";
944 944
 
945 945
 			$prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
946 946
 			if (
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
 				if (!$info['chemin']) {
952 952
 					$chemins['public'][] = "_DIR_PLUGIN_$prefix";
953 953
 					$chemins['prive'][] = "_DIR_PLUGIN_$prefix";
954
-					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
954
+					if (is_dir(constant($dir_type).$plug.'/squelettes/')) {
955 955
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
956 956
 					}
957 957
 				}
@@ -972,13 +972,13 @@  discard block
 block discarded – undo
972 972
 								$dir = '';
973 973
 							}
974 974
 							if (strlen($dir)) {
975
-								$dir = rtrim($dir, '/') . '/';
975
+								$dir = rtrim($dir, '/').'/';
976 976
 							}
977 977
 							if (!isset($chemin['type']) or $chemin['type'] == 'public') {
978
-								$chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
978
+								$chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
979 979
 							}
980 980
 							if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
981
-								$chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
981
+								$chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
982 982
 							}
983 983
 						}
984 984
 					}
@@ -987,11 +987,11 @@  discard block
 block discarded – undo
987 987
 		}
988 988
 	}
989 989
 	if (count($chemins['public']) or count($chemins['prive'])) {
990
-		$contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode(
990
+		$contenu .= 'if (_DIR_RESTREINT) _chemin(['.implode(
991 991
 			',',
992 992
 			array_reverse($chemins['public'])
993
-		) . "]);\n"
994
-			. 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n";
993
+		)."]);\n"
994
+			. 'else _chemin(['.implode(',', array_reverse($chemins['prive']))."]);\n";
995 995
 	}
996 996
 
997 997
 	ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 					and strpos($dir, ':') === false // exclure le cas des procure:
1041 1041
 					and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1042 1042
 				) {
1043
-					if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) {
1043
+					if (is_readable("$dir$plug/".($file = $info['prefix'].'_'.$charge.'.php'))) {
1044 1044
 						$info[$charge] = [$file];
1045 1045
 					}
1046 1046
 				}
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
 						) {
1058 1058
 							unset($info[$charge][$k]);
1059 1059
 						} else {
1060
-							$_file = $root_dir_type . ".'$plug/$file'";
1060
+							$_file = $root_dir_type.".'$plug/$file'";
1061 1061
 							$contenu[$charge] .= "include_once_check($_file);\n";
1062 1062
 						}
1063 1063
 					}
@@ -1067,7 +1067,7 @@  discard block
 block discarded – undo
1067 1067
 		}
1068 1068
 	}
1069 1069
 
1070
-	$contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1070
+	$contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options'];
1071 1071
 	$contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons)
1072 1072
 		. plugin_ongletbouton('onglets_plugins', $onglets);
1073 1073
 
@@ -1102,12 +1102,12 @@  discard block
 block discarded – undo
1102 1102
 		define("_UPDATED_$nom", $val);
1103 1103
 		define("_UPDATED_md5_$nom", $md5);
1104 1104
 	}
1105
-	$val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1105
+	$val = "unserialize('".str_replace("'", "\'", $val)."')";
1106 1106
 
1107 1107
 	return
1108 1108
 		"if (!function_exists('$nom')) {\n"
1109 1109
 		. "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1110
-		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1110
+		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n"
1111 1111
 		. "}\n";
1112 1112
 }
1113 1113
 
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
 	if (@is_readable(_CACHE_PLUGINS_OPT)) {
1131 1131
 		include_once(_CACHE_PLUGINS_OPT);
1132 1132
 	} else {
1133
-		spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT);
1133
+		spip_log('pipelines desactives: impossible de produire '._CACHE_PLUGINS_OPT);
1134 1134
 	}
1135 1135
 }
1136 1136
 
@@ -1167,7 +1167,7 @@  discard block
 block discarded – undo
1167 1167
 			$dir_type = $plugin_valides[$p]['dir_type'];
1168 1168
 			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1169 1169
 			$plug = $plugin_valides[$p]['dir'];
1170
-			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_');
1170
+			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'].'_');
1171 1171
 			if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1172 1172
 				foreach ($info['pipeline'] as $pipe) {
1173 1173
 					$nom = $pipe['nom'];
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 						}
1202 1202
 						if (isset($pipe['inclure'])) {
1203 1203
 							$GLOBALS['spip_matrice']["$prefix$action"] =
1204
-								"$root_dir_type:$plug/" . $pipe['inclure'];
1204
+								"$root_dir_type:$plug/".$pipe['inclure'];
1205 1205
 						}
1206 1206
 					}
1207 1207
 				}
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
 					$prepend_code['taches_generales_cron'] = '';
1212 1212
 				}
1213 1213
 				foreach ($info['genie'] as $genie) {
1214
-					$nom = $prefix . $genie['nom'];
1214
+					$nom = $prefix.$genie['nom'];
1215 1215
 					$periode = max(60, intval($genie['periode']));
1216 1216
 					if (charger_fonction($nom, 'genie', true)) {
1217 1217
 						$prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
@@ -1229,13 +1229,13 @@  discard block
 block discarded – undo
1229 1229
 				}
1230 1230
 				foreach ($info['style'] as $style) {
1231 1231
 					if (isset($style['path']) and $style['path']) {
1232
-						$code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1232
+						$code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) ";
1233 1233
 					} else {
1234
-						$code = "if (\$f='" . addslashes($style['url']) . "') ";
1234
+						$code = "if (\$f='".addslashes($style['url'])."') ";
1235 1235
 					}
1236 1236
 					$code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1237 1237
 					if (isset($style['media']) and strlen($style['media'])) {
1238
-						$code .= ' media="' . addslashes($style['media']) . '"';
1238
+						$code .= ' media="'.addslashes($style['media']).'"';
1239 1239
 					}
1240 1240
 					$code .= "/>';\n";
1241 1241
 					if ($style['type'] != 'prive') {
@@ -1255,9 +1255,9 @@  discard block
 block discarded – undo
1255 1255
 			if (isset($info['script']) and is_countable($info['script']) ? count($info['script']) : 0) {
1256 1256
 				foreach ($info['script'] as $script) {
1257 1257
 					if (isset($script['path']) and $script['path']) {
1258
-						$code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1258
+						$code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) ";
1259 1259
 					} else {
1260
-						$code = "if (\$f='" . addslashes($script['url']) . "') ";
1260
+						$code = "if (\$f='".addslashes($script['url'])."') ";
1261 1261
 					}
1262 1262
 					$code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1263 1263
 					if ($script['type'] != 'prive') {
@@ -1320,10 +1320,10 @@  discard block
 block discarded – undo
1320 1320
 		unset($GLOBALS['spip_pipeline']['all']);
1321 1321
 		$all_pipes = trim(array_shift($a));
1322 1322
 		if ($all_pipes) {
1323
-			$all_pipes = '|' . ltrim($all_pipes, '|');
1323
+			$all_pipes = '|'.ltrim($all_pipes, '|');
1324 1324
 		}
1325 1325
 		if (count($a)) {
1326
-			$all_pipes_end = '||' . array_shift($a);
1326
+			$all_pipes_end = '||'.array_shift($a);
1327 1327
 		}
1328 1328
 	}
1329 1329
 	$content = '';
@@ -1340,7 +1340,7 @@  discard block
 block discarded – undo
1340 1340
 		// Eclater le pipeline en filtres et appliquer chaque filtre
1341 1341
 		foreach ($pipe as $fonc) {
1342 1342
 			$fonc = trim($fonc);
1343
-			$s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1343
+			$s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n";
1344 1344
 			if (isset($GLOBALS['spip_matrice'][$fonc])) {
1345 1345
 				$file = $GLOBALS['spip_matrice'][$fonc];
1346 1346
 				$file = "'$file'";
@@ -1351,7 +1351,7 @@  discard block
 block discarded – undo
1351 1351
 					if (defined($root_dir)) {
1352 1352
 						$dir = $root_dir;
1353 1353
 					}
1354
-					$file = str_replace($regs[0], "'." . $dir . ".'", $file);
1354
+					$file = str_replace($regs[0], "'.".$dir.".'", $file);
1355 1355
 					$file = str_replace("''.", '', $file);
1356 1356
 					$file = str_replace(constant($dir), '', $file);
1357 1357
 				}
@@ -1364,7 +1364,7 @@  discard block
 block discarded – undo
1364 1364
 		$content .= "// Pipeline $action \n"
1365 1365
 			. "function execute_pipeline_$action(&\$val){\n"
1366 1366
 			. $s_inc
1367
-			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1367
+			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '')
1368 1368
 			. $s_call
1369 1369
 			. "return \$val;\n}\n";
1370 1370
 	}
@@ -1420,9 +1420,9 @@  discard block
 block discarded – undo
1420 1420
 					$result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec'));
1421 1421
 					if (_IS_CLI) {
1422 1422
 						include_spip('inc/filtres');
1423
-						$trace = ltrim(textebrut($trace) . "\n" . $result);
1424
-						$trace = '    ' . str_replace("\n", "\n    ", $trace);
1425
-						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1423
+						$trace = ltrim(textebrut($trace)."\n".$result);
1424
+						$trace = '    '.str_replace("\n", "\n    ", $trace);
1425
+						echo "\n".($ok ? 'OK  ' : '/!\ ').textebrut($titre)."\n",
1426 1426
 						  $trace,
1427 1427
 						  "\n";
1428 1428
 					}
@@ -1457,15 +1457,15 @@  discard block
 block discarded – undo
1457 1457
 		$GLOBALS['fichier_php_compile_recent'] = 0;
1458 1458
 	}
1459 1459
 
1460
-	$contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1460
+	$contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>';
1461 1461
 	// si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1462 1462
 	// si pas de modif on ne touche pas au fichier initial
1463 1463
 	if (file_exists($nom)) {
1464 1464
 		if (substr($nom, -4) == '.php') {
1465
-			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1465
+			$fichier_tmp = substr($nom, 0, -4).'.tmp.php';
1466 1466
 		}
1467 1467
 		else {
1468
-			$fichier_tmp = $nom . '.tmp';
1468
+			$fichier_tmp = $nom.'.tmp';
1469 1469
 		}
1470 1470
 		file_put_contents($fichier_tmp, $contenu);
1471 1471
 		if (md5_file($nom) == md5_file($fichier_tmp)) {
Please login to merge, or discard this patch.
ecrire/inc/rubriques.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
 		sql_updateq(
136 136
 			'spip_rubriques',
137 137
 			['statut' => 'publie', 'date' => date('Y-m-d H:i:s')],
138
-			'id_rubrique=' . intval($id_rubrique)
138
+			'id_rubrique='.intval($id_rubrique)
139 139
 		);
140
-		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques AS R', 'R.id_rubrique=' . intval($id_rubrique));
140
+		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques AS R', 'R.id_rubrique='.intval($id_rubrique));
141 141
 		if (!$id_parent) {
142 142
 			break;
143 143
 		}
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			return $id_pred != $id_rubrique;
173 173
 		}
174 174
 		// passer au parent si on a depublie
175
-		$r = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_pred));
175
+		$r = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id_pred));
176 176
 		$id_pred = $r['id_parent'];
177 177
 	}
178 178
 
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
 		$date = date('Y-m-d H:i:s');
198 198
 	}
199 199
 	$postdates = ($GLOBALS['meta']['post_dates'] == 'non') ?
200
-		' AND date <= ' . sql_quote($date) : '';
200
+		' AND date <= '.sql_quote($date) : '';
201 201
 
202 202
 	if (!$id_rubrique = intval($id_rubrique)) {
203 203
 		return false;
204 204
 	}
205 205
 
206 206
 	// verifier qu'elle existe et est bien publiee
207
-	$r = sql_fetsel('id_rubrique,statut', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
207
+	$r = sql_fetsel('id_rubrique,statut', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
208 208
 	if (!$r or $r['statut'] !== 'publie') {
209 209
 		return false;
210 210
 	}
@@ -214,12 +214,12 @@  discard block
 block discarded – undo
214 214
 	$compte = [
215 215
 		'articles' => sql_countsel(
216 216
 			'spip_articles',
217
-			'id_rubrique=' . intval($id_rubrique) . " AND statut='publie'$postdates"
217
+			'id_rubrique='.intval($id_rubrique)." AND statut='publie'$postdates"
218 218
 		),
219
-		'rubriques' => sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique) . " AND statut='publie'"),
219
+		'rubriques' => sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique)." AND statut='publie'"),
220 220
 		'documents' => sql_countsel(
221 221
 			'spip_documents AS D JOIN spip_documents_liens AS L ON D.id_document=L.id_document',
222
-			'L.id_objet=' . intval($id_rubrique) . " AND L.objet='rubrique' and D.mode NOT IN('logoon', 'logooff') "
222
+			'L.id_objet='.intval($id_rubrique)." AND L.objet='rubrique' and D.mode NOT IN('logoon', 'logooff') "
223 223
 		)
224 224
 	];
225 225
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 		}
245 245
 	}
246 246
 
247
-	sql_updateq('spip_rubriques', ['statut' => 'prepa'], 'id_rubrique=' . intval($id_rubrique));
247
+	sql_updateq('spip_rubriques', ['statut' => 'prepa'], 'id_rubrique='.intval($id_rubrique));
248 248
 
249 249
 #		spip_log("depublier_rubrique $id_pred");
250 250
 	return true;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
 	// Afficher les articles post-dates ?
309 309
 	$postdates = ($GLOBALS['meta']['post_dates'] == 'non') ?
310
-		'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : '';
310
+		'AND A.date <= '.sql_quote(date('Y-m-d H:i:s')) : '';
311 311
 
312 312
 	$r = sql_select(
313 313
 		'R.id_rubrique AS id, max(A.date) AS date_h',
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		sql_updateq(
320 320
 			'spip_rubriques',
321 321
 			['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']],
322
-			'id_rubrique=' . intval($row['id'])
322
+			'id_rubrique='.intval($row['id'])
323 323
 		);
324 324
 	}
325 325
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			sql_updateq(
346 346
 				'spip_rubriques',
347 347
 				['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']],
348
-				'id_rubrique=' . intval($row['id'])
348
+				'id_rubrique='.intval($row['id'])
349 349
 			);
350 350
 			$continuer = true;
351 351
 		}
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 			and $rows = sql_allfetsel(
399 399
 				'A.id_rubrique AS id, R.id_secteur AS id_secteur, R.profondeur+1 as profondeur',
400 400
 				'spip_rubriques AS A JOIN spip_rubriques AS R ON A.id_parent = R.id_rubrique',
401
-				'R.profondeur=' . intval($prof) . ' AND (A.id_secteur <> R.id_secteur OR A.profondeur > R.profondeur+1)',
401
+				'R.profondeur='.intval($prof).' AND (A.id_secteur <> R.id_secteur OR A.profondeur > R.profondeur+1)',
402 402
 				'',
403 403
 				'R.id_secteur',
404 404
 				'0,100'
@@ -437,11 +437,11 @@  discard block
 block discarded – undo
437 437
 			and $rows = sql_allfetsel(
438 438
 				'id_rubrique as id',
439 439
 				'spip_rubriques',
440
-				'profondeur=' . intval($prof + 1) . ' AND id_parent NOT IN (' . sql_get_select(
440
+				'profondeur='.intval($prof + 1).' AND id_parent NOT IN ('.sql_get_select(
441 441
 					'zzz.id_rubrique',
442 442
 					'spip_rubriques AS zzz',
443
-					'zzz.profondeur=' . intval($prof)
444
-				) . ')',
443
+					'zzz.profondeur='.intval($prof)
444
+				).')',
445 445
 				'',
446 446
 				'',
447 447
 				'0,100'
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 		// si pas de rubrique a profondeur $prof+1 pas la peine de continuer
456 456
 		// si il reste des rubriques non vues, c'est une branche morte ou reference circulaire (base foireuse)
457 457
 		// on arrete les frais
458
-		if (sql_countsel('spip_rubriques', 'profondeur=' . intval($prof + 1))) {
458
+		if (sql_countsel('spip_rubriques', 'profondeur='.intval($prof + 1))) {
459 459
 			$prof++;
460 460
 			$continuer = true;
461 461
 		}
@@ -463,12 +463,12 @@  discard block
 block discarded – undo
463 463
 
464 464
 	// loger si la table des rubriques semble foireuse
465 465
 	// et mettre un id_secteur=0 sur ces rubriques pour eviter toute selection par les boucles
466
-	if (sql_countsel('spip_rubriques', 'profondeur>' . intval($prof + 1))) {
466
+	if (sql_countsel('spip_rubriques', 'profondeur>'.intval($prof + 1))) {
467 467
 		spip_log(
468
-			'Les rubriques de profondeur>' . ($prof + 1) . ' semblent suspectes (branches morte ou reference circulaire dans les parents)',
468
+			'Les rubriques de profondeur>'.($prof + 1).' semblent suspectes (branches morte ou reference circulaire dans les parents)',
469 469
 			_LOG_CRITIQUE
470 470
 		);
471
-		sql_update('spip_rubriques', ['id_secteur' => 0], 'profondeur>' . intval($prof + 1));
471
+		sql_update('spip_rubriques', ['id_secteur' => 0], 'profondeur>'.intval($prof + 1));
472 472
 	}
473 473
 
474 474
 	// reparer les articles
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 	);
480 480
 
481 481
 	while ($row = sql_fetch($r)) {
482
-		sql_update('spip_articles', ['id_secteur' => $row['secteur']], 'id_article=' . intval($row['id']));
482
+		sql_update('spip_articles', ['id_secteur' => $row['secteur']], 'id_article='.intval($row['id']));
483 483
 	}
484 484
 
485 485
 	// avertir les plugins qui peuvent faire leur mises a jour egalement
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 		$t = sql_updateq(
511 511
 			'spip_rubriques',
512 512
 			['lang' => $row['lang'], 'langue_choisie' => 'non'],
513
-			'id_rubrique=' . intval($id_rubrique)
513
+			'id_rubrique='.intval($id_rubrique)
514 514
 		);
515 515
 	}
516 516
 
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 		sql_updateq(
556 556
 			'spip_articles',
557 557
 			['lang' => $row['lang'], 'langue_choisie' => 'non'],
558
-			'id_article=' . intval($id_article)
558
+			'id_article='.intval($id_article)
559 559
 		);
560 560
 	}
561 561
 
@@ -630,11 +630,11 @@  discard block
 block discarded – undo
630 630
 				];
631 631
 				// generer un nom de fonction "anonyme" unique
632 632
 				do {
633
-					$functionname = 'f_calculer_langues_utilisees_' . $boucle->id_table . '_' . time() . '_' . random_int(0, mt_getrandmax());
633
+					$functionname = 'f_calculer_langues_utilisees_'.$boucle->id_table.'_'.time().'_'.random_int(0, mt_getrandmax());
634 634
 				} while (function_exists($functionname));
635 635
 				$code = calculer_boucle('calculer_langues_utilisees', $boucles);
636
-				$code = '$SP=0; $command=array();$command["connect"] = $connect = "' . $serveur . '"; $Pile=array(0=>array());' . "\n" . $code;
637
-				$code = 'function ' . $functionname . '(){' . $code . '};$res = ' . $functionname . '();';
636
+				$code = '$SP=0; $command=array();$command["connect"] = $connect = "'.$serveur.'"; $Pile=array(0=>array());'."\n".$code;
637
+				$code = 'function '.$functionname.'(){'.$code.'};$res = '.$functionname.'();';
638 638
 				$res = '';
639 639
 				eval($code);
640 640
 				$res = explode(',', $res);
@@ -736,11 +736,11 @@  discard block
 block discarded – undo
736 736
 		$maxiter-- and $filles = sql_allfetsel(
737 737
 			'id_rubrique',
738 738
 			'spip_rubriques',
739
-			sql_in('id_parent', $r) . ' AND ' . sql_in('id_rubrique', $r, 'NOT')
739
+			sql_in('id_parent', $r).' AND '.sql_in('id_rubrique', $r, 'NOT')
740 740
 		)
741 741
 	) {
742 742
 		$r = join(',', array_column($filles, 'id_rubrique'));
743
-		$branche .= ',' . $r;
743
+		$branche .= ','.$r;
744 744
 	}
745 745
 
746 746
 	# securite pour ne pas plomber la conso memoire sur les sites prolifiques
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 
781 781
 	if (isset($b[$id])) {
782 782
 		// Notre branche commence par la rubrique de depart si $tout=true
783
-		return $tout ? (strlen($b[$id]) ? $b[$id] . ",$id" : $id) : $b[$id];
783
+		return $tout ? (strlen($b[$id]) ? $b[$id].",$id" : $id) : $b[$id];
784 784
 	}
785 785
 
786 786
 	$hier = '';
@@ -793,11 +793,11 @@  discard block
 block discarded – undo
793 793
 		$maxiter-- and $parents = sql_allfetsel(
794 794
 			'id_parent',
795 795
 			'spip_rubriques',
796
-			sql_in('id_rubrique', $ids_nouveaux_parents) . ' AND ' . sql_in('id_parent', $hier, 'NOT')
796
+			sql_in('id_rubrique', $ids_nouveaux_parents).' AND '.sql_in('id_parent', $hier, 'NOT')
797 797
 		)
798 798
 	) {
799 799
 		$ids_nouveaux_parents = join(',', array_column($parents, 'id_parent'));
800
-		$hier = $ids_nouveaux_parents . (strlen($hier) ? ',' . $hier : '');
800
+		$hier = $ids_nouveaux_parents.(strlen($hier) ? ','.$hier : '');
801 801
 	}
802 802
 
803 803
 	# securite pour ne pas plomber la conso memoire sur les sites prolifiques
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
 	include_spip('base/abstract_sql');
830 830
 	if ($check) {
831 831
 		$postdates = ($GLOBALS['meta']['post_dates'] == 'non') ?
832
-			'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : '';
832
+			'AND A.date <= '.sql_quote(date('Y-m-d H:i:s')) : '';
833 833
 
834 834
 		$r = sql_select(
835 835
 			'DISTINCT A.id_rubrique AS id',
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	$t = sql_fetsel(
847 847
 		'date',
848 848
 		'spip_articles',
849
-		"statut='publie' AND date > " . sql_quote(date('Y-m-d H:i:s')),
849
+		"statut='publie' AND date > ".sql_quote(date('Y-m-d H:i:s')),
850 850
 		'',
851 851
 		'date',
852 852
 		'1'
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 		$r = sql_getfetsel(
903 903
 			'id_rubrique',
904 904
 			'spip_rubriques',
905
-			'titre = ' . sql_quote($titre) . ' AND id_parent=' . intval($id_parent),
905
+			'titre = '.sql_quote($titre).' AND id_parent='.intval($id_parent),
906 906
 			$groupby = [],
907 907
 			$orderby = [],
908 908
 			$limit = '',
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 			sql_updateq(
939 939
 				'spip_rubriques',
940 940
 				['id_secteur' => $id_secteur, 'lang' => $lang],
941
-				'id_rubrique=' . intval($id_rubrique),
941
+				'id_rubrique='.intval($id_rubrique),
942 942
 				$desc = '',
943 943
 				$serveur
944 944
 			);
Please login to merge, or discard this patch.
ecrire/inc/bandeau.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			$_id = $e['id_table_objet'];
51 51
 			if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) {
52 52
 				$table = $e['table_objet_sql'];
53
-				$row = sql_fetsel('*', $table, "$_id=" . intval($id));
53
+				$row = sql_fetsel('*', $table, "$_id=".intval($id));
54 54
 				if (isset($row['id_rubrique'])) {
55 55
 					$contexte['id_rubrique'] = $row['id_rubrique'];
56 56
 					if (isset($row['id_secteur'])) {
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 				$boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position)
118 118
 					+ [
119 119
 						$id => new Bouton(
120
-							($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '',  // icone
121
-							$infos['titre'],  // titre
120
+							($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone
121
+							$infos['titre'], // titre
122 122
 							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
123 123
 							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
124 124
 						)
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 				$boutons_admin = array_slice($boutons_admin, 0, $position)
136 136
 					+ [
137 137
 						$id => new Bouton(
138
-							($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
139
-							$infos['titre'],  // titre
138
+							($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone
139
+							$infos['titre'], // titre
140 140
 							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
141 141
 							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
142 142
 						)
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			$libelles = $isfavoris = $favoris = [];
182 182
 			foreach ($menu->sousmenu as $key => $item) {
183 183
 				$libelles[$key] = strtolower(translitteration(_T($item->libelle)));
184
-				$isfavoris[$key] = (bool)$item->favori;
184
+				$isfavoris[$key] = (bool) $item->favori;
185 185
 				$favoris[$key] = $item->favori;
186 186
 			}
187 187
 			if ($avec_favoris) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 		$url = str_replace('&amp;', '&', $url);
224 224
 		while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) {
225 225
 			if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) {
226
-				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique']));
226
+				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($contexte['id_rubrique']));
227 227
 			}
228 228
 			$val = _request($matches[2], $contexte);
229 229
 			$url = parametre_url($url, $matches[1], $val ?: '', '&');
Please login to merge, or discard this patch.
ecrire/inc/filtres_images_mini.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 	$hsl = _couleur_hex_to_hsl($couleur);
205 205
 	$hsl = [
206 206
 		'h' => round($hsl['h'] * 360),
207
-		's' => round($hsl['s'] * 100) . '%',
208
-		'l' => round($hsl['l'] * 100) . '%'
207
+		's' => round($hsl['s'] * 100).'%',
208
+		'l' => round($hsl['l'] * 100).'%'
209 209
 	];
210 210
 	if ($format === null) {
211 211
 		return "hsl({$hsl['h']}, {$hsl['s']}, {$hsl['l']})";
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
 	$process = 'AUTO'
385 385
 ) {
386 386
 	// PHP 7+ type hint
387
-	$img = (string)$img;
388
-	$taille_x = (int)$taille_x;
389
-	$taille_y = (int)$taille_y;
390
-	$force = (bool)$force;
391
-	$process = (string)$process;
387
+	$img = (string) $img;
388
+	$taille_x = (int) $taille_x;
389
+	$taille_y = (int) $taille_y;
390
+	$force = (bool) $force;
391
+	$process = (string) $process;
392 392
 
393 393
 	if (!$img) {
394 394
 		return '';
@@ -465,11 +465,11 @@  discard block
 block discarded – undo
465 465
 	$process = 'AUTO'
466 466
 ) {
467 467
 	// PHP 7+ type hint
468
-	$img = (string)$img;
469
-	$taille = (int)$taille;
470
-	$taille_y = (int)$taille_y;
471
-	$force = (bool)$force;
472
-	$process = (string)$process;
468
+	$img = (string) $img;
469
+	$taille = (int) $taille;
470
+	$taille_y = (int) $taille_y;
471
+	$force = (bool) $force;
472
+	$process = (string) $process;
473 473
 
474 474
 	// Determiner la taille x,y maxi
475 475
 	// prendre le reglage de previsu par defaut
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 	$background_color = 'white'
513 513
 ) {
514 514
 	if (function_exists('image_recadre') && ($GLOBALS['meta']['image_process'] ?? '') === 'gd2') {
515
-		return image_reduire(image_recadre($im, $width . ':' . $height, '-', $position, $background_color), $width, $height);
515
+		return image_reduire(image_recadre($im, $width.':'.$height, '-', $position, $background_color), $width, $height);
516 516
 	} else { return image_passe_partout($im, $width, $height);
517 517
 	}
518 518
 }
@@ -533,9 +533,9 @@  discard block
 block discarded – undo
533 533
  **/
534 534
 function image_reduire_par($img, $val = 1, $force = false) {
535 535
 	// PHP 7+ type hint
536
-	$img = (string)$img;
537
-	$val = (int)$val;
538
-	$force = (bool)$force;
536
+	$img = (string) $img;
537
+	$val = (int) $val;
538
+	$force = (bool) $force;
539 539
 
540 540
 	[$hauteur, $largeur] = taille_image($img);
541 541
 
Please login to merge, or discard this patch.
ecrire/inc/log.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
 
54 54
 	// si spip_log() dans mes_options, ou repertoire log/ non present, poser dans tmp/
55 55
 	if (!defined('_DIR_LOG') or !$test_repertoire[$d]) {
56
-		$logfile = _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES . $logname . '.log';
56
+		$logfile = _DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES.$logname.'.log';
57 57
 	}
58 58
 
59 59
 	$rotate = 0;
60
-	$pid = '(pid ' . @getmypid() . ')';
60
+	$pid = '(pid '.@getmypid().')';
61 61
 
62 62
 	// accepter spip_log( Array )
63 63
 	if (!is_string($message)) {
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 			$fi = substr($fi, strlen(_ROOT_RACINE));
73 73
 		}
74 74
 		$fu = $debug[2]['function'] ?? '';
75
-		$debugverb = "$fi:L$l:$fu" . '():';
75
+		$debugverb = "$fi:L$l:$fu".'():';
76 76
 	}
77 77
 
78
-	$m = date('Y-m-d H:i:s') . ' ' . ($GLOBALS['ip'] ?? '') . ' ' . $pid . ' '
78
+	$m = date('Y-m-d H:i:s').' '.($GLOBALS['ip'] ?? '').' '.$pid.' '
79 79
 		//distinguer les logs prives et publics dans les grep
80 80
 		. $debugverb
81 81
 		. (test_espace_prive() ? ':Pri:' : ':Pub:')
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
 		$rotate-- > 0
101 101
 		and function_exists('spip_unlink')
102 102
 	) {
103
-		spip_unlink($logfile . '.' . $rotate);
103
+		spip_unlink($logfile.'.'.$rotate);
104 104
 		while ($rotate--) {
105
-			@rename($logfile . ($rotate ? '.' . $rotate : ''), $logfile . '.' . ($rotate + 1));
105
+			@rename($logfile.($rotate ? '.'.$rotate : ''), $logfile.'.'.($rotate + 1));
106 106
 		}
107 107
 	}
108 108
 
Please login to merge, or discard this patch.
ecrire/inc/envoyer_mail.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 	// ceci est la RegExp NO_REAL_NAME faisant hurler SpamAssassin
136 136
 	if (preg_match('/^["\s]*\<?\S+\@\S+\>?\s*$/', $from)) {
137
-		$from .= ' (' . str_replace(')', '', translitteration(str_replace('@', ' at ', $from))) . ')';
137
+		$from .= ' ('.str_replace(')', '', translitteration(str_replace('@', ' at ', $from))).')';
138 138
 	}
139 139
 
140 140
 	// nettoyer les &eacute; &#8217, &emdash; etc...
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		if (!_TEST_EMAIL_DEST) {
172 172
 			return false;
173 173
 		} else {
174
-			$texte = "Dest : $destinataire\r\n" . $texte;
174
+			$texte = "Dest : $destinataire\r\n".$texte;
175 175
 			$destinataire = _TEST_EMAIL_DEST;
176 176
 		}
177 177
 	}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	// Ajouter le Content-Type et consort s'il n'y est pas deja
196 196
 	if (strpos($headers, 'Content-Type: ') === false) {
197 197
 		$type =
198
-			"Content-Type: text/plain;charset=\"$charset\";\n" .
198
+			"Content-Type: text/plain;charset=\"$charset\";\n".
199 199
 			"Content-Transfer-Encoding: 8bit\n";
200 200
 	} else {
201 201
 		$type = '';
@@ -207,17 +207,17 @@  discard block
 block discarded – undo
207 207
 		$domain = $domain[0];
208 208
 	}
209 209
 	else {
210
-		$domain = '@unknown-' . md5($from) . '.org';
210
+		$domain = '@unknown-'.md5($from).'.org';
211 211
 	}
212
-	$uniq = random_int(0, mt_getrandmax()) . '_' . md5($to . $texte) . $domain;
212
+	$uniq = random_int(0, mt_getrandmax()).'_'.md5($to.$texte).$domain;
213 213
 
214 214
 	// Si multi-part, s'en servir comme borne ...
215 215
 	if ($parts) {
216
-		$texte = "--$uniq\n$type\n" . $texte . "\n";
216
+		$texte = "--$uniq\n$type\n".$texte."\n";
217 217
 		foreach ($parts as $part) {
218
-			$n = strlen($part[1]) . ($part[0] ? "\n" : '');
218
+			$n = strlen($part[1]).($part[0] ? "\n" : '');
219 219
 			$e = join("\n", $part[0]);
220
-			$texte .= "\n--$uniq\nContent-Length: $n$e\n\n" . $part[1];
220
+			$texte .= "\n--$uniq\nContent-Length: $n$e\n\n".$part[1];
221 221
 		}
222 222
 		$texte .= "\n\n--$uniq--\n";
223 223
 		// Si boundary n'est pas entre guillemets,
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
 	// .. et s'en servir pour plaire a SpamAssassin
229 229
 
230
-	$mid = 'Message-Id: <' . $uniq . '>';
230
+	$mid = 'Message-Id: <'.$uniq.'>';
231 231
 
232 232
 	// indispensable pour les sites qui collent d'office From: serveur-http
233 233
 	// sauf si deja mis par l'envoyeur
Please login to merge, or discard this patch.