Merge remote-tracking branch 'origin/master' into 0.10.0
This commit is contained in:
@@ -53,7 +53,7 @@ https://files.froxlor.org/releases/froxlor-latest.tar.gz [MD5](https://files.fro
|
|||||||
[HowTo](https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-on-debian)
|
[HowTo](https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-on-debian)
|
||||||
|
|
||||||
/etc/apt/sources.list.d/froxlor.list
|
/etc/apt/sources.list.d/froxlor.list
|
||||||
> deb http://debian.froxlor.org {wheezy|jessie} main
|
> deb http://debian.froxlor.org {wheezy|jessie|stretch} main
|
||||||
|
|
||||||
### Gentoo repository
|
### Gentoo repository
|
||||||
|
|
||||||
|
|||||||
@@ -86,35 +86,42 @@ if ($page == 'overview') {
|
|||||||
if ((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|
if ((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|
||||||
|| (isset($lookfornewversion) && $lookfornewversion == 'yes')
|
|| (isset($lookfornewversion) && $lookfornewversion == 'yes')
|
||||||
) {
|
) {
|
||||||
$update_check_uri = 'http://version.froxlor.org/Froxlor/api/' . $version;
|
if (function_exists('curl_version')) {
|
||||||
$latestversion = HttpClient::urlGet($update_check_uri);
|
$update_check_uri = 'http://version.froxlor.org/Froxlor/api/' . $version;
|
||||||
$latestversion = explode('|', $latestversion);
|
$latestversion = HttpClient::urlGet($update_check_uri);
|
||||||
|
$latestversion = explode('|', $latestversion);
|
||||||
if (is_array($latestversion)
|
|
||||||
&& count($latestversion) >= 1
|
if (is_array($latestversion)
|
||||||
) {
|
&& count($latestversion) >= 1
|
||||||
$_version = $latestversion[0];
|
) {
|
||||||
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
|
$_version = $latestversion[0];
|
||||||
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
|
||||||
|
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||||
// add the branding so debian guys are not gettings confused
|
|
||||||
// about their version-number
|
// add the branding so debian guys are not gettings confused
|
||||||
$lookfornewversion_lable = $_version.$branding;
|
// about their version-number
|
||||||
$lookfornewversion_link = $_link;
|
$lookfornewversion_lable = $_version.$branding;
|
||||||
$lookfornewversion_addinfo = $_message;
|
$lookfornewversion_link = $_link;
|
||||||
|
$lookfornewversion_addinfo = $_message;
|
||||||
// not numeric -> error-message
|
|
||||||
if (!preg_match('/^((\d+\\.)(\d+\\.)(\d+\\.)?(\d+)?(\-(svn|dev|rc)(\d+))?)$/', $_version)) {
|
// not numeric -> error-message
|
||||||
// check for customized version to not output
|
if (!preg_match('/^((\d+\\.)(\d+\\.)(\d+\\.)?(\d+)?(\-(svn|dev|rc)(\d+))?)$/', $_version)) {
|
||||||
// "There is a newer version of froxlor" besides the error-message
|
// check for customized version to not output
|
||||||
$isnewerversion = 2;
|
// "There is a newer version of froxlor" besides the error-message
|
||||||
} elseif (version_compare2($version, $_version) == -1) {
|
$isnewerversion = 2;
|
||||||
$isnewerversion = 1;
|
} elseif (version_compare2($version, $_version) == -1) {
|
||||||
|
$isnewerversion = 1;
|
||||||
|
} else {
|
||||||
|
$isnewerversion = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$isnewerversion = 0;
|
redirectTo($update_check_uri.'/pretty', NULL, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
redirectTo($update_check_uri.'/pretty', NULL, false);
|
$lookfornewversion_lable = "Version-check not available due to missing php-curl extension";
|
||||||
|
$lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||||
|
$lookfornewversion_addinfo = '';
|
||||||
|
$isnewerversion = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere'];
|
$lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere'];
|
||||||
|
|||||||
Reference in New Issue
Block a user