Completed
Push — master ( 6c9939...4ccfda )
by cam
01:06
created
ecrire/action/editer_logo.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 		if ((is_countable($logo) ? count($logo) : 0) < 6) {
43 43
 			spip_log("Supprimer ancien logo $logo", 'logo');
44 44
 			spip_unlink($logo[0]);
45
-		}
46
-		elseif (
45
+		} elseif (
47 46
 			$doc = $logo[5]
48 47
 			and isset($doc['id_document'])
49 48
 			and $id_document = $doc['id_document']
Please login to merge, or discard this patch.
ecrire/public/iterateur.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -261,8 +261,7 @@  discard block
 block discarded – undo
261 261
 			if ($filtres = $this->assembler_filtres($this->filtre)) {
262 262
 				$filtres = 'return ' . $filtres . ';';
263 263
 				$this->func_filtre = fn() => eval($filtres);
264
-			}
265
-			else {
264
+			} else {
266 265
 				$this->func_filtre = null;
267 266
 			}
268 267
 		}
@@ -345,16 +344,14 @@  discard block
 block discarded – undo
345 344
 					$v[$k] = $this->traduire_condition_sql_en_filtre($v[$k]);
346 345
 					if ($v[$k] === null) {
347 346
 						unset($v[$k]);
348
-					}
349
-					elseif ($v[$k] === 'true') {
347
+					} elseif ($v[$k] === 'true') {
350 348
 						if ($op === 'OR') {
351 349
 							return 'true';
352 350
 						}
353 351
 						if ($op === 'AND') {
354 352
 							unset($v[$k]);
355 353
 						}
356
-					}
357
-					elseif ($v[$k] === 'false') {
354
+					} elseif ($v[$k] === 'false') {
358 355
 						if ($op === 'OR') {
359 356
 							unset($v[$k]);
360 357
 						}
Please login to merge, or discard this patch.
ecrire/public/criteres.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2071,8 +2071,7 @@  discard block
 block discarded – undo
2071 2071
 						// Champ joker * des iterateurs DATA qui accepte tout
2072 2072
 						if (@array_key_exists('*', $desc['field'])) {
2073 2073
 							$desc['field'][$col_vraie ?: $col] = ''; // on veut pas de cast INT par defaut car le type peut etre n'importe quoi dans les boucles DATA
2074
-						}
2075
-						else {
2074
+						} else {
2076 2075
 							$r = calculer_critere_infixe_externe($boucle, $crit, $op, $desc, $col, $col_alias, $table);
2077 2076
 							if (!$r) {
2078 2077
 								return '';
@@ -2115,8 +2114,7 @@  discard block
 block discarded – undo
2115 2114
 				. ((isset($r[2]) and $r[2]) ? $r[2] : ",''")
2116 2115
 				. ",'" . addslashes($type_cast_quote) . "'";
2117 2116
 			$val[0] = "sql_quote($r)";
2118
-		}
2119
-		elseif (
2117
+		} elseif (
2120 2118
 			strpos($val[0], '@@defaultcast@@') !== false
2121 2119
 			and preg_match("/'@@defaultcast@@'\s*\)\s*\z/ms", $val[0], $r)
2122 2120
 		) {
Please login to merge, or discard this patch.
ecrire/inc/envoyer_mail.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -205,8 +205,7 @@
 block discarded – undo
205 205
 	// Marie Toto <[email protected]> => @toto.com
206 206
 	if (preg_match('/@[^\s>]+/', $from, $domain)) {
207 207
 		$domain = $domain[0];
208
-	}
209
-	else {
208
+	} else {
210 209
 		$domain = '@unknown-' . md5($from) . '.org';
211 210
 	}
212 211
 	$uniq = random_int(0, mt_getrandmax()) . '_' . md5($to . $texte) . $domain;
Please login to merge, or discard this patch.
ecrire/inc/filtres.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -631,8 +631,7 @@  discard block
 block discarded – undo
631 631
 			if (!$srcHeight) {
632 632
 				$hauteur_img[$src] = $srcHeight = $srcsize[1];
633 633
 			}
634
-		}
635
-		elseif (strpos($src, '<svg') !== false) {
634
+		} elseif (strpos($src, '<svg') !== false) {
636 635
 			include_spip('inc/svg');
637 636
 			if ($attrs = svg_lire_attributs($src)) {
638 637
 				[$width, $height, $viewbox] = svg_getimagesize_from_attr($attrs);
@@ -3455,8 +3454,7 @@  discard block
 block discarded – undo
3455 3454
 	) {
3456 3455
 		if ($variante_svg_size = substr($variante_svg_generique, 0, -6) . $m[1] . '.svg' and file_exists($variante_svg_size)) {
3457 3456
 			$img_file = $variante_svg_size;
3458
-		}
3459
-		else {
3457
+		} else {
3460 3458
 			$img_file = $variante_svg_generique;
3461 3459
 		}
3462 3460
 	}
@@ -3488,8 +3486,7 @@  discard block
 block discarded – undo
3488 3486
 	}
3489 3487
 	if (!isset($options['chemin_image']) or $options['chemin_image'] == true) {
3490 3488
 		$img_file = chemin_image($img);
3491
-	}
3492
-	else {
3489
+	} else {
3493 3490
 		if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true) {
3494 3491
 			$img_file = http_img_variante_svg_si_possible($img_file);
3495 3492
 		}
@@ -3519,11 +3516,9 @@  discard block
 block discarded – undo
3519 3516
 	}
3520 3517
 	if ($alt === false) {
3521 3518
 		$alt = '';
3522
-	}
3523
-	elseif ($alt or $alt === '') {
3519
+	} elseif ($alt or $alt === '') {
3524 3520
 		$alt = " alt='" . attribut_html($alt) . "'";
3525
-	}
3526
-	else {
3521
+	} else {
3527 3522
 		$alt = " alt='" . attribut_html($title) . "'";
3528 3523
 	}
3529 3524
 	return "<img src='$img_file'$alt"
@@ -3650,13 +3645,11 @@  discard block
 block discarded – undo
3650 3645
 		if (!is_null($class)) {
3651 3646
 			if (strlen($class)) {
3652 3647
 				$img = inserer_attribut($img, 'class', $class);
3653
-			}
3654
-			else {
3648
+			} else {
3655 3649
 				$img = vider_attribut($img, 'class');
3656 3650
 			}
3657 3651
 		}
3658
-	}
3659
-	else {
3652
+	} else {
3660 3653
 		$img = http_img_pack(
3661 3654
 			$img,
3662 3655
 			$alt,
@@ -3754,8 +3747,7 @@  discard block
 block discarded – undo
3754 3747
 	if (!is_null($class)) {
3755 3748
 		if (strlen($class)) {
3756 3749
 			$balise_svg = inserer_attribut($balise_svg, 'class', $class);
3757
-		}
3758
-		else {
3750
+		} else {
3759 3751
 			$balise_svg = vider_attribut($balise_svg, 'class');
3760 3752
 		}
3761 3753
 	}
@@ -3767,8 +3759,7 @@  discard block
 block discarded – undo
3767 3759
 		$balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id);
3768 3760
 		$title = "<title id=\"$id\">" . entites_html($alt) . "</title>\n";
3769 3761
 		$balise_svg .= $title;
3770
-	}
3771
-	else {
3762
+	} else {
3772 3763
 		$balise_svg = inserer_attribut($balise_svg, 'aria-hidden', 'true');
3773 3764
 	}
