diff --git a/Controller/ApiController.php b/Controller/ApiController.php index a96bd91..80c47e2 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -246,7 +246,8 @@ final class ApiController extends Controller $old = clone $unit; $uploaded = $this->app->moduleManager->get('Media')->uploadFiles( - [$request->getData('name') ?? ''], + $request->getDataList('names') ?? [], + $request->getDataList('filenames') ?? [], $uploadedFiles, $request->header->account, __DIR__ . '/../../../Modules/Media/Files', diff --git a/Theme/Backend/position-profile.tpl.php b/Theme/Backend/position-profile.tpl.php index 4513149..79c59cd 100755 --- a/Theme/Backend/position-profile.tpl.php +++ b/Theme/Backend/position-profile.tpl.php @@ -15,7 +15,7 @@ declare(strict_types=1); use phpOMS\Uri\UriFactory; /** - * @var \phpOMS\Views\View $this + * @var \phpOMS\Views\View $this * @var \Modules\Organization\Models\Position; */ $position = $this->getData('position'); diff --git a/Theme/Backend/unit-profile.tpl.php b/Theme/Backend/unit-profile.tpl.php index bb005bc..7eebc2b 100755 --- a/Theme/Backend/unit-profile.tpl.php +++ b/Theme/Backend/unit-profile.tpl.php @@ -53,8 +53,8 @@ echo $this->getData('nav')->render(); ?> getData('unit-selector')->render('iParent', 'parent', false); ?> getData('editor')->render('unit-editor'); ?> getData('editor')->getData('text')->render( diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 051ac7e..f5fc99c 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -392,4 +392,4 @@ function phpServe() : void }); } -phpServe(); +\phpServe(); diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index fb9f004..6ba844a 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -416,7 +416,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $request = new HttpRequest(new HttpUri('')); $request->header->account = 1; - $request->setData('name', 'Organization Logo'); + $request->setData('names', 'Organization Logo'); $request->setData('id', 1); TestUtils::setMember($request, 'files', [