Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.3.29'
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Oct 10, 2024
2 parents cca0152 + b6f1af4 commit cfbe1d8
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to Roadiz will be documented in this file.

## [2.3.29](https://github.com/roadiz/core-bundle-dev-app/compare/v2.3.28...v2.3.29) - 2024-10-10

### Bug Fixes

- Allow duplicated documents when embedding audio embed covers, fix #19 - ([e61e2ee](https://github.com/roadiz/core-bundle-dev-app/commit/e61e2ee7f6caf12275a86519085e50d41917003b))
- Do not throw exception on bad page and itemPerPage argument, just use defaults fix #20 - ([e051822](https://github.com/roadiz/core-bundle-dev-app/commit/e05182222564e2a4dd59048cbac5d7771fc99d82))

## [2.3.28](https://github.com/roadiz/core-bundle-dev-app/compare/v2.3.27...v2.3.28) - 2024-09-24

### Bug Fixes
Expand Down
5 changes: 5 additions & 0 deletions lib/Documents/src/MediaFinders/AbstractDeezerEmbedFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,9 @@ public function getSource(array &$options = []): string
// https://widget.deezer.com/widget/dark/playlist/9313425622
return $baseUri . '?' . http_build_query($queryString);
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,9 @@ public function getSource(array &$options = []): string

return 'https://www.mixcloud.com/widget/iframe/?' . http_build_query($queryString);
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
7 changes: 6 additions & 1 deletion lib/Documents/src/MediaFinders/AbstractPodcastFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function createDocumentFromFeed(

if (null !== $file) {
$documentFactory->setFile($file);
$document = $documentFactory->getDocument();
$document = $documentFactory->getDocument(false, $this->areDuplicatesAllowed());
if (null !== $document) {
/*
* Create document metas
Expand Down Expand Up @@ -239,4 +239,9 @@ public function getThumbnailURL(): ?string
}
return null;
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,9 @@ public function getSource(array &$options = []): string

return 'https://w.soundcloud.com/player/?' . http_build_query($queryString);
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
5 changes: 5 additions & 0 deletions lib/Documents/src/MediaFinders/AbstractSpotifyEmbedFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,9 @@ public function getSource(array &$options = []): string

return $this->embedId;
}

protected function areDuplicatesAllowed(): bool
{
return true;
}
}
2 changes: 1 addition & 1 deletion lib/RoadizCoreBundle/config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
parameters:
roadiz_core.cms_version: '2.3.28'
roadiz_core.cms_version: '2.3.29'
roadiz_core.cms_version_prefix: 'main'
env(APP_NAMESPACE): "roadiz"
env(APP_VERSION): "0.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ public function setDisplayingAllNodesStatuses(bool $displayAllNodesStatuses)
*/
public function setPage(int $page)
{
if ($page < 1) {
throw new \RuntimeException("Page cannot be lesser than 1.", 1);
}
$this->currentPage = (int) $page;
$this->currentPage = $page > 0 ? $page : 1;

return $this;
}
Expand Down Expand Up @@ -199,11 +196,7 @@ protected function getItemPerPage(): int
*/
public function setItemPerPage(int $itemPerPage)
{
if ($itemPerPage < 1) {
throw new \RuntimeException("Item count per page cannot be lesser than 1.", 1);
}

$this->itemPerPage = (int) $itemPerPage;
$this->itemPerPage = $itemPerPage > 0 ? $itemPerPage : 1;

return $this;
}
Expand Down

0 comments on commit cfbe1d8

Please sign in to comment.