Skip to content
Snippets Groups Projects
Commit 8b5af581 authored by Stein Magne Bjorklund's avatar Stein Magne Bjorklund
Browse files

Autoload MetaDb.php

parent 56fd61f8
No related branches found
No related tags found
No related merge requests found
<?php declare(strict_types=1);
namespace uib\ub\loadspeakr\modules;
use uib\ub\loadspeakr\MetaDb;
require_once('abstractModule.php');
......@@ -16,7 +17,6 @@ class RedirectModule extends abstractModule
global $endpoints;
global $lodspk;
require_once($conf['home'] . 'classes/MetaDb.php');
$metaDb = new MetaDb($conf['metadata']['db']['location']);
return true;
......
......@@ -25,7 +25,6 @@ class sparqlFilterModule extends abstractModule
global $results;
global $firstResults;
require_once($conf['home'] . 'classes/MetaDb.php');
$metaDb = new MetaDb($conf['metadata']['db']['location']);
$pair = Queries::getMetadata($localUri, $acceptContentType, $metaDb);
......
......@@ -22,7 +22,6 @@ class TypeModule extends abstractModule
global $endpoints;
global $lodspk;
require_once($conf['home'] . 'classes/MetaDb.php');
$metaDb = new MetaDb($conf['metadata']['db']['location']);
$pair = Queries::getMetadata($localUri, $acceptContentType, $metaDb);
......
......@@ -25,7 +25,7 @@ class UriModule extends abstractModule
if (!empty($conf['disableComponents']) && $conf['disableComponents'] == true) {
return false;
}
require_once('classes/MetaDb.php');
$metaDb = new MetaDb($conf['metadata']['db']['location']);
#LocalURI as is for looking up existing metadata. Fix fails if first paramater is changed to stripped localUri.
$pair = Queries::getMetadata($localUri, $acceptContentType, $metaDb);
......
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