diff --git a/src/Controller/System/CoreController.php b/src/Controller/System/CoreController.php index 42f6d33d..b7817a68 100644 --- a/src/Controller/System/CoreController.php +++ b/src/Controller/System/CoreController.php @@ -254,6 +254,8 @@ public function SystemAboutInformation(Request $request, ReleaseInfo $releaseinf $servicestatus = $releaseinfo->ServiceStatus(); $devstage = $releaseinfo->DevStage(); + $announcements = $releaseinfo->Announcements(); + return $this->render('system/sysinfo.html.twig', @@ -267,6 +269,7 @@ public function SystemAboutInformation(Request $request, ReleaseInfo $releaseinf 'servicestatus' => $servicestatus, 'devstage' => $devstage, 'uscron' => $uscron, + 'announcements' => $announcements, ] ); } diff --git a/src/Service/ReleaseInfo.php b/src/Service/ReleaseInfo.php index fa79f2ef..7127d3a9 100644 --- a/src/Service/ReleaseInfo.php +++ b/src/Service/ReleaseInfo.php @@ -73,12 +73,13 @@ public function UpdateCheck() public function Announcements() { try{ - $announcements = file_get_contents('https://update.stormdevelopers.com/get/details/2/announcements'); + $url = 'https://update.stormdevelopers.com/api/announcements/2'; + $json = file_get_contents($url); + $announcements = json_decode($json, TRUE); } catch(\Exception $e){ $announcements = 'Announcements are offline or no new announcements been sent, They will be some very soon'; } - return $announcements; } diff --git a/templates/system/sysinfo.html.twig b/templates/system/sysinfo.html.twig index 9262f077..5866ddc7 100644 --- a/templates/system/sysinfo.html.twig +++ b/templates/system/sysinfo.html.twig @@ -130,27 +130,27 @@ -