Skip to content

Commit

Permalink
Module/Admin: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightprince committed Apr 16, 2024
1 parent 62daabd commit 51ff3f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions application/modules/admin/controllers/Admin.php
Original file line number Diff line number Diff line change
@@ -385,16 +385,18 @@ private function format_interval(DateInterval $interval)
return $result;
}

private function getLatestVersion()
{
private function getLatestVersion(): bool
{
$response = Services::curlrequest()->get('https://raw.githubusercontent.com/FusionWowCMS/FusionCMS/master/application/config/version.php');
$content = $response->getBody();
if ($content)
$newVersion = substr($content, 37, 5);
else
$newVersion = false;

if($this->template->compareVersions($newVersion, $this->config->item('FusionCMSVersion'), true))
if ($this->template->compareVersions($newVersion, $this->config->item('FusionCMSVersion'), true))
return true;

return false;
}
}

0 comments on commit 51ff3f8

Please sign in to comment.