|
|
@@ -46,8 +46,8 @@ class OtWebsiteRepository
|
|
|
if ($withRestrictions) {
|
|
|
$q->where($q->expr()->eq('deleted', 0));
|
|
|
}
|
|
|
- return $q->execute()
|
|
|
- ->fetchAll();
|
|
|
+ return $q->executeQuery()
|
|
|
+ ->fetchAllAssociative();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -65,7 +65,9 @@ class OtWebsiteRepository
|
|
|
if ($withRestrictions) {
|
|
|
$q->andWhere($q->expr()->eq('deleted', 0));
|
|
|
}
|
|
|
- $website = $q->execute()->fetch();
|
|
|
+ $website = $q
|
|
|
+ ->executeQuery()
|
|
|
+ ->fetchAssociative();
|
|
|
|
|
|
if (!isset($website['uid'])) {
|
|
|
throw new NoSuchWebsiteException('No website found with uid ' . $uid);
|
|
|
@@ -89,7 +91,9 @@ class OtWebsiteRepository
|
|
|
if ($withRestrictions) {
|
|
|
$q->andWhere($q->expr()->eq('deleted', 0));
|
|
|
}
|
|
|
- $website = $q->execute()->fetch();
|
|
|
+ $website = $q
|
|
|
+ ->executeQuery()
|
|
|
+ ->fetchAssociative();
|
|
|
|
|
|
if (!isset($website['uid'])) {
|
|
|
throw new NoSuchWebsiteException('No website found for organization ' . $organizationId);
|
|
|
@@ -116,7 +120,10 @@ class OtWebsiteRepository
|
|
|
if ($withRestrictions) {
|
|
|
$q->andWhere($q->expr()->eq('w.deleted', 0));
|
|
|
}
|
|
|
- $website = $q->execute()->fetch();
|
|
|
+ $website = $q
|
|
|
+ ->executeQuery()
|
|
|
+ ->fetchAssociative();
|
|
|
+
|
|
|
if (!isset($website['uid'])) {
|
|
|
throw new NoSuchWebsiteException('No website found for page ' . $pageUid);
|
|
|
}
|
|
|
@@ -135,8 +142,8 @@ class OtWebsiteRepository
|
|
|
->select('*')
|
|
|
->from('ot_websites')
|
|
|
->where($queryBuilder->expr()->eq('config_identifier', $queryBuilder->expr()->literal($identifier)))
|
|
|
- ->execute()
|
|
|
- ->fetch();
|
|
|
+ ->executeQuery()
|
|
|
+ ->fetchAssociative();
|
|
|
if (!isset($website['uid'])) {
|
|
|
throw new NoSuchWebsiteException('No website found for identifier ' . $identifier);
|
|
|
}
|
|
|
@@ -164,7 +171,7 @@ class OtWebsiteRepository
|
|
|
if ($withRestrictions) {
|
|
|
$q->andWhere($q->expr()->eq('deleted', 0));
|
|
|
}
|
|
|
- $rootUid = $q->executeQuery()->fetchFirstColumn()[0];
|
|
|
+ $rootUid = $q->executeQuery()->fetchOne();
|
|
|
if (!($rootUid > 0)) {
|
|
|
throw new NoSuchRecordException('No root page found for website ' . $websiteUid);
|
|
|
}
|
|
|
@@ -195,7 +202,10 @@ class OtWebsiteRepository
|
|
|
if ($withRestrictions) {
|
|
|
$q->andWhere($q->expr()->eq('w.deleted', 0));
|
|
|
}
|
|
|
- $rootUid = $q->execute()->fetchColumn(0);
|
|
|
+ $rootUid = $q
|
|
|
+ ->executeQuery()
|
|
|
+ ->fetchOne();
|
|
|
+
|
|
|
if (!$rootUid) {
|
|
|
throw new NoSuchWebsiteException("No website found for organization " . $organizationId);
|
|
|
}
|
|
|
@@ -404,7 +414,7 @@ class OtWebsiteRepository
|
|
|
->where($q->expr()->eq('ot_website_uid', $otWebsite['uid']))
|
|
|
->andWhere($q->expr()->eq('slug', $q->expr()->literal($tail)))
|
|
|
->executeQuery()
|
|
|
- ->fetchFirstColumn()[0];
|
|
|
+ ->fetchOne();
|
|
|
}
|
|
|
|
|
|
/**
|