From 09f6bebb193592f58a3ce3fecca9e13cecd14a47 Mon Sep 17 00:00:00 2001 From: Jason Clemons Date: Fri, 13 Sep 2013 12:09:01 -0400 Subject: [PATCH] online fix --- api/2.0/includes/classes/api.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/2.0/includes/classes/api.class.php b/api/2.0/includes/classes/api.class.php index ed95f79..a9b5f8e 100644 --- a/api/2.0/includes/classes/api.class.php +++ b/api/2.0/includes/classes/api.class.php @@ -55,7 +55,7 @@ public function fetch_profile($gamertag, $region) $user['gamerscore'] = (int) trim($this->find($data, '
', '
')); $user['reputation'] = 0; $user['presence'] = trim(str_replace("\r\n", ' - ', $this->find($data, '
', '
'))); - $user['online'] = (bool)(strpos($user['presence'], 'Online') !== false); + $user['online'] = (bool)(strpos($user['presence'], 'Online') !== false && strpos($user['presence'], 'Online Status Unavailable') === false); $user['gamertag'] = str_replace(array(''s Profile', '\'s Profile'), '', trim($this->find($data, '

', '

'))); $user['motto'] = $this->clean(trim(strip_tags($this->find($data, '
', '
')))); $user['name'] = trim(strip_tags($this->find($data, '
')));