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