@@ -550,18 +550,18 @@ |
||
| 550 | 550 | if (!$format) { |
| 551 | 551 | return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . implode(' ', array_keys($urls))); |
| 552 | 552 | } |
| 553 | - if (is_array($urls[$format])) { |
|
| 554 | - $arr = $urls[$format]; |
|
| 555 | - $dataLang = $request->getLang(); |
|
| 556 | - if (isset($arr[$dataLang])) { |
|
| 553 | + if (is_array($urls[$format])) { |
|
| 554 | + $arr = $urls[$format]; |
|
| 555 | + $dataLang = $request->getLang(); |
|
| 556 | + if (isset($arr[$dataLang])) { |
|
| 557 | 557 | header("Location: " . $arr[$dataLang]); |
| 558 | - } else { |
|
| 559 | - $vocid = $request->getVocab()->getId(); |
|
| 560 | - return $this->returnError('404', 'Not Found', "No download source URL known for vocabulary $vocid in language $dataLang"); |
|
| 561 | - } |
|
| 562 | - } else { |
|
| 558 | + } else { |
|
| 559 | + $vocid = $request->getVocab()->getId(); |
|
| 560 | + return $this->returnError('404', 'Not Found', "No download source URL known for vocabulary $vocid in language $dataLang"); |
|
| 561 | + } |
|
| 562 | + } else { |
|
| 563 | 563 | header("Location: " . $urls[$format]); |
| 564 | - } |
|
| 564 | + } |
|
| 565 | 565 | } |
| 566 | 566 | |
| 567 | 567 | private function returnDataResults($results, $format) { |