From e2961319c1f428ce7d46fcff3201901e1a7d659f Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 24 Mar 2023 16:20:23 +0100 Subject: [PATCH] registration fixes --- Admin/Install/Navigation.install.json | 2 +- Admin/Install/Navigation.php | 4 +- Admin/Install/NavigationSkeleton.php | 2 +- Admin/Install/Search.php | 4 +- Admin/Install/SearchCommands.php | 2 +- Admin/Installer.php | 66 +++++----- Admin/Routes/Web/Backend.php | 2 +- .../Theme/Backend/modules-nav-list.tpl.php | 2 +- .../Theme/Backend/settings-nav.tpl.php | 2 +- Admin/Settings/Theme/Backend/settings.tpl.php | 8 +- Admin/Status.php | 4 +- Admin/Uninstaller.php | 4 +- Admin/Updater.php | 4 +- Controller/ApiController.php | 116 ++++++++++++++++++ Controller/BackendController.php | 8 +- Controller/Controller.php | 4 +- Controller/SearchController.php | 12 +- Controller/TimerecordingController.php | 4 +- Models/LinkStatus.php | 4 +- Models/LinkType.php | 4 +- Models/NavElement.php | 4 +- Models/NavElementMapper.php | 4 +- Models/Navigation.php | 4 +- Models/NavigationType.php | 4 +- Models/NullNavElement.php | 4 +- 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/en.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 +- Theme/Backend/mid-side.tpl.php | 2 +- Theme/Backend/mid.tpl.php | 2 +- Theme/Backend/side.tpl.php | 2 +- Theme/Backend/splash.tpl.php | 2 +- Theme/Backend/top.tpl.php | 2 +- Views/NavigationView.php | 4 +- tests/Admin/AdminTest.php | 2 +- tests/Autoloader.php | 4 +- tests/Controller/SearchControllerTest.php | 4 +- tests/Models/NavigationTest.php | 2 +- tests/Views/NavigationViewTest.php | 2 +- 58 files changed, 234 insertions(+), 116 deletions(-) create mode 100644 Controller/ApiController.php diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index e274528..3479060 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -5,7 +5,7 @@ "type": 3, "subtype": 1, "name": "Navigation", - "uri": "{/lang}/{/app}/admin/module/navigation/list?{?}", + "uri": "{/base}/admin/module/navigation/list?{?}", "target": "self", "icon": null, "order": 10, diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index f7e5bde..a883c6e 100755 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Admin\Install * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract; * Navigation class. * * @package Modules\Navigation\Admin\Install - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Admin/Install/NavigationSkeleton.php b/Admin/Install/NavigationSkeleton.php index 0793128..a284920 100755 --- a/Admin/Install/NavigationSkeleton.php +++ b/Admin/Install/NavigationSkeleton.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Admin/Install/Search.php b/Admin/Install/Search.php index 4f47df2..6bd2fe9 100755 --- a/Admin/Install/Search.php +++ b/Admin/Install/Search.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Admin\Install * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract; * Search class. * * @package Modules\Navigation\Admin\Install - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Admin/Install/SearchCommands.php b/Admin/Install/SearchCommands.php index a8d7632..04a4903 100755 --- a/Admin/Install/SearchCommands.php +++ b/Admin/Install/SearchCommands.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Admin/Installer.php b/Admin/Installer.php index c8601f3..0488e35 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Admin * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -14,19 +14,19 @@ declare(strict_types=1); namespace Modules\Navigation\Admin; -use Modules\Navigation\Models\NavElement; -use Modules\Navigation\Models\NavElementMapper; use phpOMS\Application\ApplicationAbstract; -use phpOMS\DataStorage\Database\DatabasePool; +use phpOMS\Message\Http\HttpRequest; +use phpOMS\Message\Http\HttpResponse; use phpOMS\Module\InstallerAbstract; use phpOMS\System\File\PathException; +use phpOMS\Uri\HttpUri; use phpOMS\Utils\Parser\Php\ArrayParser; /** * Installer class. * * @package Modules\Navigation\Admin - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ @@ -76,7 +76,7 @@ final class Installer extends InstallerAbstract } foreach ($navData as $link) { - self::installLink($app->dbPool, $link, $data['app'] ?? null); + self::installLink($app, $link, $data['app'] ?? null); } return []; @@ -119,42 +119,44 @@ final class Installer extends InstallerAbstract /** * Install navigation element. * - * @param DatabasePool $dbPool Database instance - * @param array $data Link info - * @param int $app App + * @param ApplicationAbstract $app Application + * @param array $data Link info + * @param int $appId App * * @return void * * @since 1.0.0 */ - private static function installLink(DatabasePool $dbPool, array $data, int $app = null) : void + private static function installLink(ApplicationAbstract $app, array $data, int $appId = null) : void { - // @todo: implement in the api and then make an api call becuse we also want to be able to install - // navigation elements manually through the user interface?! - $navElement = new NavElement(); + /** @var \Modules\Navigation\Controller\ApiController $module */ + $module = $app->moduleManager->getModuleInstance('Navigation'); - $navElement->id = (int) ($data['id'] ?? 0); - $navElement->pid = \sha1(\str_replace('/', '', $data['pid'] ?? '')); - $navElement->pidRaw = $data['pid'] ?? ''; - $navElement->name = (string) ($data['name'] ?? ''); - $navElement->type = (int) ($data['type'] ?? 1); - $navElement->subtype = (int) ($data['subtype'] ?? 2); - $navElement->icon = $data['icon'] ?? null; - $navElement->uri = $data['uri'] ?? null; - $navElement->target = (string) ($data['target'] ?? 'self'); - $navElement->action = $data['action'] ?? null; - $navElement->app = (int) ($data['app'] ?? ($app ?? 2)); - $navElement->from = empty($from = (string) ($data['from'] ?? '')) ? '0' : $from; - $navElement->order = (int) ($data['order'] ?? 1); - $navElement->parent = (int) ($data['parent'] ?? 0); - $navElement->permissionPerm = $data['permission']['permission'] ?? null; - $navElement->permissionCategory = $data['permission']['category'] ?? null; - $navElement->permissionElement = $data['permission']['element'] ?? null; + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); - NavElementMapper::create()->execute($navElement); + $request->header->account = 1; + $request->setData('id', (int) ($data['id'] ?? 0)); + $request->setData('pid', $data['pid'] ?? ''); + $request->setData('name', (string) ($data['name'] ?? '')); + $request->setData('type', (int) ($data['type'] ?? 1)); + $request->setData('subtype', (int) ($data['subtype'] ?? 2)); + $request->setData('icon', $data['icon'] ?? null); + $request->setData('uri', $data['uri'] ?? null); + $request->setData('target', (string) ($data['target'] ?? 'self')); + $request->setData('action', $data['action'] ?? null); + $request->setData('app', (int) ($data['app'] ?? ($appId ?? 2))); + $request->setData('from', empty($from = (string) ($data['from'] ?? '')) ? '0' : $from); + $request->setData('order', (int) ($data['order'] ?? 1)); + $request->setData('parent', (int) ($data['parent'] ?? 0)); + $request->setData('permission', $data['permission']['permission'] ?? null); + $request->setData('category', $data['permission']['category'] ?? null); + $request->setData('element', $data['permission']['element'] ?? null); + + $module->apiNavElementCreate($request, $response); foreach ($data['children'] as $link) { - self::installLink($dbPool, $link, $app); + self::installLink($app, $link, $appId); } } } diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index b0ca87f..5e73466 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -6,7 +6,7 @@ * * @package Modules * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Admin/Settings/Theme/Backend/modules-nav-list.tpl.php b/Admin/Settings/Theme/Backend/modules-nav-list.tpl.php index 29ee526..76376e6 100755 --- a/Admin/Settings/Theme/Backend/modules-nav-list.tpl.php +++ b/Admin/Settings/Theme/Backend/modules-nav-list.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Admin\Template\Backend * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Admin/Settings/Theme/Backend/settings-nav.tpl.php b/Admin/Settings/Theme/Backend/settings-nav.tpl.php index f9f1926..5dfdf2e 100755 --- a/Admin/Settings/Theme/Backend/settings-nav.tpl.php +++ b/Admin/Settings/Theme/Backend/settings-nav.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Auditor * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Admin/Settings/Theme/Backend/settings.tpl.php b/Admin/Settings/Theme/Backend/settings.tpl.php index 0755a65..2241ec1 100755 --- a/Admin/Settings/Theme/Backend/settings.tpl.php +++ b/Admin/Settings/Theme/Backend/settings.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Auditor * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory; */ $navs = $this->getData('navigation') ?? []; -$previous = empty($navs) ? 'admin/nav/list' : '{/lang}/{/app}/admin/nav/list?{?}&id=' . \reset($navs)->id . '&ptype=p'; -$next = empty($navs) ? 'admin/nav/list' : '{/lang}/{/app}/admin/nav/list?{?}&id=' . \end($navs)->id . '&ptype=n'; +$previous = empty($navs) ? 'admin/nav/list' : '{/base}/admin/nav/list?{?}&id=' . \reset($navs)->id . '&ptype=p'; +$next = empty($navs) ? 'admin/nav/list' : '{/base}/admin/nav/list?{?}&id=' . \end($navs)->id . '&ptype=n'; echo $this->getData('nav')->render(); ?> @@ -132,7 +132,7 @@ echo $this->getData('nav')->render(); ?> $nav) : ++$count; - $url = UriFactory::build('{/lang}/{/app}/admin/module/settings?id=Navigation&nav=' . $nav->id); ?> + $url = UriFactory::build('{/base}/admin/module/settings?id=Navigation&nav=' . $nav->id); ?> id; ?> pidRaw; ?> diff --git a/Admin/Status.php b/Admin/Status.php index 1737eb5..c17beac 100755 --- a/Admin/Status.php +++ b/Admin/Status.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Admin * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Module\StatusAbstract; * Status class. * * @package Modules\Navigation\Admin - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Admin/Uninstaller.php b/Admin/Uninstaller.php index 2f3265d..c22cd49 100755 --- a/Admin/Uninstaller.php +++ b/Admin/Uninstaller.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Admin * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Module\UninstallerAbstract; * Uninstaller class. * * @package Modules\Navigation\Admin - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Admin/Updater.php b/Admin/Updater.php index 749df20..c0f20e5 100755 --- a/Admin/Updater.php +++ b/Admin/Updater.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Admin * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Module\UpdaterAbstract; * Updater class. * * @package Modules\Navigation\Admin - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Controller/ApiController.php b/Controller/ApiController.php new file mode 100644 index 0000000..dfce3f6 --- /dev/null +++ b/Controller/ApiController.php @@ -0,0 +1,116 @@ +validateNavElementCreate($request))) { + $response->set('nav_element_create', new FormValidation($val)); + $response->header->status = RequestStatusCode::R_400; + + return; + } + + $navElement = $this->createNavElementFromRequest($request); + $this->createModel($request->header->account, $navElement, NavElementMapper::class, 'nav_element', $request->getOrigin()); + + $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Navigation Element', 'Element successfully created', $navElement); + } + + /** + * Validate tag create request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateNavElementCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['name'] = empty($request->getData('name')))) { + return $val; + } + + return []; + } + + /** + * Method to create tag from request. + * + * @param RequestAbstract $request Request + * + * @return NavElement + * + * @since 1.0.0 + */ + private function createNavElementFromRequest(RequestAbstract $request) : NavElement + { + $navElement = new NavElement(); + + $navElement->id = (int) $request->getData('id'); + $navElement->pid = \sha1(\str_replace('/', '', $request->getDataString('pid') ?? '')); + $navElement->pidRaw = $request->getDataString('pid') ?? ''; + $navElement->name = (string) ($request->getDataString('name') ?? ''); + $navElement->type = $request->getDataInt('type') ?? 1; + $navElement->subtype = $request->getDataInt('subtype') ?? 2; + $navElement->icon = $request->getDataString('icon'); + $navElement->uri = $request->getDataString('uri'); + $navElement->target = (string) ($request->getData('target') ?? 'self'); + $navElement->action = $request->getDataString('action'); + $navElement->app = $request->getDataInt('app') ?? 2; + $navElement->from = empty($from = $request->getDataString('from') ?? '') ? '0' : $from; + $navElement->order = $request->getDataInt('order') ?? 1; + $navElement->parent = $request->getDataInt('parent') ?? 0; + $navElement->permissionPerm = $request->getDataInt('permission'); + $navElement->permissionCategory = $request->getDataInt('category'); + $navElement->permissionElement = $request->getDataInt('element'); + + return $navElement; + } +} diff --git a/Controller/BackendController.php b/Controller/BackendController.php index fb22a77..f090997 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -29,7 +29,7 @@ use phpOMS\Views\View; * Navigation class. * * @package Modules\Navigation - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 * @codeCoverageIgnore @@ -178,7 +178,7 @@ final class BackendController extends Controller $view = new View($this->app->l11nManager, $request, $response); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response)); - $id = $request->getData('id') ?? ''; + $id = $request->getDataString('id') ?? ''; $settings = SettingMapper::getAll()->where('module', $id)->execute(); if (!($settings instanceof NullSetting)) { @@ -232,7 +232,7 @@ final class BackendController extends Controller $view->setTemplate('/Modules/Navigation/Admin/Settings/Theme/Backend/modules-nav-list'); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response)); - $module = $request->getData('id') ?? ''; + $module = $request->getDataString('id') ?? ''; $view->setData('module', $module); $query = NavElementMapper::getAll() diff --git a/Controller/Controller.php b/Controller/Controller.php index a28a2bc..5148436 100755 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Module\ModuleAbstract; * Navigation class. * * @package Modules\Navigation - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Controller/SearchController.php b/Controller/SearchController.php index 5c4db96..09fecda 100755 --- a/Controller/SearchController.php +++ b/Controller/SearchController.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -27,7 +27,7 @@ use phpOMS\Uri\UriFactory; * Search class. * * @package Modules\Navigation - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ @@ -48,20 +48,20 @@ final class SearchController extends Controller */ public function searchGoto(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void { - $this->loadLanguage($request, $response, $request->getData('app')); + $this->loadLanguage($request, $response, $request->getDataString('app') ?? $this->app->appName); /** @var \Modules\Navigation\Models\NavElement[] $elements */ $elements = NavElementMapper::getAll()->execute(); - $searchIdStartPos = \stripos($request->getData('search'), ':'); + $searchIdStartPos = \stripos($request->getDataString('search') ?? '', ':'); $patternStartPos = $searchIdStartPos === false ? -1 : \stripos( - $request->getData('search'), + $request->getDataString('search') ?? '', ' ', $searchIdStartPos ); $search = \mb_strtolower(\substr( - $request->getData('search'), + $request->getDataString('search') ?? '', $patternStartPos + 1 )); diff --git a/Controller/TimerecordingController.php b/Controller/TimerecordingController.php index e16b433..95e5b21 100755 --- a/Controller/TimerecordingController.php +++ b/Controller/TimerecordingController.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -23,7 +23,7 @@ use phpOMS\Message\ResponseAbstract; * Navigation class. * * @package Modules\Navigation - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Models/LinkStatus.php b/Models/LinkStatus.php index 10cda08..90f9931 100755 --- a/Models/LinkStatus.php +++ b/Models/LinkStatus.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Models * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum; * Link status enum. * * @package Modules\Navigation\Models - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Models/LinkType.php b/Models/LinkType.php index 775794b..18a99f7 100755 --- a/Models/LinkType.php +++ b/Models/LinkType.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Models * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum; * Link type enum. * * @package Modules\Navigation\Models - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Models/NavElement.php b/Models/NavElement.php index 7a1d5f4..0529cbf 100755 --- a/Models/NavElement.php +++ b/Models/NavElement.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Models * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -18,7 +18,7 @@ namespace Modules\Navigation\Models; * Navigation element class. * * @package Modules\Navigation\Models - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Models/NavElementMapper.php b/Models/NavElementMapper.php index d624356..933d78b 100755 --- a/Models/NavElementMapper.php +++ b/Models/NavElementMapper.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Models * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; * Mapper class. * * @package Modules\Navigation\Models - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Models/Navigation.php b/Models/Navigation.php index c15341c..a313875 100755 --- a/Models/Navigation.php +++ b/Models/Navigation.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Models * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -23,7 +23,7 @@ use phpOMS\Message\RequestAbstract; * Navigation class. * * @package Modules\Navigation\Models - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Models/NavigationType.php b/Models/NavigationType.php index 05caeb7..684ad6c 100755 --- a/Models/NavigationType.php +++ b/Models/NavigationType.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Models * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum; * Navigation type enum. * * @package Modules\Navigation\Models - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Models/NullNavElement.php b/Models/NullNavElement.php index fb54ec4..837f7d5 100755 --- a/Models/NullNavElement.php +++ b/Models/NullNavElement.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Models * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -18,7 +18,7 @@ namespace Modules\Navigation\Models; * Null model * * @package Modules\Navigation\Models - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/Theme/Backend/Lang/ar.lang.php b/Theme/Backend/Lang/ar.lang.php index 4baa846..9e37a92 100755 --- a/Theme/Backend/Lang/ar.lang.php +++ b/Theme/Backend/Lang/ar.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/cs.lang.php b/Theme/Backend/Lang/cs.lang.php index de22b5a..ba97dd9 100755 --- a/Theme/Backend/Lang/cs.lang.php +++ b/Theme/Backend/Lang/cs.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/da.lang.php b/Theme/Backend/Lang/da.lang.php index 4bde434..8569e89 100755 --- a/Theme/Backend/Lang/da.lang.php +++ b/Theme/Backend/Lang/da.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index e6f7f7f..ef8d680 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/el.lang.php b/Theme/Backend/Lang/el.lang.php index 7e281e7..9ed3c81 100755 --- a/Theme/Backend/Lang/el.lang.php +++ b/Theme/Backend/Lang/el.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 9ef30b0..a7d223e 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/es.lang.php b/Theme/Backend/Lang/es.lang.php index be49a7f..93f6725 100755 --- a/Theme/Backend/Lang/es.lang.php +++ b/Theme/Backend/Lang/es.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/fi.lang.php b/Theme/Backend/Lang/fi.lang.php index 005a668..e0d0e4f 100755 --- a/Theme/Backend/Lang/fi.lang.php +++ b/Theme/Backend/Lang/fi.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/fr.lang.php b/Theme/Backend/Lang/fr.lang.php index 838f888..aa2ea71 100755 --- a/Theme/Backend/Lang/fr.lang.php +++ b/Theme/Backend/Lang/fr.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/hu.lang.php b/Theme/Backend/Lang/hu.lang.php index ed03915..a695359 100755 --- a/Theme/Backend/Lang/hu.lang.php +++ b/Theme/Backend/Lang/hu.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/it.lang.php b/Theme/Backend/Lang/it.lang.php index 6fc11ca..e4a9da6 100755 --- a/Theme/Backend/Lang/it.lang.php +++ b/Theme/Backend/Lang/it.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/ja.lang.php b/Theme/Backend/Lang/ja.lang.php index f9ea14f..8b499c1 100755 --- a/Theme/Backend/Lang/ja.lang.php +++ b/Theme/Backend/Lang/ja.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/ko.lang.php b/Theme/Backend/Lang/ko.lang.php index 3a173b3..3ee2acc 100755 --- a/Theme/Backend/Lang/ko.lang.php +++ b/Theme/Backend/Lang/ko.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/no.lang.php b/Theme/Backend/Lang/no.lang.php index deeede0..5a757f6 100755 --- a/Theme/Backend/Lang/no.lang.php +++ b/Theme/Backend/Lang/no.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/pl.lang.php b/Theme/Backend/Lang/pl.lang.php index 942c82b..6120939 100755 --- a/Theme/Backend/Lang/pl.lang.php +++ b/Theme/Backend/Lang/pl.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/pt.lang.php b/Theme/Backend/Lang/pt.lang.php index acbaf69..1b46380 100755 --- a/Theme/Backend/Lang/pt.lang.php +++ b/Theme/Backend/Lang/pt.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/ru.lang.php b/Theme/Backend/Lang/ru.lang.php index 118ac6a..a9c6c54 100755 --- a/Theme/Backend/Lang/ru.lang.php +++ b/Theme/Backend/Lang/ru.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/sv.lang.php b/Theme/Backend/Lang/sv.lang.php index 138b910..fce9f09 100755 --- a/Theme/Backend/Lang/sv.lang.php +++ b/Theme/Backend/Lang/sv.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/th.lang.php b/Theme/Backend/Lang/th.lang.php index 206f889..7f84d74 100755 --- a/Theme/Backend/Lang/th.lang.php +++ b/Theme/Backend/Lang/th.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/tr.lang.php b/Theme/Backend/Lang/tr.lang.php index 935c4cd..54e7873 100755 --- a/Theme/Backend/Lang/tr.lang.php +++ b/Theme/Backend/Lang/tr.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/uk.lang.php b/Theme/Backend/Lang/uk.lang.php index 9e6c33e..a99c392 100755 --- a/Theme/Backend/Lang/uk.lang.php +++ b/Theme/Backend/Lang/uk.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/Lang/zh.lang.php b/Theme/Backend/Lang/zh.lang.php index 843d048..d47d0a7 100755 --- a/Theme/Backend/Lang/zh.lang.php +++ b/Theme/Backend/Lang/zh.lang.php @@ -6,7 +6,7 @@ * * @package Modules\Localization * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/mid-side.tpl.php b/Theme/Backend/mid-side.tpl.php index c0d2457..453ba14 100755 --- a/Theme/Backend/mid-side.tpl.php +++ b/Theme/Backend/mid-side.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/mid.tpl.php b/Theme/Backend/mid.tpl.php index 8a25c3d..824bba4 100755 --- a/Theme/Backend/mid.tpl.php +++ b/Theme/Backend/mid.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/side.tpl.php b/Theme/Backend/side.tpl.php index 9b9822a..712b9d4 100755 --- a/Theme/Backend/side.tpl.php +++ b/Theme/Backend/side.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/splash.tpl.php b/Theme/Backend/splash.tpl.php index ee18f6c..8f6968c 100755 --- a/Theme/Backend/splash.tpl.php +++ b/Theme/Backend/splash.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Theme/Backend/top.tpl.php b/Theme/Backend/top.tpl.php index fffd593..99ecb9c 100755 --- a/Theme/Backend/top.tpl.php +++ b/Theme/Backend/top.tpl.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/Views/NavigationView.php b/Views/NavigationView.php index 40267d7..945ba60 100755 --- a/Views/NavigationView.php +++ b/Views/NavigationView.php @@ -6,7 +6,7 @@ * * @package Modules\Navigation\Views * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ use phpOMS\Views\View; * Navigation view. * * @package Modules\Navigation\Views - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php index d3f34ca..a5d72cd 100755 --- a/tests/Admin/AdminTest.php +++ b/tests/Admin/AdminTest.php @@ -6,7 +6,7 @@ * * @package tests * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/tests/Autoloader.php b/tests/Autoloader.php index d032623..d08f1b7 100755 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -6,7 +6,7 @@ * * @package Modules/tests * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -20,7 +20,7 @@ namespace tests; * Autoloader class. * * @package tests - * @license OMS License 1.0 + * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 */ diff --git a/tests/Controller/SearchControllerTest.php b/tests/Controller/SearchControllerTest.php index cfe6953..380049a 100755 --- a/tests/Controller/SearchControllerTest.php +++ b/tests/Controller/SearchControllerTest.php @@ -6,7 +6,7 @@ * * @package tests * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ @@ -63,7 +63,7 @@ final class SearchControllerTest extends \PHPUnit\Framework\TestCase $this->app->appSettings = new CoreSettings(); $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/'); $this->app->dispatcher = new Dispatcher($this->app); - $this->app->l11nManager = new L11nManager($this->app->appName); + $this->app->l11nManager = new L11nManager(); $this->app->eventManager = new EventManager($this->app->dispatcher); $this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php'); diff --git a/tests/Models/NavigationTest.php b/tests/Models/NavigationTest.php index a87e961..d957313 100755 --- a/tests/Models/NavigationTest.php +++ b/tests/Models/NavigationTest.php @@ -6,7 +6,7 @@ * * @package tests * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */ diff --git a/tests/Views/NavigationViewTest.php b/tests/Views/NavigationViewTest.php index d4e8518..6d7899b 100755 --- a/tests/Views/NavigationViewTest.php +++ b/tests/Views/NavigationViewTest.php @@ -6,7 +6,7 @@ * * @package tests * @copyright Dennis Eichhorn - * @license OMS License 1.0 + * @license OMS License 2.0 * @version 1.0.0 * @link https://jingga.app */