3774 3765
 
@@ -5146,8 +5137,7 @@  discard block
 block discarded – undo
5146 5137
 	// reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine
5147 5138
 	if (isset($options['hash_on_content']) and $options['hash_on_content']) {
5148 5139
 		$hash = md5($contexte_implicite['host'] . '::' . $cache);
5149
-	}
5150
-	else {
5140
+	} else {
5151 5141
 		unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js
5152 5142
 		ksort($contexte);
5153 5143
 		$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/req/mysql.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -553,16 +553,14 @@
 block discarded – undo
553 553
 		if (stripos($suite, 'SELECT') !== false) {
554 554
 			if ($echappe_textes) {
555 555
 				[$suite_echap, $textes] = query_echappe_textes($suite);
556
-			}
557
-			else {
556
+			} else {
558 557
 				$suite_echap = $suite;
559 558
 			}
560 559
 			if (preg_match('/^(.*?)([(]\s*SELECT\b.*)$/si', $suite_echap, $r)) {
561 560
 				$suite_echap = $r[1] . _mysql_traite_query($r[2], $db, $prefixe, false);
562 561
 				if ($echappe_textes) {
563 562
 					$suite = query_reinjecte_textes($suite_echap, $textes);
564
-				}
565
-				else {
563
+				} else {
566 564
 					$suite = $suite_echap;
567 565
 				}
568 566
 			}
Please login to merge, or discard this patch.