diff --git a/src/Media/Repository/MediaRepository.php b/src/Media/Repository/MediaRepository.php index f7414c9..a3d4ec2 100644 --- a/src/Media/Repository/MediaRepository.php +++ b/src/Media/Repository/MediaRepository.php @@ -64,9 +64,8 @@ public function getMediaById(string $mediaId): MediaInterface { $result = $this->connection->executeQuery( $this->getMediaSelectSqlPart() - . "WHERE m.OXSHOPID = :OXSHOPID AND m.OXID = :OXID", + . "WHERE m.OXID = :OXID", [ - 'OXSHOPID' => $this->basicContext->getCurrentShopId(), 'OXID' => $mediaId ] ); diff --git a/tests/Integration/Media/Repository/MediaRepositoryTest.php b/tests/Integration/Media/Repository/MediaRepositoryTest.php index 094bef2..48b137e 100644 --- a/tests/Integration/Media/Repository/MediaRepositoryTest.php +++ b/tests/Integration/Media/Repository/MediaRepositoryTest.php @@ -232,7 +232,7 @@ public function testRenameMedia(): void $queryBuilder = $this->getAddItemQueryBuilder(); $queryBuilder->setParameters([ 'OXID' => $mediaIdToRename, - 'OXSHOPID' => 1, + 'OXSHOPID' => 2, 'DDFILENAME' => 'OriginalName', 'DDFILESIZE' => 0, 'DDFILETYPE' => 'any',