mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-16 01:08:41 +00:00
bug fixes with unit testing
This commit is contained in:
parent
96dee96aec
commit
73cee51f0f
|
|
@ -150,7 +150,7 @@
|
||||||
"foreignKey": "media_id"
|
"foreignKey": "media_id"
|
||||||
},
|
},
|
||||||
"media_tag_dst": {
|
"media_tag_dst": {
|
||||||
"name": "task_tag_dst",
|
"name": "media_tag_dst",
|
||||||
"type": "INT",
|
"type": "INT",
|
||||||
"null": false,
|
"null": false,
|
||||||
"foreignTable": "tag",
|
"foreignTable": "tag",
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ final class Installer extends InstallerAbstract
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static function createCollection($dbPool, $data) : Collection
|
private static function createCollection(DatabasePool $dbPool, array $data) : Collection
|
||||||
{
|
{
|
||||||
if (!isset($data['path'])) {
|
if (!isset($data['path'])) {
|
||||||
$dirPath = __DIR__ . '/../../../Modules/Media/Files' . ($data['virtualPath'] ?? '/') . '/' . ($data['name'] ?? '');
|
$dirPath = __DIR__ . '/../../../Modules/Media/Files' . ($data['virtualPath'] ?? '/') . '/' . ($data['name'] ?? '');
|
||||||
|
|
@ -144,7 +144,7 @@ final class Installer extends InstallerAbstract
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static function uploadMedia($dbPool, $data) : array
|
private static function uploadMedia(DatabasePool $dbPool, array $data) : array
|
||||||
{
|
{
|
||||||
$files = [];
|
$files = [];
|
||||||
foreach ($data['files'] as $file) {
|
foreach ($data['files'] as $file) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user