Completed
Push — master ( a15233...457c22 )
by cam
01:25
created
ecrire/genie/mise_a_jour.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  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');
31
+	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : '', 'non');
32 32
 
33 33
 	mise_a_jour_ecran_securite();
34 34
 
35
-	spip_log('Verification version SPIP : ' . ($maj ?: 'version a jour'), 'verifie_maj');
35
+	spip_log('Verification version SPIP : '.($maj ?: 'version a jour'), 'verifie_maj');
36 36
 
37 37
 	return 1;
38 38
 }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	// si l'ecran n'est pas deja present ou pas updatable, sortir
58 58
 	if (
59 59
 		!_URL_ECRAN_SECURITE
60
-		or !file_exists($filename = _DIR_ETC . 'ecran_securite.php')
60
+		or !file_exists($filename = _DIR_ETC.'ecran_securite.php')
61 61
 		or !is_writable($filename)
62 62
 		or !$last_modified = filemtime($filename)
63 63
 		or !$md5 = md5_file($filename)
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	}
67 67
 
68 68
 	include_spip('inc/distant');
69
-	$tmp_file = _DIR_TMP . 'ecran_securite.php';
69
+	$tmp_file = _DIR_TMP.'ecran_securite.php';
70 70
 	$url = parametre_url(_URL_ECRAN_SECURITE, 'md5', $md5);
71 71
 	$url = parametre_url($url, 'vspip', $GLOBALS['spip_version_branche']);
72 72
 	$res = recuperer_url($url, [
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			include_once $tmp_file;
86 86
 			// ok, on le copie a la place de l'ecran existant
87 87
 			// en backupant l'ecran avant, au cas ou
88
-			@copy($filename, $filename . '-bck-' . date('Y-m-d-His', $last_modified));
88
+			@copy($filename, $filename.'-bck-'.date('Y-m-d-His', $last_modified));
89 89
 			@rename($tmp_file, $filename);
90 90
 		} else {
91 91
 			@unlink($tmp_file);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		$message[] = _T('nouvelle_version_spip_majeure', ['version' => $maj['majeure']]);
128 128
 	}
129 129
 
130
-	return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="' . $maj['mineure'] . '">' . implode(' | ', $message) . '</a>';
130
+	return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="'.$maj['mineure'].'">'.implode(' | ', $message).'</a>';
131 131
 }
132 132
 
133 133
 /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 function info_maj_cache(): ?array {
145 145
 	$contenu = '';
146 146
 	$options = [];
147
-	$nom = _DIR_CACHE . _VERSIONS_LISTE;
147
+	$nom = _DIR_CACHE._VERSIONS_LISTE;
148 148
 	if (file_exists($nom)) {
149 149
 		$contenu = file_get_contents($nom);
150 150
 		$options['if_modified_since'] = filemtime($nom);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	try {
166 166
 		$json = json_decode($contenu, true, 512, JSON_THROW_ON_ERROR);
167 167
 	} catch (JsonException $e) {
168
-		spip_log('Failed to parse Json data : ' . $e->getMessage(), 'verifie_maj');
168
+		spip_log('Failed to parse Json data : '.$e->getMessage(), 'verifie_maj');
169 169
 		return null;
170 170
 	}
171 171
 
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 
198 198
 	foreach ($versions as $v) {
199 199
 		[$maj2, $min2, $rev2] = explode('.', $v);
200
-		$branche_maj = $maj2 . '.' . $min2;
201
-		$version_maj = $maj2 . '.' . $min2 . '.' . $rev2;
200
+		$branche_maj = $maj2.'.'.$min2;
201
+		$version_maj = $maj2.'.'.$min2.'.'.$rev2;
202 202
 		$is_version_stable = is_numeric($rev2);
203 203
 		// d'abord les mises à jour de la même branche (version mineure)
204 204
 		if (
Please login to merge, or discard this patch.