From 7673c1dfc1910d3396659cf6d09b0b64de1aafcb Mon Sep 17 00:00:00 2001 From: rylon Date: Fri, 20 Jun 2014 16:39:40 +0200 Subject: [PATCH] fixed console result to be parsed as int --- mojotrollz/api/realm/realm.php | 4 ++-- mojotrollz/api/world/world.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mojotrollz/api/realm/realm.php b/mojotrollz/api/realm/realm.php index 6de927a..072cae1 100644 --- a/mojotrollz/api/realm/realm.php +++ b/mojotrollz/api/realm/realm.php @@ -2,6 +2,6 @@ class realm { public static function status(){ $res = shell_exec('/home/mojotrolls/mojo_zero/realm status 2>&1'); - $res == '1' ? new WOW_STATS_ONLINE() : new WOW_STATS_OFLINE(); - return $res == '1' ? 'on' : 'off';} + ($res == 1) ? new WOW_STATS_ONLINE() : new WOW_STATS_OFLINE(); + return ($res == 1) ? 'on' : 'off';} } \ No newline at end of file diff --git a/mojotrollz/api/world/world.php b/mojotrollz/api/world/world.php index 684d0a2..a972718 100644 --- a/mojotrollz/api/world/world.php +++ b/mojotrollz/api/world/world.php @@ -2,6 +2,6 @@ class world { public static function status(){ $res = shell_exec('/home/mojotrolls/mojo_zero/world status 2>&1'); - $res == '1' ? new WOW_STATS_ONLINE() : new WOW_STATS_OFLINE(); - return $res == '1' ? 'on' : 'off';} + ($res == 1) ? new WOW_STATS_ONLINE() : new WOW_STATS_OFLINE(); + return ($res == 1) ? 'on' : 'off';} }