Completed
Push — master ( f50317...15d2e0 )
by cam
01:07
created
ecrire/inc/documents.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	}
63 63
 
64 64
 	if (strncmp($fichier, _DIR_IMG, strlen(_DIR_IMG)) !== 0) {
65
-		$fichier = _DIR_IMG . $fichier;
65
+		$fichier = _DIR_IMG.$fichier;
66 66
 	}
67 67
 
68 68
 	// fichier normal
@@ -158,23 +158,23 @@  discard block
 block discarded – undo
158 158
 			or !$r = verifier_upload_autorise($dest)
159 159
 			or (!empty($r['autozip']))
160 160
 		) {
161
-			$dest = substr($dest, 0, -strlen($m[0])) . '_' . $m[1];
161
+			$dest = substr($dest, 0, -strlen($m[0])).'_'.$m[1];
162 162
 			break;
163 163
 		}
164 164
 		else {
165 165
 			$dest = substr($dest, 0, -strlen($m[0]));
166
-			$ext = $m[1] . '.' . $ext;
166
+			$ext = $m[1].'.'.$ext;
167 167
 		}
168 168
 	}
169 169
 
170 170
 	// Si le document "source" est deja au bon endroit, ne rien faire
171
-	if ($source == ($dir . $dest . '.' . $ext)) {
171
+	if ($source == ($dir.$dest.'.'.$ext)) {
172 172
 		return $source;
173 173
 	}
174 174
 
175 175
 	// sinon tourner jusqu'a trouver un numero correct
176 176
 	$n = 0;
177
-	while (@file_exists($newFile = $dir . $dest . ($n++ ? ('-' . $n) : '') . '.' . $ext)) {
177
+	while (@file_exists($newFile = $dir.$dest.($n++ ? ('-'.$n) : '').'.'.$ext)) {
178 178
 		;
179 179
 	}
180 180
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 function deplacer_fichier_upload($source, $dest, $move = false) {
236 236
 	// Securite
237 237
 	if (substr($dest, 0, strlen(_DIR_RACINE)) == _DIR_RACINE) {
238
-		$dest = _DIR_RACINE . preg_replace(',\.\.+,', '.', substr($dest, strlen(_DIR_RACINE)));
238
+		$dest = _DIR_RACINE.preg_replace(',\.\.+,', '.', substr($dest, strlen(_DIR_RACINE)));
239 239
 	} else {
240 240
 		$dest = preg_replace(',\.\.+,', '.', $dest);
241 241
 	}
@@ -317,8 +317,8 @@  discard block
 block discarded – undo
317 317
 
318 318
 		default: /* autre */
319 319
 			if (!$msg) {
320
-				$msg = _T('pass_erreur') . ' ' . $error
321
-					. '<br />' . propre('[->http://php.net/manual/fr/features.file-upload.errors.php]');
320
+				$msg = _T('pass_erreur').' '.$error
321
+					. '<br />'.propre('[->http://php.net/manual/fr/features.file-upload.errors.php]');
322 322
 			}
323 323
 			break;
324 324
 	}
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 	include_spip('inc/minipres');
337 337
 	echo minipres(
338 338
 		$msg,
339
-		"<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><a href='" . rawurldecode($GLOBALS['redirect']) . "'><button type='button'>" . _T('ecrire:bouton_suivant') . '</button></a></div>'
339
+		"<div style='text-align: ".$GLOBALS['spip_lang_right']."'><a href='".rawurldecode($GLOBALS['redirect'])."'><button type='button'>"._T('ecrire:bouton_suivant').'</button></a></div>'
340 340
 	);
341 341
 	exit;
342 342
 }
Please login to merge, or discard this patch.
ecrire/inc/filtres_images_lib_mini.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	$blue = dechex($blue);
44 44
 
45 45
 	if (strlen($red) == 1) {
46
-		$red = '0' . $red;
46
+		$red = '0'.$red;
47 47
 	}
48 48
 	if (strlen($green) == 1) {
49
-		$green = '0' . $green;
49
+		$green = '0'.$green;
50 50
 	}
51 51
 	if (strlen($blue) == 1) {
52
-		$blue = '0' . $blue;
52
+		$blue = '0'.$blue;
53 53
 	}
54 54
 
55 55
 	return "$red$green$blue";
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	$couleur = couleur_html_to_hex($couleur);
69 69
 	$couleur = ltrim($couleur, '#');
70 70
 	if (strlen($couleur) === 3) {
71
-		$couleur = $couleur[0] . $couleur[0] . $couleur[1] . $couleur[1] . $couleur[2] . $couleur[2];
71
+		$couleur = $couleur[0].$couleur[0].$couleur[1].$couleur[1].$couleur[2].$couleur[2];
72 72
 	}
73 73
 	$retour = [];
74 74
 	$retour['red'] = hexdec(substr($couleur, 0, 2));
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
 	$var_G = ($G / 255);
127 127
 	$var_B = ($B / 255);
128 128
 
129
-	$var_Min = min($var_R, $var_G, $var_B);   //Min. value of RGB
130
-	$var_Max = max($var_R, $var_G, $var_B);   //Max. value of RGB
131
-	$del_Max = $var_Max - $var_Min;           //Delta RGB value
129
+	$var_Min = min($var_R, $var_G, $var_B); //Min. value of RGB
130
+	$var_Max = max($var_R, $var_G, $var_B); //Max. value of RGB
131
+	$del_Max = $var_Max - $var_Min; //Delta RGB value
132 132
 
133 133
 	$L = ($var_Max + $var_Min) / 2;
134 134
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
  */
191 191
 function _couleur_hsl_to_rgb($H, $S, $L) {
192 192
 	// helper
193
-	$hue_2_rgb = function ($v1, $v2, $vH) {
193
+	$hue_2_rgb = function($v1, $v2, $vH) {
194 194
 		if ($vH < 0) {
195 195
 			$vH += 1;
196 196
 		}
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
 		$img = "<img src='$source' />";
323 323
 	} elseif (
324 324
 		preg_match('@^data:image/([^;]*);base64,(.*)$@isS', $source, $regs)
325
-		and $extension = _image_trouver_extension_depuis_mime('image/' . $regs[1])
325
+		and $extension = _image_trouver_extension_depuis_mime('image/'.$regs[1])
326 326
 		and in_array($extension, _image_extensions_acceptees_en_entree())
327 327
 	) {
328 328
 		# gerer img src="data:....base64"
329
-		$local = sous_repertoire(_DIR_VAR, 'image-data') . md5($regs[2]) . '.' . _image_extension_normalisee($extension);
329
+		$local = sous_repertoire(_DIR_VAR, 'image-data').md5($regs[2]).'.'._image_extension_normalisee($extension);
330 330
 		if (!file_exists($local)) {
331 331
 			ecrire_fichier($local, base64_decode($regs[2]));
332 332
 		}
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	// les protocoles web prennent au moins 3 lettres
344 344
 	if (tester_url_absolue($source)) {
345 345
 		include_spip('inc/distant');
346
-		$fichier = _DIR_RACINE . copie_locale($source);
346
+		$fichier = _DIR_RACINE.copie_locale($source);
347 347
 		if (!$fichier) {
348 348
 			return '';
349 349
 		}
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
 			// on garde la terminaison initiale car image simplement copiee
446 446
 			// et on postfixe son nom avec un md5 du path
447 447
 			$terminaison_dest = $terminaison;
448
-			$fichier_dest .= '-' . substr(md5("$identifiant"), 0, 5);
448
+			$fichier_dest .= '-'.substr(md5("$identifiant"), 0, 5);
449 449
 		} else {
450
-			$fichier_dest .= '-' . substr(md5("$identifiant-$effet"), 0, 5);
450
+			$fichier_dest .= '-'.substr(md5("$identifiant-$effet"), 0, 5);
451 451
 		}
452 452
 		$cache = sous_repertoire(_DIR_VAR, $cache);
453 453
 		$cache = sous_repertoire($cache, $effet);
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 		$fichier_dest = substr($fichier_dest, 2);
459 459
 	}
460 460
 
461
-	$fichier_dest = $cache . $fichier_dest . '.' . $terminaison_dest;
461
+	$fichier_dest = $cache.$fichier_dest.'.'.$terminaison_dest;
462 462
 
463 463
 	$GLOBALS['images_calculees'][] = $fichier_dest;
464 464
 
@@ -496,15 +496,15 @@  discard block
 block discarded – undo
496 496
 
497 497
 	if ($creer) {
498 498
 		spip_log(
499
-			'filtre image ' . ($fonction_creation ? reset($fonction_creation) : '') . "[$effet] sur $fichier",
500
-			'images' . _LOG_DEBUG
499
+			'filtre image '.($fonction_creation ? reset($fonction_creation) : '')."[$effet] sur $fichier",
500
+			'images'._LOG_DEBUG
501 501
 		);
502 502
 	}
503 503
 
504 504
 	$term_fonction = _image_trouver_extension_pertinente($fichier);
505
-	$ret['fonction_imagecreatefrom'] = '_imagecreatefrom' . $term_fonction;
505
+	$ret['fonction_imagecreatefrom'] = '_imagecreatefrom'.$term_fonction;
506 506
 	$ret['fichier'] = $fichier;
507
-	$ret['fonction_image'] = '_image_image' . $terminaison_dest;
507
+	$ret['fonction_image'] = '_image_image'.$terminaison_dest;
508 508
 	$ret['fichier_dest'] = $fichier_dest;
509 509
 	$ret['format_source'] = _image_extension_normalisee($terminaison);
510 510
 	$ret['format_dest'] = $terminaison_dest;
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 
655 655
 	$_terminaison = _image_trouver_extension_depuis_mime($mime);
656 656
 	if ($_terminaison and $_terminaison !== $terminaison) {
657
-		spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.' . _LOG_INFO_IMPORTANTE);
657
+		spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.'._LOG_INFO_IMPORTANTE);
658 658
 		$terminaison = $_terminaison;
659 659
 	}
660 660
 	return $terminaison;
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 	if (!function_exists('imagepng')) {
812 812
 		return false;
813 813
 	}
814
-	$tmp = $fichier . '.tmp';
814
+	$tmp = $fichier.'.tmp';
815 815
 	$ret = imagepng($img, $tmp);
816 816
 	if (file_exists($tmp)) {
817 817
 		$taille_test = @getimagesize($tmp);
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	if (!function_exists('imagegif')) {
847 847
 		return false;
848 848
 	}
849
-	$tmp = $fichier . '.tmp';
849
+	$tmp = $fichier.'.tmp';
850 850
 	$ret = imagegif($img, $tmp);
851 851
 	if (file_exists($tmp)) {
852 852
 		$taille_test = @getimagesize($tmp);
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 	if (!function_exists('imagejpeg')) {
887 887
 		return false;
888 888
 	}
889
-	$tmp = $fichier . '.tmp';
889
+	$tmp = $fichier.'.tmp';
890 890
 
891 891
 	// Enable interlancing
892 892
 	imageinterlace($img, true);
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
 	if (!function_exists('imagewebp')) {
948 948
 		return false;
949 949
 	}
950
-	$tmp = $fichier . '.tmp';
950
+	$tmp = $fichier.'.tmp';
951 951
 	$ret = imagewebp($img, $tmp, $qualite);
952 952
 	if (file_exists($tmp)) {
953 953
 		$taille_test = @getimagesize($tmp);
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
  */
982 982
 function _image_imagesvg($img, $fichier) {
983 983
 
984
-	$tmp = $fichier . '.tmp';
984
+	$tmp = $fichier.'.tmp';
985 985
 	if (strpos($img, '<') === false) {
986 986
 		$img = supprimer_timestamp($img);
987 987
 		if (!file_exists($img)) {
@@ -1038,13 +1038,13 @@  discard block
 block discarded – undo
1038 1038
  */
1039 1039
 function _image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE, $fonction = null) {
1040 1040
 	if (is_null($fonction)) {
1041
-		$fonction = '_image_image' . $valeurs['format_dest'];
1041
+		$fonction = '_image_image'.$valeurs['format_dest'];
1042 1042
 	}
1043 1043
 	$ret = false;
1044 1044
 	#un flag pour reperer les images gravees
1045 1045
 	$lock = (
1046 1046
 		!statut_effacer_images_temporaires('get') // si la fonction n'a pas ete activee, on grave tout
1047
-		or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'] . '.src'))
1047
+		or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'].'.src'))
1048 1048
 	);
1049 1049
 	if (
1050 1050
 		function_exists($fonction)
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
 			// dans tous les cas mettre a jour la taille de l'image finale
1057 1057
 			[$valeurs['hauteur_dest'], $valeurs['largeur_dest']] = taille_image($valeurs['fichier_dest']);
1058 1058
 			$valeurs['date'] = @filemtime($valeurs['fichier_dest']); // pour la retrouver apres disparition
1059
-			ecrire_fichier($valeurs['fichier_dest'] . '.src', serialize($valeurs), true);
1059
+			ecrire_fichier($valeurs['fichier_dest'].'.src', serialize($valeurs), true);
1060 1060
 		}
1061 1061
 	}
1062 1062
 
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
 
1232 1232
 	// attributs deprecies. Transformer en CSS
1233 1233
 	if ($espace = extraire_attribut($tag, 'hspace')) {
1234
-		$style = "margin:{$espace}px;" . $style;
1234
+		$style = "margin:{$espace}px;".$style;
1235 1235
 		$tag = inserer_attribut($tag, 'hspace', '');
1236 1236
 	}
1237 1237
 
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
 	$image = $valeurs['fichier'];
1359 1359
 	$format = $valeurs['format_source'];
1360 1360
 	$destdir = dirname($valeurs['fichier_dest']);
1361
-	$destfile = basename($valeurs['fichier_dest'], '.' . $valeurs['format_dest']);
1361
+	$destfile = basename($valeurs['fichier_dest'], '.'.$valeurs['format_dest']);
1362 1362
 
1363 1363
 	$format_sortie = $valeurs['format_dest'];
1364 1364
 
@@ -1390,14 +1390,14 @@  discard block
 block discarded – undo
1390 1390
 
1391 1391
 	// Si l'image est de la taille demandee (ou plus petite), simplement la retourner
1392 1392
 	if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1393
-		$vignette = $destination . '.' . $format;
1393
+		$vignette = $destination.'.'.$format;
1394 1394
 		@copy($image, $vignette);
1395 1395
 	}
1396 1396
 
1397 1397
 	elseif ($valeurs['format_source'] === 'svg') {
1398 1398
 		if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) {
1399 1399
 			$format_sortie = 'svg';
1400
-			$vignette = $destination . '.' . $format_sortie;
1400
+			$vignette = $destination.'.'.$format_sortie;
1401 1401
 			$valeurs['fichier_dest'] = $vignette;
1402 1402
 			_image_gd_output($svg, $valeurs);
1403 1403
 		}
@@ -1409,9 +1409,9 @@  discard block
 block discarded – undo
1409 1409
 			define('_CONVERT_COMMAND', 'convert');
1410 1410
 		} // Securite : mes_options.php peut preciser le chemin absolu
1411 1411
 		if (!defined('_RESIZE_COMMAND')) {
1412
-			define('_RESIZE_COMMAND', _CONVERT_COMMAND . ' -quality ' . _IMG_CONVERT_QUALITE . ' -resize %xx%y! %src %dest');
1412
+			define('_RESIZE_COMMAND', _CONVERT_COMMAND.' -quality '._IMG_CONVERT_QUALITE.' -resize %xx%y! %src %dest');
1413 1413
 		}
1414
-		$vignette = $destination . '.' . $format_sortie;
1414
+		$vignette = $destination.'.'.$format_sortie;
1415 1415
 		$commande = str_replace(
1416 1416
 			['%x', '%y', '%src', '%dest'],
1417 1417
 			[
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
 		if (!@file_exists($vignette)) {
1428 1428
 			spip_log("echec convert sur $vignette");
1429 1429
 
1430
-			return;  // echec commande
1430
+			return; // echec commande
1431 1431
 		}
1432 1432
 	}
1433 1433
 
@@ -1444,7 +1444,7 @@  discard block
 block discarded – undo
1444 1444
 		if (!$output) {
1445 1445
 			return;
1446 1446
 		}
1447
-		$vignette = $output . DIRECTORY_SEPARATOR . basename($destination) . '.' . $format_sortie;
1447
+		$vignette = $output.DIRECTORY_SEPARATOR.basename($destination).'.'.$format_sortie;
1448 1448
 
1449 1449
 		$imagick = new Imagick();
1450 1450
 		$imagick->readImage(realpath($image));
@@ -1453,7 +1453,7 @@  discard block
 block discarded – undo
1453 1453
 			$destHeight,
1454 1454
 			Imagick::FILTER_LANCZOS,
1455 1455
 			1
1456
-		);//, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1456
+		); //, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1457 1457
 		$imagick->writeImage($vignette);
1458 1458
 
1459 1459
 		if (!@file_exists($vignette)) {
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
 			return;
1463 1463
 		}
1464 1464
 		// remettre le chemin relatif car c'est ce qu'attend SPIP pour la suite (en particlier action/tester)
1465
-		$vignette = $destination . '.' . $format_sortie;
1465
+		$vignette = $destination.'.'.$format_sortie;
1466 1466
 	}
1467 1467
 
1468 1468
 	// netpbm
@@ -1473,11 +1473,11 @@  discard block
 block discarded – undo
1473 1473
 		if (_PNMSCALE_COMMAND == '') {
1474 1474
 			return;
1475 1475
 		}
1476
-		$vignette = $destination . '.' . $format_sortie;
1476
+		$vignette = $destination.'.'.$format_sortie;
1477 1477
 		$pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', _PNMSCALE_COMMAND);
1478 1478
 		if ($format == 'jpg') {
1479 1479
 			$jpegtopnm_command = str_replace('pnmscale', 'jpegtopnm', _PNMSCALE_COMMAND);
1480
-			exec("$jpegtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1480
+			exec("$jpegtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1481 1481
 			if (!($s = @filesize($vignette))) {
1482 1482
 				spip_unlink($vignette);
1483 1483
 			}
@@ -1489,7 +1489,7 @@  discard block
 block discarded – undo
1489 1489
 		} else {
1490 1490
 			if ($format == 'gif') {
1491 1491
 				$giftopnm_command = str_replace('pnmscale', 'giftopnm', _PNMSCALE_COMMAND);
1492
-				exec("$giftopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1492
+				exec("$giftopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1493 1493
 				if (!($s = @filesize($vignette))) {
1494 1494
 					spip_unlink($vignette);
1495 1495
 				}
@@ -1501,7 +1501,7 @@  discard block
 block discarded – undo
1501 1501
 			} else {
1502 1502
 				if ($format == 'png') {
1503 1503
 					$pngtopnm_command = str_replace('pnmscale', 'pngtopnm', _PNMSCALE_COMMAND);
1504
-					exec("$pngtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1504
+					exec("$pngtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1505 1505
 					if (!($s = @filesize($vignette))) {
1506 1506
 						spip_unlink($vignette);
1507 1507
 					}
@@ -1523,7 +1523,7 @@  discard block
 block discarded – undo
1523 1523
 			return;
1524 1524
 		}
1525 1525
 		if (_IMG_GD_MAX_PIXELS && $srcWidth * $srcHeight > _IMG_GD_MAX_PIXELS) {
1526
-			spip_log('vignette gd1/gd2 impossible : ' . $srcWidth * $srcHeight . 'pixels');
1526
+			spip_log('vignette gd1/gd2 impossible : '.$srcWidth * $srcHeight.'pixels');
1527 1527
 
1528 1528
 			return;
1529 1529
 		}
@@ -1833,7 +1833,7 @@  discard block
 block discarded – undo
1833 1833
 		// de l'image, de facon a tromper le cache du navigateur
1834 1834
 		// quand on fait supprimer/reuploader un logo
1835 1835
 		// (pas de filemtime si SAFE MODE)
1836
-		$date = test_espace_prive() ? ('?' . $date) : '';
1836
+		$date = test_espace_prive() ? ('?'.$date) : '';
1837 1837
 
1838 1838
 		return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]);
1839 1839
 	}
@@ -1879,7 +1879,7 @@  discard block
 block discarded – undo
1879 1879
 	public static function LittleEndian2String($number, $minbytes = 1) {
1880 1880
 		$intstring = '';
1881 1881
 		while ($number > 0) {
1882
-			$intstring = $intstring . chr($number & 255);
1882
+			$intstring = $intstring.chr($number & 255);
1883 1883
 			$number >>= 8;
1884 1884
 		}
1885 1885
 
@@ -1911,9 +1911,9 @@  discard block
 block discarded – undo
1911 1911
 					$b = $argb['blue'];
1912 1912
 
1913 1913
 					if ($bpp[$key] == 32) {
1914
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r) . chr($a);
1914
+						$icXOR[$key] .= chr($b).chr($g).chr($r).chr($a);
1915 1915
 					} elseif ($bpp[$key] == 24) {
1916
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r);
1916
+						$icXOR[$key] .= chr($b).chr($g).chr($r);
1917 1917
 					}
1918 1918
 
1919 1919
 					if ($a < 128) {
@@ -1940,48 +1940,48 @@  discard block
 block discarded – undo
1940 1940
 
1941 1941
 			// BITMAPINFOHEADER - 40 bytes
1942 1942
 			$BitmapInfoHeader[$key] = '';
1943
-			$BitmapInfoHeader[$key] .= "\x28\x00\x00\x00";                // DWORD  biSize;
1944
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4);    // LONG   biWidth;
1943
+			$BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD  biSize;
1944
+			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); // LONG   biWidth;
1945 1945
 			// The biHeight member specifies the combined
1946 1946
 			// height of the XOR and AND masks.
1947 1947
 			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); // LONG   biHeight;
1948
-			$BitmapInfoHeader[$key] .= "\x01\x00";                    // WORD   biPlanes;
1949
-			$BitmapInfoHeader[$key] .= chr($bpp[$key]) . "\x00";              // wBitCount;
1950
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biCompression;
1951
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4);      // DWORD  biSizeImage;
1952
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biXPelsPerMeter;
1953
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biYPelsPerMeter;
1954
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrUsed;
1955
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrImportant;
1948
+			$BitmapInfoHeader[$key] .= "\x01\x00"; // WORD   biPlanes;
1949
+			$BitmapInfoHeader[$key] .= chr($bpp[$key])."\x00"; // wBitCount;
1950
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biCompression;
1951
+			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); // DWORD  biSizeImage;
1952
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG   biXPelsPerMeter;
1953
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG   biYPelsPerMeter;
1954
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biClrUsed;
1955
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biClrImportant;
1956 1956
 		}
1957 1957
 
1958 1958
 
1959
-		$icondata = "\x00\x00";                    // idReserved;   // Reserved (must be 0)
1960
-		$icondata .= "\x01\x00";                    // idType;	   // Resource Type (1 for icons)
1961
-		$icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2);  // idCount;	  // How many images?
1959
+		$icondata = "\x00\x00"; // idReserved;   // Reserved (must be 0)
1960
+		$icondata .= "\x01\x00"; // idType;	   // Resource Type (1 for icons)
1961
+		$icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2); // idCount;	  // How many images?
1962 1962
 
1963 1963
 		$dwImageOffset = 6 + (count($gd_image_array) * 16);
1964 1964
 		foreach ($gd_image_array as $key => $gd_image) {
1965 1965
 			// ICONDIRENTRY   idEntries[1]; // An entry for each image (idCount of 'em)
1966 1966
 
1967
-			$icondata .= chr($ImageWidths[$key]);           // bWidth;		  // Width, in pixels, of the image
1968
-			$icondata .= chr($ImageHeights[$key]);          // bHeight;		 // Height, in pixels, of the image
1969
-			$icondata .= chr($totalcolors[$key]);           // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1970
-			$icondata .= "\x00";                    // bReserved;	   // Reserved ( must be 0)
1967
+			$icondata .= chr($ImageWidths[$key]); // bWidth;		  // Width, in pixels, of the image
1968
+			$icondata .= chr($ImageHeights[$key]); // bHeight;		 // Height, in pixels, of the image
1969
+			$icondata .= chr($totalcolors[$key]); // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1970
+			$icondata .= "\x00"; // bReserved;	   // Reserved ( must be 0)
1971 1971
 
1972
-			$icondata .= "\x01\x00";                  // wPlanes;		 // Color Planes
1973
-			$icondata .= chr($bpp[$key]) . "\x00";            // wBitCount;	   // Bits per pixel
1972
+			$icondata .= "\x01\x00"; // wPlanes;		 // Color Planes
1973
+			$icondata .= chr($bpp[$key])."\x00"; // wBitCount;	   // Bits per pixel
1974 1974
 
1975 1975
 			$dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]);
1976 1976
 			$icondata .= phpthumb_functions::LittleEndian2String(
1977 1977
 				$dwBytesInRes,
1978 1978
 				4
1979
-			);     // dwBytesInRes;	// How many bytes in this resource?
1979
+			); // dwBytesInRes;	// How many bytes in this resource?
1980 1980
 
1981 1981
 			$icondata .= phpthumb_functions::LittleEndian2String(
1982 1982
 				$dwImageOffset,
1983 1983
 				4
1984
-			);    // dwImageOffset;   // Where in the file is this image?
1984
+			); // dwImageOffset;   // Where in the file is this image?
1985 1985
 			$dwImageOffset += strlen($BitmapInfoHeader[$key]);
1986 1986
 			$dwImageOffset += strlen($icXOR[$key]);
1987 1987
 			$dwImageOffset += strlen($icAND[$key]);
Please login to merge, or discard this patch.