Completed
Push — master ( e1dd73...7208c3 )
by cam
01:29
created
ecrire/inc/plugin.php 2 patches
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 /** l'adresse du repertoire de telechargement et de decompactage des plugins */
24 24
 if (!defined('_DIR_PLUGINS_AUTO')) {
25
-	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/');
25
+	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/');
26 26
 }
27 27
 
28 28
 #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins.
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 				if ($dir) {
371 371
 					$dir .= "/";
372 372
 				}
373
-				$dir .= "procure:" . $procure['nom'];
373
+				$dir .= "procure:".$procure['nom'];
374 374
 
375 375
 				$procure['etat'] = '?';
376 376
 				$procure['dir_type'] = $resume['dir_type'];
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 		$plug = $resume['dir'];
552 552
 		$k = $infos[$dir_type][$plug];
553 553
 
554
-		$plug = constant($dir_type) . $plug;
554
+		$plug = constant($dir_type).$plug;
555 555
 		if (!isset($msg[$p])) {
556 556
 			if (isset($resume['erreur']) and $resume['erreur']) {
557 557
 				$msg[$p] = array($resume['erreur']);
@@ -594,10 +594,10 @@  discard block
 block discarded – undo
594 594
 		$list = $raw ? array() : $GLOBALS['meta']['plugin_erreur_activation'];
595 595
 	} elseif (!$raw) {
596 596
 		foreach ($list as $plug => $msg) {
597
-			$list[$plug] = "<li>" . _T('plugin_impossible_activer', array('plugin' => $plug))
598
-				. "<ul><li>" . implode("</li><li>", $msg) . "</li></ul></li>";
597
+			$list[$plug] = "<li>"._T('plugin_impossible_activer', array('plugin' => $plug))
598
+				. "<ul><li>".implode("</li><li>", $msg)."</li></ul></li>";
599 599
 		}
600
-		$list = "<ul>" . join("\n", $list) . "</ul>";
600
+		$list = "<ul>".join("\n", $list)."</ul>";
601 601
 	}
602 602
 	if ($raz) {
603 603
 		effacer_meta('plugin_erreur_activation');
@@ -711,13 +711,13 @@  discard block
 block discarded – undo
711 711
 			if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
712 712
 				return _T("plugin_${balise}_${type}", array(
713 713
 					'plugin' => $nom,
714
-					'version' => ' &ge; ' . $minimum
714
+					'version' => ' &ge; '.$minimum
715 715
 				));
716 716
 			}
717 717
 			if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
718 718
 				return _T("plugin_${balise}_${type}", array(
719 719
 					'plugin' => $nom,
720
-					'version' => ' &gt; ' . $minimum
720
+					'version' => ' &gt; '.$minimum
721 721
 				));
722 722
 			}
723 723
 		}
@@ -726,13 +726,13 @@  discard block
 block discarded – undo
726 726
 			if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
727 727
 				return _T("plugin_${balise}_${type}", array(
728 728
 					'plugin' => $nom,
729
-					'version' => ' &le; ' . $maximum
729
+					'version' => ' &le; '.$maximum
730 730
 				));
731 731
 			}
732 732
 			if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
733 733
 				return _T("plugin_${balise}_plugin", array(
734 734
 					'plugin' => $nom,
735
-					'version' => ' &lt; ' . $maximum
735
+					'version' => ' &lt; '.$maximum
736 736
 				));
737 737
 			}
738 738
 		}
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 		include_spip('inc/charger_plugin');
752 752
 		$url = '<br />'	. bouton_telechargement_plugin($url, 'lib');
753 753
 	}*/
754
-	return _T('plugin_necessite_lib', array('lib' => $lib)) . " <a href='$url'>$url</a>";
754
+	return _T('plugin_necessite_lib', array('lib' => $lib))." <a href='$url'>$url</a>";
755 755
 }
756 756
 
757 757
 
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 	foreach ($plugin_valides as $p => $resume) {
851 851
 		// Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
852 852
 		if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') {
853
-			$header[] = $p . ($resume['version'] ? "(" . $resume['version'] . ")" : "");
853
+			$header[] = $p.($resume['version'] ? "(".$resume['version'].")" : "");
854 854
 		}
