Completed
Push — master ( 1816a4...3a1501 )
by cam
01:08
created
ecrire/inc/autoriser.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -267,8 +267,7 @@  discard block
 block discarded – undo
267 267
 		if ($id === '*') {
268 268
 			unset($GLOBALS['autoriser_exception'][$faire][$type]);
269 269
 			unset($autorisation[$faire][$type]);
270
-		}
271
-		else {
270
+		} else {
272 271
 			unset($GLOBALS['autoriser_exception'][$faire][$type][$id]);
273 272
 			unset($autorisation[$faire][$type][$id]);
274 273
 		}
@@ -652,8 +651,7 @@  discard block
 block discarded – undo
652 651
 function autoriser_rubrique_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
653 652
 	if (!empty($opt['id_parent'])) {
654 653
 		return autoriser('creerrubriquedans', 'rubrique', $opt['id_parent'], $qui);
655
-	}
656
-	else {
654
+	} else {
657 655
 		return autoriser('defaut', null, 0, $qui, $opt);
658 656
 	}
659 657
 }
@@ -814,8 +812,7 @@  discard block
 block discarded – undo
814 812
 	if (!empty($opt['id_parent'])) {
815 813
 		// creerarticledans rappelle autoriser(creer,article) sans id, donc on verifiera condition du else aussi
816 814
 		return autoriser('creerarticledans', 'rubrique', $opt['id_parent'], $qui);
817
-	}
818
-	else {
815
+	} else {
819 816
 		return (sql_countsel('spip_rubriques') > 0 and in_array($qui['statut'], ['0minirezo', '1comite']));
820 817
 	}
821 818
 }
Please login to merge, or discard this patch.