From 25851047b6cd6e4498770fe87bddc0bfc3a68ac8 Mon Sep 17 00:00:00 2001 From: merdan Date: Sat, 15 May 2021 13:53:38 +0500 Subject: [PATCH] resizer --- plugins/bedard/blogtags/components/BlogTagSearch.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/bedard/blogtags/components/BlogTagSearch.php b/plugins/bedard/blogtags/components/BlogTagSearch.php index 688b7b57f..a1637f533 100644 --- a/plugins/bedard/blogtags/components/BlogTagSearch.php +++ b/plugins/bedard/blogtags/components/BlogTagSearch.php @@ -4,6 +4,7 @@ use Cms\Classes\Page; use Bedard\BlogTags\Models\Tag; use Cms\Classes\ComponentBase; use Rainlab\Blog\Models\Post; +use App; class BlogTagSearch extends ComponentBase { @@ -197,7 +198,7 @@ class BlogTagSearch extends ComponentBase private function calculatePagination() { // Count the number of posts with this tag - $this->totalPosts = Post::whereHas('tags', function($tag) { + $this->totalPosts = Post::whereHas('tags_'.App::getLocale(), function($tag) { $tag->where('name', $this->property('tag')); }) ->count();