Skip to content

Commit

Permalink
Merge pull request #20 from jasonclemons/master
Browse files Browse the repository at this point in the history
Pull Request: 2.1.0
  • Loading branch information
Jason Clemons committed Jul 13, 2013
2 parents b50c13a + 8d8c597 commit 45be667
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For more information on SemVer, please visit http://semver.org.
##Workflow

XboxLiveAPI will be developed using the [GitHub Workflow](http://scottchacon.com/2011/08/31/github-flow.html) as much as possible. All pull requests
must be against the `*-wip` branches. Commits will be made to `*.0.x-dev` branches before being pushed to `master`.
must be against `*-dev` branches.

##Author
- Email: me@jasonclemons.me
Expand Down Expand Up @@ -75,10 +75,3 @@ $data = $api->fetch_friends($gamertag, $region);
```php
$data = $api->fetch_search($query, $region);
```

## Hacking on XboxLiveAPI

From the root of the repository, install the tools used to develop.

$ bundle install
$ npm install
8 changes: 6 additions & 2 deletions source/includes/classes/base.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function output_error($code) {
http_response_code((int)$code);
}

if($this->version == "1.0") {
if($this->version == '1.0') {
$payload = array(
'Error' => $this->errors[$code],
'In' => round(microtime(true) - $this->runtime, 3),
Expand Down Expand Up @@ -434,6 +434,10 @@ protected function find($haystack, $start, $finish) {
}

protected function clean($string) {
if($this->format == 'xml') {
return $string;
}

$string = html_entity_decode($string, ENT_QUOTES, 'UTF-8');
$string = htmlentities($string, ENT_QUOTES, 'UTF-8');

Expand Down Expand Up @@ -511,7 +515,7 @@ function output_pretty_jsonp($json, $callback) {
*/
function output_pretty_xml($mixed, $xml = false) {
if($xml === false) {
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><xbox status="' . $mixed['status'] . '" version="' . $mixed['version'] . '" />');
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><xbox status="' . (empty($mixed['status']) ? $mixed['Stat'] : $mixed['status']) . '" version="' . (empty($mixed['version']) ? '1.0' : $mixed['version']) . '" />');
}

foreach($mixed as $key => $value) {
Expand Down

0 comments on commit 45be667

Please sign in to comment.