Skip to content
Snippets Groups Projects
Commit ba6a5db7 authored by alangrafu's avatar alangrafu
Browse files

Fixed bug with soft links for models and views

Instead of returning to ".." it will go to $conf['home']
parent 64117d55
No related branches found
No related tags found
No related merge requests found
......@@ -46,21 +46,6 @@ class SpecialFunction extends AbstractSpecialFunction{
$endpoints = $context['endpoints'];
array_pop($params);
array_shift($params);
//$query = file_get_contents($conf['model']['directory'].$modelFile);
/*$queryHeader = "";
$prefixHeader = array();
for($i=0;$i<sizeof($params);$i++){
$auxPrefix = Utils::getPrefix($params[$i]);
if($auxPrefix['ns'] != NULL){
$prefixHeader[$auxPrefix['ns']] = $auxPrefix['prefix'];
}
$query = preg_replace("|%".$i."|", $params[$i], $query);
}
foreach($prefixHeader as $n => $p){
$queryHeader .= "PREFIX $p: <$n> \n";
}
$data['query'] =$queryHeader . $query;*/
//$e->query($data['query'], Utils::getResultsType($query));
$prefixHeader = array();
for($i=0;$i<sizeof($params);$i++){
......@@ -97,7 +82,7 @@ class SpecialFunction extends AbstractSpecialFunction{
$base['model']['directory'] = $conf['home'].$conf['model']['directory'];
chdir($conf['model']['directory']);
Utils::queryFile($modelFile, $endpoints['local'], $data);
chdir("..");
chdir($conf['home']);
$data = Utils::internalize($data);
if(is_array($data)){
......
......@@ -12,7 +12,7 @@ class Utils{
public static function send404($uri){
header("HTTP/1.0 404 Not Found");
echo "I could not find ".$uri." or information about it.\n\n";
echo "LODSPeaKr could not find ".$uri." or information about it.\n\n";
exit(0);
}
......@@ -272,7 +272,7 @@ class Utils{
Utils::queryDir($v, $r);
}
}
chdir("..");
chdir($conf['home']);
//return $data;
}
......
......@@ -128,7 +128,7 @@ chdir($conf['model']['directory']);
Utils::queryFile($modelFile, $endpoints['local'], $results, $first);
$results = Utils::internalize($results);
$base['first'] = Utils::getFirsts($results);
chdir("..");
chdir($conf['home']);
if(is_array($results)){
$resultsObj = Convert::array_to_object($results);
}else{
......
......@@ -27,7 +27,7 @@ while [ "$everything_ok" != "y" ]; do
echo
echo "LODSPeaKr needs to know three (3) URIs to minimally configure itself:"
echo
echo "(1/3) At what URL will `pwd` be available? (e.g. http://localhost/$parent/)"
echo "(1/3) At what URL will `pwd |sed -e 's/lodspeakr$//'` be available? (e.g. http://localhost/$parent/)"
echo "**Note** DO NOT include 'lodspeakr/' in the URL"
echo -n "(default '$basedir'): "
read -u 1 aux_basedir
......
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