Skip to content

Commit 49d2f81

Browse files
committed
Fix table names
1 parent 62f4015 commit 49d2f81

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

bundle/Command/ScheduledVisibilityUpdateCommand.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Netgen\Bundle\IbexaScheduledVisibilityBundle\Command;
66

7+
use Doctrine\DBAL\ArrayParameterType;
78
use Doctrine\DBAL\Connection;
89
use Doctrine\DBAL\Query\QueryBuilder;
910
use Ibexa\Contracts\Core\Repository\ContentService;
@@ -205,7 +206,7 @@ private function getQueryBuilder(?int $since, array $contentTypeIds): QueryBuild
205206

206207
$queryBuilder
207208
->select('id', 'initial_language_id')
208-
->from('ezcontentobject')
209+
->from('ibexa_content')
209210
->where('published != :unpublished')
210211
->andWhere('status != :trashed')
211212
->orderBy('id', 'ASC')
@@ -242,8 +243,8 @@ private function applyContentTypes(QueryBuilder $query, array $contentTypeIds):
242243
}
243244

244245
$query
245-
->andWhere($query->expr()->in('contentclass_id', ':content_type_ids'))
246-
->setParameter('content_type_ids', $contentTypeIds, Connection::PARAM_INT_ARRAY)
246+
->andWhere($query->expr()->in('content_type_id', ':content_type_ids'))
247+
->setParameter('content_type_ids', $contentTypeIds, ArrayParameterType::INTEGER)
247248
;
248249
}
249250

@@ -255,7 +256,7 @@ private function getPager(?int $since): Pagerfanta
255256

256257
$countQueryBuilderModifier = function (QueryBuilder $queryBuilder) use ($since, $contentTypeIds): void {
257258
$queryBuilder->select('COUNT(id) AS total_results')
258-
->from('ezcontentobject')
259+
->from('ibexa_content')
259260
->where('published != :unpublished')
260261
->setParameter('unpublished', 0)
261262
->setParameter('trashed', ContentInfo::STATUS_TRASHED)

docs/reference/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Content types
99
-------------
1010

1111
For content to be accepted by scheduled visibility mechanism,
12-
its content type must contain two fields that are either ``ezdate`` or ``ezdatetime``.
12+
its content type must contain two fields that are either ``ibexa_date`` or ``ibexa_datetime``.
1313
Identifiers of these fields must be ``publish_from`` and ``published_to``.
1414

1515
.. warning::

0 commit comments

Comments
 (0)