Completed
Push — master ( e1dd73...7208c3 )
by cam
01:29
created
ecrire/inc/plugin.php 1 patch
Braces   +8 added lines, -11 removed lines patch added patch discarded remove patch
@@ -555,11 +555,9 @@  discard block
 block discarded – undo
555 555
 		if (!isset($msg[$p])) {
556 556
 			if (isset($resume['erreur']) and $resume['erreur']) {
557 557
 				$msg[$p] = array($resume['erreur']);
558
-			}
559
-			elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
558
+			} elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
560 559
 				$msg[$p] = array(plugin_message_incompatibilite($k['compatibilite'], $GLOBALS['spip_version_branche'], 'SPIP', 'necessite'));
561
-			}
562
-			elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) {
560
+			} elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) {
563 561
 				$msg[$p] = plugin_necessite($k['utilise'], $liste, 'utilise');
564 562
 			}
565 563
 		} else {
@@ -945,8 +943,7 @@  discard block
 block discarded – undo
945 943
 					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
946 944
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
947 945
 					}
948
-				}
949
-				else{
946
+				} else{
950 947
 					foreach ($info['chemin'] as $chemin) {
951 948
 						if (!isset($chemin['version']) or plugin_version_compatible($chemin['version'],
952 949
 								$GLOBALS['spip_version_branche'], 'spip')
@@ -1169,10 +1166,12 @@  discard block
 block discarded – undo
1169 1166
 					}
1170 1167
 					$nom = $nomlower;
1171 1168
 					// une action vide est une declaration qui ne doit pas etre compilee !
1172
-					if (!isset($GLOBALS['spip_pipeline'][$nom])) // creer le pipeline eventuel
1169
+					if (!isset($GLOBALS['spip_pipeline'][$nom])) {
1170
+					    // creer le pipeline eventuel
1173 1171
 					{
1174 1172
 						$GLOBALS['spip_pipeline'][$nom] = "";
1175 1173
 					}
1174
+					}
1176 1175
 					if ($action) {
1177 1176
 						if (strpos($GLOBALS['spip_pipeline'][$nom], "|$prefix$action") === false) {
1178 1177
 							$GLOBALS['spip_pipeline'][$nom] = preg_replace(",(\|\||$),", "|$prefix$action\\1",
@@ -1404,8 +1403,7 @@  discard block
 block discarded – undo
1404 1403
 						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1405 1404
 						  $trace,
1406 1405
 						  "\n";
1407
-					}
1408
-					else {
1406
+					} else {
1409 1407
 						include_spip('inc/filtres_boites');
1410 1408
 						echo "<div class='install-plugins svp_retour'>"
1411 1409
 							. boite_ouvrir($titre, ($ok ? 'success' : 'error'))
@@ -1442,8 +1440,7 @@  discard block
 block discarded – undo
1442 1440
 	if (file_exists($nom)) {
1443 1441
 		if (substr($nom, -4) == '.php') {
1444 1442
 			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1445
-		}
1446
-		else {
1443
+		} else {
1447 1444
 			$fichier_tmp = $nom . '.tmp';
1448 1445
 		}
1449 1446
 		file_put_contents($fichier_tmp, $contenu);
Please login to merge, or discard this patch.