Completed
Push — master ( 385178...554c3a )
by cam
01:59
created
ecrire/genie/mise_a_jour.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 function genie_mise_a_jour_dist($t) {
29 29
 	include_spip('inc/meta');
30 30
 	$maj = info_maj($GLOBALS['spip_version_branche']);
31
-	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche'] . "|$maj") : '', 'non');
32
-	spip_log('Verification version SPIP : ' . ($maj ?: 'version a jour'), 'verifie_maj');
31
+	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : '', 'non');
32
+	spip_log('Verification version SPIP : '.($maj ?: 'version a jour'), 'verifie_maj');
33 33
 
34 34
 	// notifier les webmestres d’une mise à jour mineure
35 35
 	$maj = info_maj_exists($GLOBALS['spip_version_branche']);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 	mise_a_jour_ecran_securite();
42 42
 
43
-	spip_logger('verifie_maj')->info('Verification version SPIP : ' . ($maj ?: 'version a jour'));
43
+	spip_logger('verifie_maj')->info('Verification version SPIP : '.($maj ?: 'version a jour'));
44 44
 
45 45
 	return 1;
46 46
 }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	// si l'ecran n'est pas deja present ou pas updatable, sortir
66 66
 	if (
67 67
 		!_URL_ECRAN_SECURITE
68
-		|| !file_exists($filename = _DIR_ETC . 'ecran_securite.php')
68
+		|| !file_exists($filename = _DIR_ETC.'ecran_securite.php')
69 69
 		|| !is_writable($filename)
70 70
 		|| !($last_modified = filemtime($filename))
71 71
 		|| !($md5 = md5_file($filename))
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	}
75 75
 
76 76
 	include_spip('inc/distant');
77
-	$tmp_file = _DIR_TMP . 'ecran_securite.php';
77
+	$tmp_file = _DIR_TMP.'ecran_securite.php';
78 78
 	$url = parametre_url(_URL_ECRAN_SECURITE, 'md5', $md5);
79 79
 	$url = parametre_url($url, 'vspip', $GLOBALS['spip_version_branche']);
80 80
 	$res = recuperer_url($url, [
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 			include_once $tmp_file;
94 94
 			// ok, on le copie a la place de l'ecran existant
95 95
 			// en backupant l'ecran avant, au cas ou
96
-			@copy($filename, $filename . '-bck-' . date('Y-m-d-His', $last_modified));
96
+			@copy($filename, $filename.'-bck-'.date('Y-m-d-His', $last_modified));
97 97
 			@rename($tmp_file, $filename);
98 98
 		} else {
99 99
 			@unlink($tmp_file);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		$message[] = _T('nouvelle_version_spip_majeure', ['version' => $maj['majeure']]);
137 137
 	}
138 138
 
139
-	return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="' . $maj['mineure'] . '">' . implode(' | ', $message) . '</a>';
139
+	return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="'.$maj['mineure'].'">'.implode(' | ', $message).'</a>';
140 140
 }
141 141
 
142 142
 /**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 function info_maj_cache(): ?array {
154 154
 	$contenu = '';
155 155
 	$options = [];
156
-	$nom = _DIR_CACHE . _VERSIONS_LISTE;
156
+	$nom = _DIR_CACHE._VERSIONS_LISTE;
157 157
 	if (file_exists($nom)) {
158 158
 		$contenu = file_get_contents($nom);
159 159
 		$options['if_modified_since'] = filemtime($nom);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	try {
175 175
 		$json = json_decode((string) $contenu, true, 512, JSON_THROW_ON_ERROR);
176 176
 	} catch (JsonException $e) {
177
-		spip_logger('verifie_maj')->info('Failed to parse Json data : ' . $e->getMessage());
177
+		spip_logger('verifie_maj')->info('Failed to parse Json data : '.$e->getMessage());
178 178
 		return null;
179 179
 	}
180 180
 
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
 
212 212
 	foreach ($versions as $v) {
213 213
 		[$maj2, $min2, $rev2] = explode('.', $v);
214
-		$branche_maj = $maj2 . '.' . $min2;
215
-		$version_maj = $maj2 . '.' . $min2 . '.' . $rev2;
214
+		$branche_maj = $maj2.'.'.$min2;
215
+		$version_maj = $maj2.'.'.$min2.'.'.$rev2;
216 216
 		$is_version_stable = is_numeric($rev2);
217 217
 		// d'abord les mises à jour de la même branche (version mineure)
218 218
 		if (
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 		notifications_envoyer_mails(
264 264
 			$destinataires,
265 265
 			$texte,
266
-			'['. $GLOBALS['meta']['nom_site'] .'] '. _T('nouvelle_version_spip', ['version' => $version])
266
+			'['.$GLOBALS['meta']['nom_site'].'] '._T('nouvelle_version_spip', ['version' => $version])
267 267
 		);
268 268
 	}
269 269
 }
Please login to merge, or discard this patch.