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

Prevent ServiceModule::Execute from compacting empty url

- Stop it from throwing warnings and notices all over the place.
parent 28ca9e39
No related branches found
No related tags found
1 merge request!18Resolve "Remove all use of GLOBALS"
...@@ -204,27 +204,31 @@ final class ServiceModule implements ModuleInterface ...@@ -204,27 +204,31 @@ final class ServiceModule implements ModuleInterface
$prefixHeader = array(); $prefixHeader = array();
for ($i = 0; $i < sizeof($params); $i++) { for ($i = 0; $i < sizeof($params); $i++) {
if (Utils::mirror_external_uris($conf)) { if ($params[$i] && Utils::mirror_external_uris($conf)) {
$params[$i] = Utils::uri2curie($this->altUri($params, $i)); $params[$i] = Utils::uri2curie($this->altUri($params, $i));
} }
} }
$segmentConnector = ""; $segmentConnector = "";
for ($i = 0; $i < sizeof($params); $i++) { for ($i = 0; $i < sizeof($params); $i++) {
Utils::curie2uri($params[$i]); if ($params[$i]) {
$auxPrefix = Utils::getPrefix($params[$i]); Utils::curie2uri($params[$i]);
if ($auxPrefix['ns'] != null) { $auxPrefix = Utils::getPrefix($params[$i], $conf['ns']);
$prefixHeader[] = $auxPrefix;
} if ($auxPrefix['ns'] != null) {
$args["arg" . $i] = $params[$i]; $prefixHeader[] = $auxPrefix;
$args["all"] .= $segmentConnector . $params[$i]; }
if ($segmentConnector == "") {
$segmentConnector = "/"; $args["arg" . $i] = $params[$i];
$args["all"] .= $segmentConnector . $params[$i];
if ($segmentConnector == "") {
$segmentConnector = "/";
}
} }
} }
$results['params'] = $params;
$results['params'] = $params;
$lodspk['home'] = $conf['basedir']; $lodspk['home'] = $conf['basedir'];
$lodspk['baseUrl'] = $conf['basedir']; $lodspk['baseUrl'] = $conf['basedir'];
$lodspk['module'] = 'service'; $lodspk['module'] = 'service';
......
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