fogpage.class.php (fogproject-1.5.8) | : | fogpage.class.php (fogproject-1.5.9) | ||
---|---|---|---|---|
skipping to change at line 2666 | skipping to change at line 2666 | |||
self::$FOGFTP->close(); | self::$FOGFTP->close(); | |||
} | } | |||
/** | /** | |||
* Hands out the login information | * Hands out the login information | |||
* such as version and number of users | * such as version and number of users | |||
* | * | |||
* @return void | * @return void | |||
*/ | */ | |||
public function loginInfo() | public function loginInfo() | |||
{ | { | |||
$stable = ''; | ||||
$development = ''; | ||||
$urls = array( | $urls = array( | |||
'https://fogproject.org/globalusers', | 'https://fogproject.org/globalusers', | |||
'https://fogproject.org/version/index.php?stable&dev' | 'https://api.github.com/repos/fogproject/fogproject/tags', | |||
'https://raw.githubusercontent.com/FOGProject/fogproject/dev-branch/ | ||||
packages/web/lib/fog/system.class.php' | ||||
); | ); | |||
$resp = self::$FOGURLRequests->process($urls); | $resp = self::$FOGURLRequests->process($urls); | |||
$data['sites'] = array_shift($resp); | $data['sites'] = array_shift($resp); | |||
$data['version'] = array_shift($resp); | $tags = json_decode(array_shift($resp)); | |||
$systemclass = array_shift($resp); | ||||
foreach ($tags as $tag) { | ||||
if (preg_match('/^[0-9]\.[0-9]\.[0-9]$/', $tag->name)) { | ||||
$stable = $tag->name; | ||||
break; | ||||
} | ||||
} | ||||
if (preg_match("/FOG_VERSION', '([0-9.RCalphbet-]*)'/", $systemclass, $f | ||||
ogver)) { | ||||
$development = $fogver[1]; | ||||
} | ||||
$data['version'] = json_encode(array('stable' => $stable, 'dev' => $deve | ||||
lopment)); | ||||
echo json_encode($data); | echo json_encode($data); | |||
exit; | exit; | |||
} | } | |||
/** | /** | |||
* Gets the associated info from the mac addresses | * Gets the associated info from the mac addresses | |||
* | * | |||
* @return void | * @return void | |||
*/ | */ | |||
public function getmacman() | public function getmacman() | |||
{ | { | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 19 lines changed or added |