- updating version-check-method;

- checking for 'allow_url_fopen' when checking version;
This commit is contained in:
Michael Kaufmann (d00p)
2010-01-27 12:39:42 +00:00
parent 86e64ce3b0
commit 6822531fb8

View File

@@ -86,7 +86,13 @@ if($page == 'overview')
if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
{
$latestversion = @file('http://version.froxlor.org/legacy/' . $version);
$update_check_uri = 'http://version.froxlor.org/Froxlor/legacy/' . $version;
if(strtolower(ini_get('allow_url_fopen')) == 'on')
{
$latestversion = @file($update_check_uri);
$latestversion = explode(':', $latestversion);
if(is_array($latestversion)
&& count($latestversion) >= 2)
@@ -97,15 +103,17 @@ if($page == 'overview')
if(count($latestversion) >= 3)
{
$addinfo = $latestversion;
unset($addinfo[0]);
unset($addinfo[1]);
$lookfornewversion_addinfo = implode("\n", $addinfo);
$lookfornewversion_addinfo = $latestversion[2];
}
}
else
{
redirectTo('http://version.froxlor.org/legacy/' . $version . '/pretty', NULL);
redirectTo($update_check_uri.'/pretty', NULL);
}
}
else
{
redirectTo($update_check_uri.'/pretty', NULL);
}
}
else