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); } 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); 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)); + } }