"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/status/mainversion.php" between
fogproject-1.5.8.tar.gz and fogproject-1.5.9.tar.gz

About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.

mainversion.php  (fogproject-1.5.8):mainversion.php  (fogproject-1.5.9)
skipping to change at line 26 skipping to change at line 26
* @category Mainversion * @category Mainversion
* @package FOGProject * @package FOGProject
* @author Tom Elliott <tommygunsster@gmail.com> * @author Tom Elliott <tommygunsster@gmail.com>
* @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link https://fogproject.org * @link https://fogproject.org
*/ */
require '../commons/base.inc.php'; require '../commons/base.inc.php';
session_write_close(); session_write_close();
ignore_user_abort(true); ignore_user_abort(true);
set_time_limit(0); set_time_limit(0);
$url = 'https://fogproject.org/version/index.php';
$data = array( $curversion = FOG_VERSION;
'version' => FOG_VERSION, $urls = array(
'https://api.github.com/repos/fogproject/fogproject/tags',
'https://raw.githubusercontent.com/FOGProject/fogproject/dev-branch/packages
/web/lib/fog/system.class.php',
'https://raw.githubusercontent.com/FOGProject/fogproject/working-1.6/package
s/web/lib/fog/system.class.php'
); );
$res = $FOGURLRequests->process( $resp = $FOGURLRequests->process($urls);
$url,
'POST', $tags = json_decode(array_shift($resp));
$data foreach ($tags as $tag) {
); if (preg_match('/^[0-9]\.[0-9]\.[0-9]$/', $tag->name)) {
$res = array_shift($res); $stableversion = $tag->name;
$res = json_encode($res); break;
echo $res; }
}
$systemclass = array_shift($resp);
if (preg_match("/FOG_VERSION', '([0-9.RCalphbet-]*)'/", $systemclass, $fogver))
{
$devversion = $fogver[1];
}
$systemclass = array_shift($resp);
if (preg_match("/FOG_VERSION', '([0-9.RCalphbet-]*)'/", $systemclass, $fogver))
{
$alphaversion = $fogver[1];
}
$stablecheck = version_compare($curversion, $stableversion, '=');
$devcheck = version_compare($curversion, $devversion, '=');
$alphacheck = version_compare($curversion, $alphaversion, '=');
if (!$stablecheck && !$devcheck && !$alphacheck) {
$result = '<font face="arial" color="red" size="4"><b>You are not running th
e most current version of FOG!</b></font>'
. "<p>You are currently running version: $curversion</p>"
. "<p>Latest stable version is " . $stableversion . "</p>"
. "<p>Latest dev-branch version is $devversion</p>"
. "<p>Latest alpha-branch version is $alphaversion</p>";
} else {
$result = "<b>Your version of FOG is up to date.</b><br/>";
if ($stablecheck) {
$result .= "You're running the latest stable version: " . $stableversion
;
} elseif ($devcheck) {
$result .= "You're running the latest dev-branch version: " . $devversio
n;
} else {
$result .= "You're running the latest alpha-branch version: " . $alphave
rsion;
}
}
echo json_encode($result);
exit; exit;
 End of changes. 2 change blocks. 
11 lines changed or deleted 54 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)