Skip to content

Commit

Permalink
Merge pull request #883 from NatLibFi/issue882-content-language-for-R…
Browse files Browse the repository at this point in the history
…estController

Added content language parameter to rest controller
  • Loading branch information
joelit authored Aug 15, 2019
2 parents 068d34f + 1974b6f commit e352b54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/Concept.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public function getMappingProperties(array $whitelist = null)
}

if ($response) {
$ret[$prop]->addValue(new ConceptMappingPropertyValue($this->model, $this->vocab, $response, $this->resource, $prop), $this->clang);
$ret[$prop]->addValue(new ConceptMappingPropertyValue($this->model, $this->vocab, $response, $this->resource, $prop, $this->clang), $this->clang);

$this->processExternalResource($response);

Expand Down Expand Up @@ -524,7 +524,7 @@ public function getProperties()
// note that this imply that the property has an rdf:type declared for the query to work
if(!$is_well_known && !$proplabel) {
$envLangLabels = $this->model->getDefaultSparql()->queryLabel($longUri, $this->getEnvLang());

$defaultPropLabel = $this->model->getDefaultSparql()->queryLabel($longUri, '');

if($envLangLabels) {
Expand Down
3 changes: 3 additions & 0 deletions rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
if ($request->getQueryParam('vocab')) {
$request->setVocab($request->getQueryParam('vocab'));
}
if ($request->getQueryParam('clang')) {
$request->setContentLang($request->getQueryParam('clang'));
}

if (sizeof($parts) < 2 || $parts[1] == "") {
header("HTTP/1.0 404 Not Found");
Expand Down

0 comments on commit e352b54

Please sign in to comment.