@@ -28,11 +28,11 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -108,13 +108,13 @@ discard block |
||
| 108 | 108 | function info_maj($version) { |
| 109 | 109 | include_spip('inc/plugin'); |
| 110 | 110 | |
| 111 | - $nom = _DIR_CACHE . _VERSIONS_LISTE; |
|
| 111 | + $nom = _DIR_CACHE._VERSIONS_LISTE; |
|
| 112 | 112 | $contenu = !file_exists($nom) ? '' : file_get_contents($nom); |
| 113 | 113 | $contenu = info_maj_cache($nom, $contenu); |
| 114 | 114 | try { |
| 115 | 115 | $contenu = json_decode($contenu, true, 512, JSON_THROW_ON_ERROR); |
| 116 | 116 | } catch (JsonException $e) { |
| 117 | - spip_log('Failed to parse Json data : ' . $e->getMessage(), 'verifie_maj'); |
|
| 117 | + spip_log('Failed to parse Json data : '.$e->getMessage(), 'verifie_maj'); |
|
| 118 | 118 | return ''; |
| 119 | 119 | } |
| 120 | 120 | |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | foreach ($contenu['versions'] as $v => $path) { |
| 127 | 127 | $v = explode('.', $v); |
| 128 | 128 | [$maj2, $min2, $rev2] = $v; |
| 129 | - $branche_maj = $maj2 . '.' . $min2; |
|
| 130 | - $version_maj = $maj2 . '.' . $min2 . '.' . $rev2; |
|
| 129 | + $branche_maj = $maj2.'.'.$min2; |
|
| 130 | + $version_maj = $maj2.'.'.$min2.'.'.$rev2; |
|
| 131 | 131 | // d'abord les mises à jour de la même branche |
| 132 | 132 | if ( |
| 133 | 133 | (spip_version_compare($version, $version_maj, '<')) |
@@ -149,10 +149,10 @@ discard block |
||
| 149 | 149 | return ''; |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - $message = $liste ? _T('nouvelle_version_spip', ['version' => $liste]) . ($liste_majeure ? ' | ' : '') : ''; |
|
| 152 | + $message = $liste ? _T('nouvelle_version_spip', ['version' => $liste]).($liste_majeure ? ' | ' : '') : ''; |
|
| 153 | 153 | $message .= $liste_majeure ? _T('nouvelle_version_spip_majeure', ['version' => $liste_majeure]) : ''; |
| 154 | 154 | |
| 155 | - return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$liste'>" . $message . '</a>'; |
|
| 155 | + return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$liste'>".$message.'</a>'; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |