Skip to content

Commit acbb2d8

Browse files
committed
fixup! IBX-10854: Not possible to hide content draft
1 parent 3dfb2c7 commit acbb2d8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/lib/Repository/ContentService.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,8 +2528,8 @@ public function deleteTranslationFromDraft(APIVersionInfo $versionInfo, string $
25282528
*/
25292529
public function hideContent(ContentInfo $contentInfo): void
25302530
{
2531-
// If content is in draft state, mainLocationId is yet not set
2532-
if ($contentInfo->mainLocationId !== null) {
2531+
// If ContentInfo is in draft state, mainLocationId is yet not set
2532+
if (!$contentInfo->isDraft()) {
25332533
$locationTarget = (new DestinationLocationTarget($contentInfo->mainLocationId, $contentInfo));
25342534
if (!$this->permissionResolver->canUser(
25352535
'content',
@@ -2571,8 +2571,8 @@ public function hideContent(ContentInfo $contentInfo): void
25712571
*/
25722572
public function revealContent(ContentInfo $contentInfo): void
25732573
{
2574-
// If content is in draft state, mainLocationId is yet not set
2575-
if ($contentInfo->mainLocationId !== null) {
2574+
// If ContentInfo is in draft state, mainLocationId is yet not set
2575+
if (!$contentInfo->isDraft()) {
25762576
$locationTarget = (new DestinationLocationTarget($contentInfo->mainLocationId, $contentInfo));
25772577
if (!$this->permissionResolver->canUser(
25782578
'content',

0 commit comments

Comments
 (0)