Skip to content

Commit 3335f3c

Browse files
committed
Fixed: FS#1474 - Request verion information only once per session.
1 parent f414abd commit 3335f3c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

interface/web/dashboard/dashboard.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,20 @@
9090
* Check the ISPConfig-Version (only for the admin)
9191
*/
9292
if($_SESSION["s"]["user"]["typ"] == 'admin') {
93-
$new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt');
94-
$new_version = trim($new_version);
93+
if(!isset($_SESSION['s']['new_ispconfig_version'])) {
94+
$new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt');
95+
$_SESSION['s']['new_ispconfig_version'] = trim($new_version);
96+
}
9597
$v1 = ISPC_APP_VERSION;
96-
$v2 = $new_version;
97-
$this_version = explode(".",ISPC_APP_VERSION);
98+
$v2 = $_SESSION['s']['new_ispconfig_version'];
99+
$this_version = explode(".",$v1);
98100
$this_fullversion = (($this_version[0] < 10) ? '0'.$this_version[0] : $this_version[0]) .
99101
(($this_version[1] < 10) ? '0'.$this_version[1] : $this_version[1]) .
100102
(($this_version[2] < 10) ? '0'.$this_version[2] : $this_version[2]) .
101103
(($this_version[3] < 10) ? (($this_version[3] < 1) ? '00' : '0'.$this_version[3]) : $this_version[3]);
102104

103105

104-
$new_version = explode(".",$new_version);
106+
$new_version = explode(".",$v2);
105107
$new_fullversion = (($new_version[0] < 10) ? '0'.$new_version[0] : $new_version[0]) .
106108
(($new_version[1] < 10) ? '0'.$new_version[1] : $new_version[1]) .
107109
(($new_version[2] < 10) ? '0'.$new_version[2] : $new_version[2]) .

0 commit comments

Comments
 (0)