855 855
 		if ($resume['dir']) {
856 856
 			foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
@@ -874,10 +874,10 @@  discard block
 block discarded – undo
874 874
 	ecrire_meta('plugin_attente', serialize($liste));
875 875
 	$header = strtolower(implode(",", $header));
876 876
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
877
-		ecrire_fichier(_DIR_VAR . "config.txt",
878
-			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP") . ' ' . $GLOBALS['spip_version_affichee'] . " @ www.spip.net + " . $header);
877
+		ecrire_fichier(_DIR_VAR."config.txt",
878
+			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP").' '.$GLOBALS['spip_version_affichee']." @ www.spip.net + ".$header);
879 879
 	} else {
880
-		@unlink(_DIR_VAR . "config.txt");
880
+		@unlink(_DIR_VAR."config.txt");
881 881
 	}
882 882
 	// generer charger_plugins_chemin.php
883 883
 	plugins_precompile_chemin($plugin_valides, $ordre);
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
 			// definir le plugin, donc le path avant l'include du fichier options
932 932
 			// permet de faire des include_spip pour attraper un inc_ du plugin
933 933
 
934
-			$dir = $dir_type . ".'" . $plug . "/'";
934
+			$dir = $dir_type.".'".$plug."/'";
935 935
 
936 936
 			$prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
937 937
 			if (
@@ -942,11 +942,11 @@  discard block
 block discarded – undo
942 942
 				if (!$info['chemin']) {
943 943
 					$chemins['public'][] = "_DIR_PLUGIN_$prefix";
944 944
 					$chemins['prive'][] = "_DIR_PLUGIN_$prefix";
945
-					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
945
+					if (is_dir(constant($dir_type).$plug.'/squelettes/')) {
946 946
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
947 947
 					}
948 948
 				}
949
-				else{
949
+				else {
950 950
 					foreach ($info['chemin'] as $chemin) {
951 951
 						if (!isset($chemin['version']) or plugin_version_compatible($chemin['version'],
952 952
 								$GLOBALS['spip_version_branche'], 'spip')
@@ -959,13 +959,13 @@  discard block
 block discarded – undo
959 959
 								$dir = '';
960 960
 							}
961 961
 							if (strlen($dir)) {
962
-								$dir = rtrim($dir, '/') . '/';
962
+								$dir = rtrim($dir, '/').'/';
963 963
 							}
964 964
 							if (!isset($chemin['type']) or $chemin['type'] == 'public') {
965
-								$chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : "");
965
+								$chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : "");
966 966
 							}
967 967
 							if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
968
-								$chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : "");
968
+								$chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : "");
969 969
 							}
970 970
 						}
971 971
 					}
@@ -974,9 +974,9 @@  discard block
 block discarded – undo
974 974
 		}
975 975
 	}
976 976
 	if (count($chemins['public']) or count($chemins['prive'])) {
977
-		$contenu .= "if (_DIR_RESTREINT) _chemin([" . implode(',',
978
-				array_reverse($chemins['public'])) . "]);\n"
979
-			. "else _chemin([" . implode(',', array_reverse($chemins['prive'])) . "]);\n";
977
+		$contenu .= "if (_DIR_RESTREINT) _chemin([".implode(',',
978
+				array_reverse($chemins['public']))."]);\n"
979
+			. "else _chemin([".implode(',', array_reverse($chemins['prive']))."]);\n";
980 980
 	}
981 981
 
982 982
 	ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
 					and strpos($dir, ":") === false // exclure le cas des procure:
1025 1025
 					and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1026 1026
 				) {
1027
-					if (is_readable("$dir$plug/" . ($file = $info['prefix'] . "_" . $charge . ".php"))) {
1027
+					if (is_readable("$dir$plug/".($file = $info['prefix']."_".$charge.".php"))) {
1028 1028
 						$info[$charge] = array($file);
1029 1029
 					}
1030 1030
 				}
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 						) {
1041 1041
 							unset($info[$charge][$k]);
1042 1042
 						} else {
1043
-							$_file = $root_dir_type . ".'$plug/$file'";
1043
+							$_file = $root_dir_type.".'$plug/$file'";
1044 1044
 							$contenu[$charge] .= "include_once_check($_file);\n";
1045 1045
 						}
1046 1046
 					}
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
 		}
1051 1051
 	}
1052 1052
 
1053
-	$contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1053
+	$contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options'];
1054 1054
 	$contenu['fonctions'] .= plugin_ongletbouton("boutons_plugins", $boutons)
1055 1055
 		. plugin_ongletbouton("onglets_plugins", $onglets);
1056 1056
 
@@ -1085,12 +1085,12 @@  discard block
 block discarded – undo
1085 1085
 		define("_UPDATED_$nom", $val);
1086 1086
 		define("_UPDATED_md5_$nom", $md5);
1087 1087
 	}
1088
-	$val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1088
+	$val = "unserialize('".str_replace("'", "\'", $val)."')";
1089 1089
 
1090 1090
 	return
1091 1091
 		"if (!function_exists('$nom')) {\n"
1092 1092
 		. "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1093
-		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1093
+		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n"
1094 1094
 		. "}\n";
1095 1095
 }
1096 1096
 
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
 	if (@is_readable(_CACHE_PLUGINS_OPT)) {
1114 1114
 		include_once(_CACHE_PLUGINS_OPT);
1115 1115
 	} else {
1116
-		spip_log("pipelines desactives: impossible de produire " . _CACHE_PLUGINS_OPT);
1116
+		spip_log("pipelines desactives: impossible de produire "._CACHE_PLUGINS_OPT);
1117 1117
 	}
1118 1118
 }
1119 1119
 
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
 			$dir_type = $plugin_valides[$p]['dir_type'];
1151 1151
 			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1152 1152
 			$plug = $plugin_valides[$p]['dir'];
1153
-			$prefix = (($info['prefix'] == "spip") ? "" : $info['prefix'] . "_");
1153
+			$prefix = (($info['prefix'] == "spip") ? "" : $info['prefix']."_");
1154 1154
 			if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1155 1155
 				foreach ($info['pipeline'] as $pipe) {
1156 1156
 					$nom = $pipe['nom'];
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
 						}
1181 1181
 						if (isset($pipe['inclure'])) {
1182 1182
 							$GLOBALS['spip_matrice']["$prefix$action"] =
1183
-								"$root_dir_type:$plug/" . $pipe['inclure'];
1183
+								"$root_dir_type:$plug/".$pipe['inclure'];
1184 1184
 						}
1185 1185
 					}
1186 1186
 				}
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
 					$prepend_code['taches_generales_cron'] = "";
1191 1191
 				}
