diff --git a/includes/tuque.inc b/includes/tuque.inc index 7aed2556..48df99e8 100644 --- a/includes/tuque.inc +++ b/includes/tuque.inc @@ -66,7 +66,7 @@ class IslandoraTuque { * @param string $url * The url to the fedora instance. */ - public function __construct($user = NULL, $url = NULL) { + public function __construct($user = NULL, $url = NULL, $sparql_endpoint = NULL) { if (!isset($user)) { global $user; } @@ -84,9 +84,13 @@ class IslandoraTuque { $url = variable_get('islandora_base_url', 'http://localhost:8080/fedora'); } + if (!isset($sparql_endpoint)) { + $sparql_endpoint = variable_get('sparql_endpoint', $url); + } + if (self::exists()) { module_load_include('inc', 'islandora', 'includes/tuque_wrapper'); - $this->connection = new IslandoraRepositoryConnection($url, $user_string, $pass_string); + $this->connection = new IslandoraRepositoryConnection($url, $user_string, $pass_string, $sparql_endpoint); $this->connection->reuseConnection = TRUE; $this->api = new IslandoraFedoraApi($this->connection); $this->cache = new IslandoraSimpleCache();