Skip to content

Commit

Permalink
online fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Clemons committed Sep 13, 2013
1 parent 896274a commit 09f6beb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/2.0/includes/classes/api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function fetch_profile($gamertag, $region)
$user['gamerscore'] = (int) trim($this->find($data, '<div class="gamerscore">', '</div>'));
$user['reputation'] = 0;
$user['presence'] = trim(str_replace("\r\n", ' - ', $this->find($data, '<div class="presence">', '</div>')));
$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('&#39;s Profile', '\'s Profile'), '', trim($this->find($data, '<h1 class="pageTitle">', '</h1>')));
$user['motto'] = $this->clean(trim(strip_tags($this->find($data, '<div class="motto">', '</div>'))));
$user['name'] = trim(strip_tags($this->find($data, '<div class="name" title="', '">')));
Expand Down

0 comments on commit 09f6beb

Please sign in to comment.