1192 1192
 				foreach ($info['genie'] as $genie) {
1193
-					$nom = $prefix . $genie['nom'];
1193
+					$nom = $prefix.$genie['nom'];
1194 1194
 					$periode = max(60, intval($genie['periode']));
1195 1195
 					if (charger_fonction($nom, "genie", true)) {
1196 1196
 						$prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
@@ -1208,13 +1208,13 @@  discard block
 block discarded – undo
1208 1208
 				}
1209 1209
 				foreach ($info['style'] as $style) {
1210 1210
 					if (isset($style['path']) and $style['path']) {
1211
-						$code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1211
+						$code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) ";
1212 1212
 					} else {
1213
-						$code = "if (\$f='" . addslashes($style['url']) . "') ";
1213
+						$code = "if (\$f='".addslashes($style['url'])."') ";
1214 1214
 					}
1215 1215
 					$code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1216 1216
 					if (isset($style['media']) and strlen($style['media'])) {
1217
-						$code .= " media=\"" . addslashes($style['media']) . "\"";
1217
+						$code .= " media=\"".addslashes($style['media'])."\"";
1218 1218
 					}
1219 1219
 					$code .= "/>';\n";
1220 1220
 					if ($style['type'] != 'prive') {
@@ -1234,9 +1234,9 @@  discard block
 block discarded – undo
1234 1234
 			if (isset($info['script']) and count($info['script'])) {
1235 1235
 				foreach ($info['script'] as $script) {
1236 1236
 					if (isset($script['path']) and $script['path']) {
1237
-						$code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1237
+						$code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) ";
1238 1238
 					} else {
1239
-						$code = "if (\$f='" . addslashes($script['url']) . "') ";
1239
+						$code = "if (\$f='".addslashes($script['url'])."') ";
1240 1240
 					}
1241 1241
 					$code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1242 1242
 					if ($script['type'] != 'prive') {
@@ -1299,10 +1299,10 @@  discard block
 block discarded – undo
1299 1299
 		unset($GLOBALS['spip_pipeline']['all']);
1300 1300
 		$all_pipes = trim(array_shift($a));
1301 1301
 		if ($all_pipes) {
1302
-			$all_pipes = '|' . ltrim($all_pipes, '|');
1302
+			$all_pipes = '|'.ltrim($all_pipes, '|');
1303 1303
 		}
1304 1304
 		if (count($a)) {
1305
-			$all_pipes_end = '||' . array_shift($a);
1305
+			$all_pipes_end = '||'.array_shift($a);
1306 1306
 		}
1307 1307
 	}
1308 1308
 	$content = "";
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
 		// Eclater le pipeline en filtres et appliquer chaque filtre
1320 1320
 		foreach ($pipe as $fonc) {
1321 1321
 			$fonc = trim($fonc);
1322
-			$s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1322
+			$s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n";
1323 1323
 			if (isset($GLOBALS['spip_matrice'][$fonc])) {
1324 1324
 				$file = $GLOBALS['spip_matrice'][$fonc];
1325 1325
 				$file = "'$file'";
@@ -1330,7 +1330,7 @@  discard block
 block discarded – undo
1330 1330
 					if (defined($root_dir)) {
1331 1331
 						$dir = $root_dir;
1332 1332
 					}
1333
-					$file = str_replace($regs[0], "'." . $dir . ".'", $file);
1333
+					$file = str_replace($regs[0], "'.".$dir.".'", $file);
1334 1334
 					$file = str_replace("''.", "", $file);
1335 1335
 					$file = str_replace(constant($dir), '', $file);
1336 1336
 				}
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
 		$content .= "// Pipeline $action \n"
1344 1344
 			. "function execute_pipeline_$action(&\$val){\n"
1345 1345
 			. $s_inc
1346
-			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1346
+			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '')
1347 1347
 			. $s_call
1348 1348
 			. "return \$val;\n}\n";
1349 1349
 	}
@@ -1399,9 +1399,9 @@  discard block
 block discarded – undo
1399 1399
 					$result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T("plugin_info_upgrade_ok") : _T("plugin_info_install_ok")) : _T("avis_operation_echec"));
1400 1400
 					if (_IS_CLI) {
1401 1401
 						include_spip('inc/filtres');
1402
-						$trace = ltrim(textebrut($trace) . "\n" . $result);
1403
-						$trace = "    " . str_replace("\n", "\n    ", $trace);
1404
-						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1402
+						$trace = ltrim(textebrut($trace)."\n".$result);
1403
+						$trace = "    ".str_replace("\n", "\n    ", $trace);
1404
+						echo "\n".($ok ? 'OK  ' : '/!\ ').textebrut($titre)."\n",
1405 1405
 						  $trace,
1406 1406
 						  "\n";
1407 1407
 					}
@@ -1436,18 +1436,18 @@  discard block
 block discarded – undo
1436 1436
 		$GLOBALS['fichier_php_compile_recent'] = 0;
1437 1437
 	}
1438 1438
 
1439
-	$contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1439
+	$contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>';
1440 1440
 	// si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1441 1441
 	// si pas de modif on ne touche pas au fichier initial
1442 1442
 	if (file_exists($nom)) {
1443 1443
 		if (substr($nom, -4) == '.php') {
1444
-			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1444
+			$fichier_tmp = substr($nom, 0, -4).'.tmp.php';
1445 1445
 		}
1446 1446
 		else {
1447
-			$fichier_tmp = $nom . '.tmp';
1447
+			$fichier_tmp = $nom.'.tmp';
1448 1448
 		}
1449 1449
 		file_put_contents($fichier_tmp, $contenu);
1450
-		if(md5_file($nom) == md5_file($fichier_tmp)) {
1450
+		if (md5_file($nom) == md5_file($fichier_tmp)) {
1451 1451
 			$GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom));
1452 1452
 			@unlink($fichier_tmp);
1453 1453
 			return;
Please login to merge, or discard this 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.