Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"minimum-stability": "dev",
"require": {
"php": ">=8.2",
"commongateway/corebundle": "^1.3.18 | <2.0",
"commongateway/corebundle": "^1.4.13 | <2.0",
"smalot/pdfparser": "^2.8"
},
"require-dev": {
Expand Down
12 changes: 6 additions & 6 deletions publiccode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ nl:
dependsOn:
open:
- name: CommonGateway
versionMin: 1.3
versionMax: 2.0
version: 1.3.18
versionMin: 1.4
versionMax: 1.5
version: 1.4.13
optional: false
- name: CoreBundle
versionMin: 1.3
versionMax: 2.0
version: 1.3.18
versionMin: 1.4
versionMax: 1.5
version: 1.4.13
optional: false
roadmap: null
inputTypes:
Expand Down
8 changes: 4 additions & 4 deletions src/Service/SitemapService.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private function getSitemap(array $parameters): array
);

$publisherSchema = $this->resourceService->getSchema('https://commongateway.nl/woo.sitemap.schema.json', 'common-gateway/woo-bundle');
$publishers = $this->cacheService->searchObjects(null, ['oin' => $parameters['oin']], [$publisherSchema->getId()->toString()])['results'];
$publishers = $this->cacheService->searchObjects(['oin' => $parameters['oin']], [$publisherSchema->getId()->toString()])['results'];

if (count($publishers) === 0) {
$this->logger->error('Couldn\'t find a publisher for this oin: '.$parameters['oin'], ['plugin' => 'common-gateway/woo-bundle']);
Expand All @@ -233,7 +233,7 @@ private function getSitemap(array $parameters): array

// $filter = ['_limit' => 50000];
// Get all the publication objects with the given query.
$objects = $this->cacheService->searchObjects(null, $filter, [$publicatieSchema->getId()->toString()])['results'];
$objects = $this->cacheService->searchObjects($filter, [$publicatieSchema->getId()->toString()])['results'];

$sitemap = [];
foreach ($objects as $object) {
Expand Down Expand Up @@ -299,7 +299,7 @@ private function getSitemapindex(array $parameters): array
}

// Count all the publication objects with the given query.
$count = $this->cacheService->countObjects(null, $filter, [$publicatieSchema->getId()->toString()]);
$count = $this->cacheService->countObjects($filter, [$publicatieSchema->getId()->toString()]);
$pages = ((int) (($count - 1) / 50000) + 1);

// Get the domain of the request.
Expand Down Expand Up @@ -341,7 +341,7 @@ private function getRobot(array $parameters): array

$host = $this->requestStack->getMainRequest()->getHost();

$sitemaps = $this->cacheService->searchObjects(null, ['domains' => $host], [$sitemapSchema->getId()->toString()]);
$sitemaps = $this->cacheService->searchObjects(['domains' => $host], [$sitemapSchema->getId()->toString()]);

if (count($sitemaps['results']) === 1) {
$oin = $sitemaps['results'][0]['oin'];
Expand Down