From 8c02c800442c179950ca290e0987735bcf1de7bb Mon Sep 17 00:00:00 2001 From: Stein Magne Bjorklund <steinmb@smbjorklund.com> Date: Fri, 17 Sep 2021 14:28:12 +0200 Subject: [PATCH] Revert 0c67dc173 - Class Endpoint.php expect parameters We cannot just remove data from common.inc.php The class expect and try to use it throwing errors/warning every time the application load. --- classes/Endpoint.php | 4 ++-- common.inc.php | 3 +-- index.php | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/classes/Endpoint.php b/classes/Endpoint.php index d8b6744a..dc6f488b 100644 --- a/classes/Endpoint.php +++ b/classes/Endpoint.php @@ -8,7 +8,7 @@ class Endpoint private $sparqlUrl; private $params; - public function __construct($sparqlUrl, $params) + public function __construct($sparqlUrl, array $params) { $this->sparqlUrl = $sparqlUrl; $this->params = $params; @@ -29,7 +29,7 @@ class Endpoint } elseif ($output == 'rdf') { $accept = 'application/rdf+xml'; } - $aux = ""; + $modified = 0; $now = time(); $cacheFile = ""; diff --git a/common.inc.php b/common.inc.php index f88a26b2..fb18ae8d 100644 --- a/common.inc.php +++ b/common.inc.php @@ -5,8 +5,7 @@ $conf['home'] = LOADSPEAKR_ROOT . '/'; $conf['output']['select'] = 'json'; $conf['output']['ask'] = 'json'; $conf['output']['describe'] = 'rdf'; -//$conf['endpointParams']['config']['show_inline'] = 0; -//$conf['endpointParams']['config']['named_graph'] = ''; +$conf['endpointParams']['config'] = []; //ALternative endpoints $conf['endpoint']['dbpedia'] = 'http://dbpedia.org/sparql'; $conf['endpoint']['data_gov'] = 'http://services.data.gov/sparql'; diff --git a/index.php b/index.php index 40ba2c83..99d9d9cb 100644 --- a/index.php +++ b/index.php @@ -36,7 +36,6 @@ if ($conf['debug']) { $results = array(); $firstResults = array(); -$endpoints = array(); $endpoints['local'] = new Endpoint($conf['endpoint']['local'], $conf['endpointParams']['config']); $acceptContentType = Utils::getBestContentType($_SERVER['HTTP_ACCEPT'], $conf['http_accept']); $extension = Utils::getExtension($acceptContentType, $conf['http_accept']); -- GitLab