mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-11 17:08:40 +00:00
fix tests
This commit is contained in:
parent
732ae04ab7
commit
3c2420c8f4
|
|
@ -303,7 +303,7 @@ final class ApiController extends Controller
|
|||
* - FILE_PATH = combination of base path and virtual path
|
||||
* @param bool $hasAccountRelation The uploaded files should be related to an account
|
||||
*
|
||||
* @return Media[]
|
||||
* @return Collection
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
|
@ -1013,7 +1013,7 @@ final class ApiController extends Controller
|
|||
}
|
||||
|
||||
if (!$status) {
|
||||
$this->app->logger?->error(\phpOMS\Log\FileLogger::MSG_FULL, [
|
||||
$this->app->logger->error(\phpOMS\Log\FileLogger::MSG_FULL, [
|
||||
'message' => 'Couldn\'t create directory "' . $physicalPath . '"',
|
||||
'line' => __LINE__,
|
||||
'file' => self::class,
|
||||
|
|
@ -1101,7 +1101,11 @@ final class ApiController extends Controller
|
|||
string $collectionPath = ''
|
||||
) : void
|
||||
{
|
||||
$mediaFiles = MediaMapper::getAll()->where('id', $files)->executeGetArray();
|
||||
/** @var \Modules\Media\Models\Media[] $mediaFiles */
|
||||
$mediaFiles = MediaMapper::getAll()
|
||||
->where('id', $files)
|
||||
->executeGetArray();
|
||||
|
||||
$collection = null;
|
||||
|
||||
foreach ($mediaFiles as $media) {
|
||||
|
|
@ -1109,7 +1113,7 @@ final class ApiController extends Controller
|
|||
$this->createModelRelation($account, $rel, $media->id, $mapper, $field, '', '127.0.0.1');
|
||||
}
|
||||
|
||||
if (!empty($addToCollection)) {
|
||||
if (!empty($collectionPath)) {
|
||||
$ref = new Reference();
|
||||
$ref->name = $media->name;
|
||||
$ref->source = new NullMedia($media->id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user