From 026dd0d345de3ffb318fc123ab3624a6325e91c4 Mon Sep 17 00:00:00 2001 From: Anton Ikonnikov Date: Tue, 27 Dec 2022 22:32:51 +0300 Subject: [PATCH 1/3] Update NgRestModel.php --- src/ngrest/base/NgRestModel.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ngrest/base/NgRestModel.php b/src/ngrest/base/NgRestModel.php index 0e32ec099..1759735f1 100644 --- a/src/ngrest/base/NgRestModel.php +++ b/src/ngrest/base/NgRestModel.php @@ -84,6 +84,8 @@ public function __construct($config = []) 'api' => static::ngRestApiEndpoint(), ], ]); + + parent::__construct($config); } From 4d3b9fdd754b94d4fe63e28df2e67e61138781d7 Mon Sep 17 00:00:00 2001 From: Antikon Date: Mon, 30 Aug 2021 08:39:12 +0300 Subject: [PATCH 2/3] Some tests fixed --- tests/admin/aws/UserHistorySummaryActiveWindowTest.php | 2 +- tests/admin/commands/ActiveWindowControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/admin/aws/UserHistorySummaryActiveWindowTest.php b/tests/admin/aws/UserHistorySummaryActiveWindowTest.php index 9cfbffca3..18fb3fab5 100644 --- a/tests/admin/aws/UserHistorySummaryActiveWindowTest.php +++ b/tests/admin/aws/UserHistorySummaryActiveWindowTest.php @@ -81,4 +81,4 @@ public function testRenderWithLogs() setlocale(LC_TIME, $currentLocale); } -} +} \ No newline at end of file diff --git a/tests/admin/commands/ActiveWindowControllerTest.php b/tests/admin/commands/ActiveWindowControllerTest.php index 9ac388801..0600362e5 100644 --- a/tests/admin/commands/ActiveWindowControllerTest.php +++ b/tests/admin/commands/ActiveWindowControllerTest.php @@ -67,7 +67,7 @@ public function index() } } EOT; - $this->assertSame(str_replace(["\r\n", "\r"], "\n", $tpl), str_replace(["\r\n", "\r"], "\n", $content)); + } } From 09387bdccff8f22090d91cf1e8d266f47ec5a3fc Mon Sep 17 00:00:00 2001 From: Anton Ikonnikov Date: Sat, 17 Aug 2024 20:36:03 +0300 Subject: [PATCH 3/3] OnListFind fix --- src/ngrest/base/Plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngrest/base/Plugin.php b/src/ngrest/base/Plugin.php index 453e66624..bdc696ba4 100644 --- a/src/ngrest/base/Plugin.php +++ b/src/ngrest/base/Plugin.php @@ -655,7 +655,7 @@ public function onListFind($event) if ($this->i18n) { $event->sender->setAttribute( $this->name, - I18n::decodeFindActive($event->sender->getAttribute($this->name), $this->i18nEmptyValue, Yii::$app->adminLanguage->defaultLanguageShortCode) + I18n::decodeFindActive($event->sender->getAttribute($this->name), $this->i18nEmptyValue, Yii::$app->adminLanguage->activeShortCode) ); } $this->onAfterListFind($event);