From d4f84e4dc9aecb956827128baf668e31b2992490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=BB=C3=B3=C5=82tak?= Date: Tue, 13 Feb 2024 20:33:06 +0100 Subject: [PATCH] ServiceTrait:getRevProxy(): use PredicateTemplate --- .../arche/lib/disserv/dissemination/ServiceTrait.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/acdhOeaw/arche/lib/disserv/dissemination/ServiceTrait.php b/src/acdhOeaw/arche/lib/disserv/dissemination/ServiceTrait.php index a725065..bb5d85b 100644 --- a/src/acdhOeaw/arche/lib/disserv/dissemination/ServiceTrait.php +++ b/src/acdhOeaw/arche/lib/disserv/dissemination/ServiceTrait.php @@ -245,7 +245,7 @@ public function getLocation(): string { */ public function getRevProxy(): bool { $meta = $this->getMetadata(); - $value = $meta->getObject($this->getRepo()->getSchema()->dissService->revProxy)?->getValue() ?? false; + $value = $meta->getObject(new PT($this->getRepo()->getSchema()->dissService->revProxy))?->getValue() ?? false; return (bool) $value; } @@ -381,9 +381,9 @@ private function loadParameters(): void { private function getResNmspId(RepoResourceInterface $res, string $namespace, bool $force): string { $namespaces = $res->getRepo()->getSchema()->namespaces; - $nmsp = $namespaces->$namespace ?? throw new RepoLibException("namespace '$namespace' is not defined in the config"); - $ids = $res->getIds(); - $match = null; + $nmsp = $namespaces->$namespace ?? throw new RepoLibException("namespace '$namespace' is not defined in the config"); + $ids = $res->getIds(); + $match = null; foreach ($ids as $i) { if (str_starts_with($i, $nmsp)) { $otherNmsp = false;