fixed console result to be parsed as int

This commit is contained in:
Ulf Gebhardt 2014-06-20 16:39:40 +02:00
parent fd0cdfd843
commit 7673c1dfc1
2 changed files with 4 additions and 4 deletions

View File

@ -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' ? '<status>on</status>' : '<status>off</status>';}
($res == 1) ? new WOW_STATS_ONLINE() : new WOW_STATS_OFLINE();
return ($res == 1) ? '<status>on</status>' : '<status>off</status>';}
}

View File

@ -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' ? '<status>on</status>' : '<status>off</status>';}
($res == 1) ? new WOW_STATS_ONLINE() : new WOW_STATS_OFLINE();
return ($res == 1) ? '<status>on</status>' : '<status>off</status>';}
}