mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2026-06-01 21:54:48 -04:00
Re #11 - start working on an api
Also some locale negotiator bugfixes & it is now possible to serialize Service and Incident classess to JSON
This commit is contained in:
@@ -69,7 +69,7 @@ class Constellation
|
||||
* @param boolean $admin
|
||||
* @return array of services
|
||||
*/
|
||||
public function render_status($admin = 0){
|
||||
public function render_status($admin = false, $heading = true){
|
||||
global $mysqli;
|
||||
|
||||
$query = $mysqli->query("SELECT id, name FROM services");
|
||||
@@ -93,8 +93,10 @@ class Constellation
|
||||
$array[] = new Service($result['id'], $result['name']);
|
||||
}
|
||||
}
|
||||
|
||||
echo Service::current_status($array);
|
||||
if ($heading)
|
||||
{
|
||||
echo Service::current_status($array);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$array[] = new Service(0, _("No services"), -1);
|
||||
|
||||
Reference in New Issue
Block a user