Skip to content

Commit

Permalink
Fix category BaseURL
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-unikent committed Jan 26, 2015
1 parent 81e8962 commit a946708
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ public function get_category($url) {
// Curl the json for this category.
$raw = $this->curl("{$url}.json");

$parser = new Parser($this, $url, $raw);
$baseurl = strpos($url, API::MEDWAY_URL) !== false ? API::MEDWAY_URL : API::CANTERBURY_URL;
$parser = new Parser($this, $baseurl, $raw);
if (!$parser->is_valid()) {
return array();
}
Expand Down Expand Up @@ -255,4 +256,4 @@ protected function curl($url) {

return $result;
}
}
}

0 comments on commit a946708

Please sign in to comment.