|
|
@@ -333,7 +333,7 @@ class OtWebsiteRepository
|
|
|
* @return Site
|
|
|
* @throws NoSuchWebsiteException
|
|
|
*/
|
|
|
- public function matchUriToWebsite(\Psr\Http\Message\UriInterface $uri, bool $devMode=false): array
|
|
|
+ public function matchUriToWebsite(\Psr\Http\Message\UriInterface $uri, bool $devMode=false, bool $withRestrictions = true): array
|
|
|
{
|
|
|
$queryBuilder = $this->connectionPool->getQueryBuilderForTable('ot_websites');
|
|
|
|
|
|
@@ -356,6 +356,10 @@ class OtWebsiteRepository
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if ($withRestrictions) {
|
|
|
+ $q = $q->andWhere($queryBuilder->expr()->eq('deleted', 0));
|
|
|
+ }
|
|
|
+
|
|
|
$website = $q->execute()
|
|
|
->fetch();
|
|
|
|