From a94670833a21b10521ae510d4a3b6ac0612e200b Mon Sep 17 00:00:00 2001 From: Skylar Kelty Date: Mon, 26 Jan 2015 12:10:59 +0000 Subject: [PATCH] Fix category BaseURL --- src/API.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/API.php b/src/API.php index 543b7d0..a259f34 100644 --- a/src/API.php +++ b/src/API.php @@ -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(); } @@ -255,4 +256,4 @@ protected function curl($url) { return $result; } -} \ No newline at end of file +}