From 58b8caca8f1ecae9325f443557ac0476566a4cdc Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Feb 2023 10:28:52 +0500 Subject: [PATCH] from server --- .../apigenerator/controllers/api/postsController.php | 2 +- plugins/rainlab/blog/components/Posts.php | 4 ++++ plugins/rainlab/blog/models/Post.php | 1 - themes/modern2/layouts/new/master-inside.htm | 4 ++-- themes/modern2/partials/new/latest-news-mobile.htm | 1 - 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php index a2b1b3309..e17763d56 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php @@ -59,7 +59,7 @@ class postsController extends Controller if(!is_null($post)) { - $post->url = $this->pageUrl('post',['id'=>$post->id,'slug'=>$post->slug]); + $post->url = $this->pageUrl('new/newPost',['id'=>$post->id,'slug'=>$post->slug]); $obj = Db::table('vdomah_blogviews_views') ->where('post_id', $post->getKey()); diff --git a/plugins/rainlab/blog/components/Posts.php b/plugins/rainlab/blog/components/Posts.php index 4ad11c144..8c4ecd468 100644 --- a/plugins/rainlab/blog/components/Posts.php +++ b/plugins/rainlab/blog/components/Posts.php @@ -238,6 +238,10 @@ class Posts extends ComponentBase 'featured' => $featured, 'morque' => $morque, 'typePost' => empty($this->property('typePost')) ? null : $this->property('typePost'), + // 'typePost' => empty($this->property('typePost')) ? null : is_array($this->property('typePost')) + // ? $this->property('typePost') + // : preg_split('/,\s*/', $this->property('typePost'), -1, PREG_SPLIT_NO_EMPTY), + 'postGroup' => empty($this->property('categoryGroup')) ? null : $this->property('categoryGroup'), 'search' => trim(input('q')), 'category' => $category, diff --git a/plugins/rainlab/blog/models/Post.php b/plugins/rainlab/blog/models/Post.php index debfd97ba..2c9cd4a2d 100644 --- a/plugins/rainlab/blog/models/Post.php +++ b/plugins/rainlab/blog/models/Post.php @@ -494,7 +494,6 @@ class Post extends Model if ($typePost !== null) { $typePost = is_array($typePost) ? $typePost : [$typePost]; - $query->whereIn('type_post', $typePost); } diff --git a/themes/modern2/layouts/new/master-inside.htm b/themes/modern2/layouts/new/master-inside.htm index 71ec773f6..117db2167 100644 --- a/themes/modern2/layouts/new/master-inside.htm +++ b/themes/modern2/layouts/new/master-inside.htm @@ -120,9 +120,9 @@ default = 0 - + {% framework extras %} {% scripts %} - {% framework extras %} + diff --git a/themes/modern2/partials/new/latest-news-mobile.htm b/themes/modern2/partials/new/latest-news-mobile.htm index 5b0da27c8..5d1df9ddd 100644 --- a/themes/modern2/partials/new/latest-news-mobile.htm +++ b/themes/modern2/partials/new/latest-news-mobile.htm @@ -41,7 +41,6 @@ function onStart(){
{{post.published_at|date('H:i')}}

- {{merged}} {{ post.title }}