Skip to content
Snippets Groups Projects
Commit cb3bda20 authored by alvaro's avatar alvaro
Browse files

Fixing array to object issue

Fixing adding triples when external URI was off
parent 02b9f9fe
No related branches found
No related tags found
No related merge requests found
...@@ -208,7 +208,7 @@ class Utils{ ...@@ -208,7 +208,7 @@ class Utils{
$t = $parser->getTriples(); $t = $parser->getTriples();
$triples = array_merge($triples, $t); $triples = array_merge($triples, $t);
} }
if($lodspk['add_mirrored_uris']){ if($lodspk['mirror_external_uris']){
global $uri; global $uri;
global $localUri; global $localUri;
$t = array(); $t = array();
......
...@@ -117,7 +117,7 @@ class ServiceModule extends abstractModule{ ...@@ -117,7 +117,7 @@ class ServiceModule extends abstractModule{
Utils::queryFile($modelFile, $endpoints['local'], $results, $firstResults); Utils::queryFile($modelFile, $endpoints['local'], $results, $firstResults);
if(!$lodspk['resultRdf']){ if(!$lodspk['resultRdf']){
$results = Utils::internalize($results); $results = Utils::internalize($results);
$lodspk['firstResults'] = Utils::getfirstResults($results); $firstAux = Utils::getfirstResults($results);
// chdir($conf['home']); // chdir($conf['home']);
if(is_array($results)){ if(is_array($results)){
...@@ -126,6 +126,7 @@ class ServiceModule extends abstractModule{ ...@@ -126,6 +126,7 @@ class ServiceModule extends abstractModule{
}else{ }else{
$resultsObj = $results; $resultsObj = $results;
} }
$lodspk['firstResults'] = Convert::array_to_object($firstAux);
}else{ }else{
$resultsObj = $results; $resultsObj = $results;
} }
......
...@@ -89,7 +89,7 @@ class TypeModule extends abstractModule{ ...@@ -89,7 +89,7 @@ class TypeModule extends abstractModule{
Utils::queryFile($modelFile, $endpoints['local'], $results, $firstResults); Utils::queryFile($modelFile, $endpoints['local'], $results, $firstResults);
if(!$lodspk['resultRdf']){ if(!$lodspk['resultRdf']){
$results = Utils::internalize($results); $results = Utils::internalize($results);
$lodspk['firstResults'] = Utils::getfirstResults($results); $firstAux = Utils::getfirstResults($results);
//chdir($conf['home']); //chdir($conf['home']);
if(is_array($results)){ if(is_array($results)){
...@@ -98,6 +98,7 @@ class TypeModule extends abstractModule{ ...@@ -98,6 +98,7 @@ class TypeModule extends abstractModule{
}else{ }else{
$resultsObj = $results; $resultsObj = $results;
} }
$lodspk['firstResults'] = Convert::array_to_object($firstAux);
}else{ }else{
$resultsObj = $results; $resultsObj = $results;
} }
......
...@@ -104,7 +104,7 @@ class UriModule extends abstractModule{ ...@@ -104,7 +104,7 @@ class UriModule extends abstractModule{
Utils::queryFile($modelFile, $endpoints['local'], $results, $firstResults); Utils::queryFile($modelFile, $endpoints['local'], $results, $firstResults);
if(!$lodspk['resultRdf']){ if(!$lodspk['resultRdf']){
$results = Utils::internalize($results); $results = Utils::internalize($results);
$lodspk['firstResults'] = Utils::getfirstResults($results); $firstAux = Utils::getfirstResults($results);
chdir($conf['home']); chdir($conf['home']);
if(is_array($results)){ if(is_array($results)){
...@@ -113,6 +113,7 @@ class UriModule extends abstractModule{ ...@@ -113,6 +113,7 @@ class UriModule extends abstractModule{
}else{ }else{
$resultsObj = $results; $resultsObj = $results;
} }
$lodspk['firstResults'] = Convert::array_to_object($firstAux);
}else{ }else{
$resultsObj = $results; $resultsObj = $results;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment