From ff3b15caff71eea9c8af38447a847ace8786edda Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 9 Oct 2023 22:06:38 +0000 Subject: [PATCH] update --- Admin/Installer.php | 2 +- Controller.js | 5 +++-- Controller/ApiController.php | 2 +- Theme/Backend/Lang/ar.lang.php | 2 +- Theme/Backend/Lang/cs.lang.php | 2 +- Theme/Backend/Lang/da.lang.php | 2 +- Theme/Backend/Lang/de.lang.php | 2 +- Theme/Backend/Lang/el.lang.php | 2 +- Theme/Backend/Lang/es.lang.php | 2 +- Theme/Backend/Lang/fi.lang.php | 2 +- Theme/Backend/Lang/fr.lang.php | 2 +- Theme/Backend/Lang/hu.lang.php | 2 +- Theme/Backend/Lang/it.lang.php | 2 +- Theme/Backend/Lang/ja.lang.php | 2 +- Theme/Backend/Lang/ko.lang.php | 2 +- Theme/Backend/Lang/no.lang.php | 2 +- Theme/Backend/Lang/pl.lang.php | 2 +- Theme/Backend/Lang/pt.lang.php | 2 +- Theme/Backend/Lang/ru.lang.php | 2 +- Theme/Backend/Lang/sv.lang.php | 2 +- Theme/Backend/Lang/th.lang.php | 2 +- Theme/Backend/Lang/tr.lang.php | 2 +- Theme/Backend/Lang/uk.lang.php | 2 +- Theme/Backend/Lang/zh.lang.php | 2 +- tests/Controller/ApiControllerTest.php | 14 +++++++------- 25 files changed, 33 insertions(+), 32 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index 6d55a69..7ac82a1 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -144,7 +144,7 @@ final class Installer extends InstallerAbstract $module->apiEditorDocTypeCreate($request, $response); - $responseData = $response->get(''); + $responseData = $response->getData(''); if (!\is_array($responseData)) { return []; } diff --git a/Controller.js b/Controller.js index 88f1c13..0f4f8ae 100755 --- a/Controller.js +++ b/Controller.js @@ -1,9 +1,10 @@ +import { jsOMS } from '../../jsOMS/Utils/oLib.js'; import { Autoloader } from '../../jsOMS/Autoloader.js'; import { Editor } from './Models/Editor.js'; -Autoloader.defineNamespace('jsOMS.Modules'); +Autoloader.defineNamespace('omsApp.Modules'); -jsOMS.Modules.Editor = class { +omsApp.Modules.Editor = class { constructor(app) { this.app = app; diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 1a90284..2ab7d88 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -268,7 +268,7 @@ final class ApiController extends Controller $internalResponse = new HttpResponse(); $this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse); - if (!\is_array($data = $internalResponse->get($request->uri->__toString()))) { + if (!\is_array($data = $internalResponse->getDataArray($request->uri->__toString()))) { continue; } diff --git a/Theme/Backend/Lang/ar.lang.php b/Theme/Backend/Lang/ar.lang.php index a791169..dab8ea4 100755 --- a/Theme/Backend/Lang/ar.lang.php +++ b/Theme/Backend/Lang/ar.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'يبدأ', 'Text' => 'نص', 'Title' => 'عنوان', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/cs.lang.php b/Theme/Backend/Lang/cs.lang.php index dc44eba..9dfee93 100755 --- a/Theme/Backend/Lang/cs.lang.php +++ b/Theme/Backend/Lang/cs.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Start', 'Text' => 'Text', 'Title' => 'Titul', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/da.lang.php b/Theme/Backend/Lang/da.lang.php index faf1c63..391f74b 100755 --- a/Theme/Backend/Lang/da.lang.php +++ b/Theme/Backend/Lang/da.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Start', 'Text' => 'Tekst', 'Title' => 'Titel', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 0bd63a6..c0efd57 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Anfang', 'Text' => 'Text', 'Title' => 'Titel', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/el.lang.php b/Theme/Backend/Lang/el.lang.php index 272705a..91a96c8 100755 --- a/Theme/Backend/Lang/el.lang.php +++ b/Theme/Backend/Lang/el.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Αρχή', 'Text' => 'Κείμενο', 'Title' => 'Τίτλος', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/es.lang.php b/Theme/Backend/Lang/es.lang.php index 0ab5856..03567e5 100755 --- a/Theme/Backend/Lang/es.lang.php +++ b/Theme/Backend/Lang/es.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Comienzo', 'Text' => 'Texto', 'Title' => 'Título', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/fi.lang.php b/Theme/Backend/Lang/fi.lang.php index 8d298c4..f903dc5 100755 --- a/Theme/Backend/Lang/fi.lang.php +++ b/Theme/Backend/Lang/fi.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'alkaa', 'Text' => 'Teksti', 'Title' => 'Otsikko', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/fr.lang.php b/Theme/Backend/Lang/fr.lang.php index 8fa24a1..dd5f62e 100755 --- a/Theme/Backend/Lang/fr.lang.php +++ b/Theme/Backend/Lang/fr.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Démarrer', 'Text' => 'Texte', 'Title' => 'Titre', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/hu.lang.php b/Theme/Backend/Lang/hu.lang.php index 5462640..2f9832d 100755 --- a/Theme/Backend/Lang/hu.lang.php +++ b/Theme/Backend/Lang/hu.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Rajt', 'Text' => 'Szöveg', 'Title' => 'Cím', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/it.lang.php b/Theme/Backend/Lang/it.lang.php index 0325cd1..0cc5ec4 100755 --- a/Theme/Backend/Lang/it.lang.php +++ b/Theme/Backend/Lang/it.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Inizio', 'Text' => 'Testo', 'Title' => 'Titolo', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/ja.lang.php b/Theme/Backend/Lang/ja.lang.php index 0c4890c..6022e64 100755 --- a/Theme/Backend/Lang/ja.lang.php +++ b/Theme/Backend/Lang/ja.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => '始める', 'Text' => '文章', 'Title' => 'タイトル', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/ko.lang.php b/Theme/Backend/Lang/ko.lang.php index 2fb1808..2f096f7 100755 --- a/Theme/Backend/Lang/ko.lang.php +++ b/Theme/Backend/Lang/ko.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => '시작', 'Text' => '텍스트', 'Title' => '제목', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php index da898e8..a75867b 100755 --- a/Theme/Backend/Lang/no.lang.php +++ b/Theme/Backend/Lang/no.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Start', 'Text' => 'Tekst', 'Title' => 'Tittel', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/pl.lang.php b/Theme/Backend/Lang/pl.lang.php index b7e5728..22c023b 100755 --- a/Theme/Backend/Lang/pl.lang.php +++ b/Theme/Backend/Lang/pl.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Początek', 'Text' => 'Tekst', 'Title' => 'Tytuł', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/pt.lang.php b/Theme/Backend/Lang/pt.lang.php index 22931a8..65a9ae7 100755 --- a/Theme/Backend/Lang/pt.lang.php +++ b/Theme/Backend/Lang/pt.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Começar', 'Text' => 'Texto', 'Title' => 'Título', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/ru.lang.php b/Theme/Backend/Lang/ru.lang.php index 8e05951..10a0cbc 100755 --- a/Theme/Backend/Lang/ru.lang.php +++ b/Theme/Backend/Lang/ru.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Начинать', 'Text' => 'Текст', 'Title' => 'Заголовок', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php index 62b452c..a7d0c17 100755 --- a/Theme/Backend/Lang/sv.lang.php +++ b/Theme/Backend/Lang/sv.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Start', 'Text' => 'Text', 'Title' => 'Titel', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/th.lang.php b/Theme/Backend/Lang/th.lang.php index 70f10f5..a8a674d 100755 --- a/Theme/Backend/Lang/th.lang.php +++ b/Theme/Backend/Lang/th.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'เริ่ม', 'Text' => 'ข้อความ', 'Title' => 'ชื่อ', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/tr.lang.php b/Theme/Backend/Lang/tr.lang.php index 68f7216..2afa29b 100755 --- a/Theme/Backend/Lang/tr.lang.php +++ b/Theme/Backend/Lang/tr.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Başlangıç', 'Text' => 'Metin', 'Title' => 'Başlık', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/uk.lang.php b/Theme/Backend/Lang/uk.lang.php index f5063f4..534acce 100755 --- a/Theme/Backend/Lang/uk.lang.php +++ b/Theme/Backend/Lang/uk.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => 'Почати', 'Text' => 'Текст', 'Title' => 'Заголовок', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/Theme/Backend/Lang/zh.lang.php b/Theme/Backend/Lang/zh.lang.php index 87e8564..81ed1a6 100755 --- a/Theme/Backend/Lang/zh.lang.php +++ b/Theme/Backend/Lang/zh.lang.php @@ -30,5 +30,5 @@ return ['Editor' => [ 'Start' => '开始', 'Text' => '文本', 'Title' => '标题', - 'Type' => '#VALUE!', + 'Type' => '', ]]; diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index f92cc31..b34aaca 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -125,8 +125,8 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->module->apiEditorCreate($request, $response); - self::assertEquals('Controller Test Title', $response->get('')['response']->title); - self::assertGreaterThan(0, $response->get('')['response']->id); + self::assertEquals('Controller Test Title', $response->getDataArray('')['response']->title); + self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } /** @@ -159,7 +159,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $request->setData('media', \json_encode([1])); $this->module->apiFileCreate($request, $response); - self::assertCount(1, $response->get('')['response']); + self::assertCount(1, $response->getDataArray('')['response']); } /** @@ -226,9 +226,9 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->module->apiEditorUpdate($request, $response); - self::assertEquals('Changed Title', $response->get('')['response']->title); + self::assertEquals('Changed Title', $response->getDataArray('')['response']->title); self::assertEquals('Changed Title', EditorDocMapper::get()->where('id', 1)->execute()->title); - self::assertEquals(1, $response->get('')['response']->id); + self::assertEquals(1, $response->getDataArray('')['response']->id); } /** @@ -244,7 +244,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $request->setData('id', '1'); $this->module->apiEditorGet($request, $response); - self::assertEquals('Changed Title', $response->get('')['response']->title); + self::assertEquals('Changed Title', $response->getDataArray('')['response']->title); } /** @@ -268,7 +268,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->module->apiEditorDelete($request, $response); - self::assertEquals($docId, $response->get('')['response']->id); + self::assertEquals($docId, $response->getDataArray('')['response']->id); self::assertInstanceOf(NullEditorDoc::class, EditorDocMapper::get()->where('id', $docId)->execute()); } }