From a509da1c27fdf2e9dc12f2f6c7694db3a74635bb Mon Sep 17 00:00:00 2001 From: Yarik Date: Thu, 1 Jun 2017 18:46:22 +0300 Subject: [PATCH] Artbox epic performance fix --- common/config/main.php | 4 ++++ common/config/settings.php | 2 +- frontend/controllers/CategoryController.php | 4 ++-- frontend/views/category/view.php | 2 +- frontend/views/layouts/_category_menu.php | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/common/config/main.php b/common/config/main.php index 64e0e87..1ab54d9 100755 --- a/common/config/main.php +++ b/common/config/main.php @@ -1,5 +1,6 @@ true, 'absoluteUrl' => false, ], + 'aliasCache' => [ + 'class' => AliasCache::className(), + ], ], ]; diff --git a/common/config/settings.php b/common/config/settings.php index a7a34bb..1926d65 100755 --- a/common/config/settings.php +++ b/common/config/settings.php @@ -19,7 +19,7 @@ 'google' => 'https://plus.google.com/+ArtwebUaAgency', 'twitter' => 'https://twitter.com/ArtWeb_ua', 'name' => 'Artweb', - 'logo' => '11', + 'logo' => '', 'about' => 'Строим бизнес в онлайне', 'analytics_key' => '119240817', 'robots' => 'User-agent: Google diff --git a/frontend/controllers/CategoryController.php b/frontend/controllers/CategoryController.php index c94c145..3a6174e 100755 --- a/frontend/controllers/CategoryController.php +++ b/frontend/controllers/CategoryController.php @@ -93,14 +93,14 @@ */ $model = Category::findWithFilters($id) ->with('lang.alias') - ->with('categories.lang') + ->with('categories.lang.alias') ->with( [ 'parent' => function ($query) { /** * @var ActiveQuery $query */ - $query->with('lang', 'categories.lang'); + $query->with('lang.alias', 'categories.lang.alias'); }, ] ) diff --git a/frontend/views/category/view.php b/frontend/views/category/view.php index 77c8c11..de40f89 100755 --- a/frontend/views/category/view.php +++ b/frontend/views/category/view.php @@ -372,4 +372,4 @@ _________________________________________________________ --> - + \ No newline at end of file diff --git a/frontend/views/layouts/_category_menu.php b/frontend/views/layouts/_category_menu.php index bd8bdec..9929e1d 100755 --- a/frontend/views/layouts/_category_menu.php +++ b/frontend/views/layouts/_category_menu.php @@ -8,7 +8,7 @@ * @var bool $isHome */ $categories = Category::find() - ->with('categories.lang', 'lang') + ->with('categories.lang.alias', 'lang.alias') ->where([ 'level' => 0 ]) ->all(); ?> -- libgit2 0.21.4