Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:AKSW/Erfurt into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
seebi committed Jan 12, 2012
2 parents 1f2b859 + d162d54 commit e4ad71a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Erfurt/Store/Adapter/Virtuoso.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ public function getSearchPattern($stringSpec, $graphUris, $options)
'getSearchPattern option filter_properties not implemented in Virtuoso adapter yet.'
);
}

$searchPattern = array();

$subjectVariable = new Erfurt_Sparql_Query2_Var('resourceUri');
Expand Down Expand Up @@ -474,9 +473,9 @@ public function getSearchPattern($stringSpec, $graphUris, $options)
);
} else {
// string >= bifLimit characters
if (false === strpos($stringSpec, '*')) {
$stringSpec .= '*';
}
// if (false === strpos($stringSpec, '*')) {
// $stringSpec .= '*';
// }

$bifPrefix = new Erfurt_Sparql_Query2_Prefix(
'bif',
Expand All @@ -498,7 +497,7 @@ public function getSearchPattern($stringSpec, $graphUris, $options)
*/
new Erfurt_Sparql_Query2_Function(
$bifContains,
array($objectVariable, new Erfurt_Sparql_Query2_RDFLiteral($stringSpec, null, '\'"'))
array($objectVariable, new Erfurt_Sparql_Query2_RDFLiteral($stringSpec, null, '"'))
)
)
)
Expand Down Expand Up @@ -970,12 +969,10 @@ private function _execSparql($sparqlQuery, $graphUri = null)
// $sparqlQuery = addcslashes($sparqlQuery, '\'\\');

// build Virtuoso/PL query
$virtuosoPl = 'SPARQL ' . $sparqlQuery;

// $virtuosoPl = $graphSpec . 'CALL DB.DBA.SPARQL_EVAL(\'' . $sparqlQuery . '\', ' . $graphUri . ', 0)';

$resultId = @odbc_exec($this->connection(), $virtuosoPl);
//$virtuosoPl = 'SPARQL ' . $sparqlQuery;
$virtuosoPl = $graphSpec . 'CALL DB.DBA.SPARQL_EVAL(\'' . $sparqlQuery . '\', ' . $graphUri . ', 0)';

$resultId = odbc_exec($this->connection(), $virtuosoPl);
if (false === $resultId) {
$message = sprintf('SPARQL Error: %s in query: %s', $this->getLastError(), htmlentities($sparqlQuery));
throw new Erfurt_Store_Adapter_Exception($message);
Expand Down
1 change: 1 addition & 0 deletions Erfurt/config/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ auth.foafssl.agentCertFilename = "/etc/apache2/localhost.pem" ; Needs to be a va

ac.allowDbUser = true
ac.deactivateLogin = false
ac.deactivateRegistration = false

;; Access Control Schema Configuartion ---------------------------------------;;

Expand Down

0 comments on commit e4ad71a

Please sign in to comment.