Completed
Push — master ( f005c3...36792b )
by cam
01:09
created
ecrire/inc/filtres.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -656,8 +656,7 @@  discard block
 block discarded – undo
656 656
 			if (!$srcSize) {
657 657
 				$poids_img[$src] = filesize($src);
658 658
 			}
659
-		}
660
-		elseif (strpos($src, '<svg') !== false) {
659
+		} elseif (strpos($src, '<svg') !== false) {
661 660
 			include_spip('inc/svg');
662 661
 			if ($attrs = svg_lire_attributs($src)) {
663 662
 				[$width, $height, $viewbox] = svg_getimagesize_from_attr($attrs);
@@ -3513,8 +3512,7 @@  discard block
 block discarded – undo
3513 3512
 	) {
3514 3513
 		if ($variante_svg_size = substr($variante_svg_generique, 0, -6) . $m[1] . '.svg' and file_exists($variante_svg_size)) {
3515 3514
 			$img_file = $variante_svg_size;
3516
-		}
3517
-		else {
3515
+		} else {
3518 3516
 			$img_file = $variante_svg_generique;
3519 3517
 		}
3520 3518
 	}
@@ -3546,8 +3544,7 @@  discard block
 block discarded – undo
3546 3544
 	}
3547 3545
 	if (!isset($options['chemin_image']) or $options['chemin_image'] == true) {
3548 3546
 		$img_file = chemin_image($img);
3549
-	}
3550
-	else {
3547
+	} else {
3551 3548
 		if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true) {
3552 3549
 			$img_file = http_img_variante_svg_si_possible($img_file);
3553 3550
 		}
@@ -3577,11 +3574,9 @@  discard block
 block discarded – undo
3577 3574
 	}
3578 3575
 	if ($alt === false) {
3579 3576
 		$alt = '';
3580
-	}
3581
-	elseif ($alt or $alt === '') {
3577
+	} elseif ($alt or $alt === '') {
3582 3578
 		$alt = " alt='" . attribut_html($alt) . "'";
3583
-	}
3584
-	else {
3579
+	} else {
3585 3580
 		$alt = " alt='" . attribut_html($title) . "'";
3586 3581
 	}
3587 3582
 	return "<img src='$img_file'$alt"
@@ -3708,13 +3703,11 @@  discard block
 block discarded – undo
3708 3703
 		if (!is_null($class)) {
3709 3704
 			if (strlen($class)) {
3710 3705
 				$img = inserer_attribut($img, 'class', $class);
3711
-			}
3712
-			else {
3706
+			} else {
3713 3707
 				$img = vider_attribut($img, 'class');
3714 3708
 			}
3715 3709
 		}
3716
-	}
3717
-	else {
3710
+	} else {
3718 3711
 		$img = http_img_pack(
3719 3712
 			$img,
3720 3713
 			$alt,
@@ -3812,8 +3805,7 @@  discard block
 block discarded – undo
3812 3805
 	if (!is_null($class)) {
3813 3806
 		if (strlen($class)) {
3814 3807
 			$balise_svg = inserer_attribut($balise_svg, 'class', $class);
3815
-		}
3816
-		else {
3808
+		} else {
3817 3809
 			$balise_svg = vider_attribut($balise_svg, 'class');
3818 3810
 		}
3819 3811
 	}
@@ -3825,8 +3817,7 @@  discard block
 block discarded – undo
3825 3817
 		$balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id);
3826 3818
 		$title = "<title id=\"$id\">" . entites_html($alt) . "</title>\n";
3827 3819
 		$balise_svg .= $title;
3828
-	}
3829
-	else {
3820
+	} else {
3830 3821
 		$balise_svg = inserer_attribut($balise_svg, 'aria-hidden', 'true');
3831 3822
 	}
3832 3823
 
@@ -5234,8 +5225,7 @@  discard block
 block discarded – undo
5234 5225
 	// reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine
5235 5226
 	if (isset($options['hash_on_content']) and $options['hash_on_content']) {
5236 5227
 		$hash = md5($contexte_implicite['host'] . '::' . $cache);
5237
-	}
5238
-	else {
5228
+	} else {
5239 5229
 		unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js
5240 5230
 		ksort($contexte);
5241 5231
 		$hash = md5($fond . json_encode($contexte_implicite, JSON_THROW_ON_ERROR) . json_encode($contexte, JSON_THROW_ON_ERROR) . $connect);
Please login to merge, or discard this patch.
ecrire/base/connect_sql.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -448,8 +448,7 @@
 block discarded – undo
448 448
 					and strpos($query_echappees, $part . $next, $currentpos) === $nextpos
449 449
 				) {
450 450
 					$part .= array_shift($textes);
451
-				}
452
-				else {
451
+				} else {
453 452
 					break;
454 453
 				}
455 454
 			}
Please login to merge, or discard this patch.