Completed
Push — master ( 1dde8c...5a052b )
by cam
01:06
created
ecrire/inc/filtres.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -622,8 +622,7 @@  discard block
 block discarded – undo
622 622
 			if (!$srcHeight) {
623 623
 				$hauteur_img[$src] = $srcHeight = $srcsize[1];
624 624
 			}
625
-		}
626
-		elseif(strpos($src, "<svg") !== false) {
625
+		} elseif(strpos($src, "<svg") !== false) {
627 626
 			include_spip('inc/svg');
628 627
 			if ($attrs = svg_lire_attributs($src)){
629 628
 				list($width, $height, $viewbox) = svg_getimagesize_from_attr($attrs);
@@ -2089,8 +2088,7 @@  discard block
 block discarded – undo
2089 2088
 				if (in_array($operation, ['ajouter', 'commuter'])
2090 2089
 					and !$is_class_presente) {
2091 2090
 					$class_new = rtrim($class_new) . " " . $c;
2092
-				}
2093
-				elseif (in_array($operation, ['supprimer', 'commuter'])
2091
+				} elseif (in_array($operation, ['supprimer', 'commuter'])
2094 2092
 					and $is_class_presente) {
2095 2093
 					$class_new = trim(preg_replace("/(^|\s)".preg_quote($c)."($|\s)/", "\\1", $class_new));
2096 2094
 				}
@@ -2100,8 +2098,7 @@  discard block
 block discarded – undo
2100 2098
 		if ($class_new !== $class_courante) {
2101 2099
 			if (strlen($class_new)) {
2102 2100
 				$balise = inserer_attribut($balise, 'class', $class_new);
2103
-			}
2104
-			elseif ($class_courante) {
2101
+			} elseif ($class_courante) {
2105 2102
 				$balise = vider_attribut($balise, 'class');
2106 2103
 			}
2107 2104
 		}
@@ -3365,8 +3362,7 @@  discard block
 block discarded – undo
3365 3362
 	  and file_exists($variante_svg_generique)) {
3366 3363
 		if ($variante_svg_size = substr($variante_svg_generique,0,-6) . $m[1] . ".svg" and file_exists($variante_svg_size)) {
3367 3364
 			$img_file = $variante_svg_size;
3368
-		}
3369
-		else {
3365
+		} else {
3370 3366
 			$img_file = $variante_svg_generique;
3371 3367
 		}
3372 3368
 	}
@@ -3398,8 +3394,7 @@  discard block
 block discarded – undo
3398 3394
 	}
3399 3395
 	if (!isset($options['chemin_image']) or $options['chemin_image'] == true) {
3400 3396
 		$img_file = chemin_image($img);
3401
-	}
3402
-	else {
3397
+	} else {
3403 3398
 		if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true){
3404 3399
 			$img_file = http_img_variante_svg_si_possible($img_file);
3405 3400
 		}
@@ -3428,11 +3423,9 @@  discard block
 block discarded – undo
3428 3423
 	}
3429 3424
 	if ($alt === false) {
3430 3425
 		$alt = '';
3431
-	}
3432
-	elseif($alt or $alt==='') {
3426
+	} elseif($alt or $alt==='') {
3433 3427
 		$alt = " alt='".attribut_html($alt)."'";
3434
-	}
3435
-	else {
3428
+	} else {
3436 3429
 		$alt = " alt='".attribut_html($title)."'";
3437 3430
 	}
3438 3431
 	return "<img src='$img_file'$alt"
@@ -3557,13 +3550,11 @@  discard block
 block discarded – undo
3557 3550
 		if (!is_null($class)) {
3558 3551
 			if (strlen($class)) {
3559 3552
 				$img = inserer_attribut($img, 'class', $class);
3560
-			}
3561
-			else {
3553
+			} else {
3562 3554
 				$img = vider_attribut($img, 'class');
3563 3555
 			}
3564 3556
 		}
3565
-	}
3566
-	else {
3557
+	} else {
3567 3558
 		$img = http_img_pack($img, $alt, $class ? " class='" . attribut_html($class) . "'" : '', '',
3568 3559
 				array('chemin_image' => false, 'utiliser_suffixe_size' => false));
3569 3560
 		if (is_null($alt)) {
@@ -3643,8 +3634,7 @@  discard block
 block discarded – undo
3643 3634
 	if (!is_null($class)) {
3644 3635
 		if (strlen($class)) {
3645 3636
 			$balise_svg = inserer_attribut($balise_svg, 'class', $class);
3646
-		}
3647
-		else {
3637
+		} else {
3648 3638
 			$balise_svg = vider_attribut($balise_svg, 'class');
3649 3639
 		}
3650 3640
 	}
@@ -3656,8 +3646,7 @@  discard block
 block discarded – undo
3656 3646
 		$balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id);
3657 3647
 		$title = "<title id=\"$id\">" . entites_html($alt)."</title>\n";
3658 3648
 		$balise_svg .= $title;
3659
-	}
3660
-	else {
3649
+	} else {
3661 3650
 		$balise_svg = inserer_attribut($balise_svg, 'aria-hidden', 'true');
3662 3651
 	}
3663 3652
 
@@ -5007,8 +4996,7 @@  discard block
 block discarded – undo
5007 4996
 	// reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine
5008 4997
 	if (isset($options['hash_on_content']) and $options['hash_on_content']) {
5009 4998
 		$hash = md5($contexte_implicite['host'] . '::'. $cache);
5010
-	}
5011
-	else {
4999
+	} else {
5012 5000
 		unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js
5013 5001
 		ksort($contexte);
5014 5002
 		$hash = md5($fond . json_encode($contexte_implicite) . json_encode($contexte) . $connect);
Please login to merge, or discard this patch.