From bd89d906b97169ec65448113f31f2c548fba13bc Mon Sep 17 00:00:00 2001 From: merdan Date: Fri, 21 May 2021 15:50:04 +0500 Subject: [PATCH] rss --- .../apigenerator/controllers/api/postsController.php | 2 +- plugins/sobored/rss/Plugin.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php index 46e79b942..74d2f60b6 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php @@ -38,7 +38,7 @@ class postsController extends Controller public function show($locale,$id){ - $post = $this->Post::find($id,['id','content_html']); + $post = $this->Post::find($id,['id','content_html','author']); if(!is_null($post)) { $obj = Db::table('vdomah_blogviews_views') diff --git a/plugins/sobored/rss/Plugin.php b/plugins/sobored/rss/Plugin.php index db1c56a9d..fcd12d646 100644 --- a/plugins/sobored/rss/Plugin.php +++ b/plugins/sobored/rss/Plugin.php @@ -86,9 +86,9 @@ class Plugin extends PluginBase $fileContents .= "\t\t\n" . "\t\t\t" . htmlspecialchars($post->title, ENT_QUOTES, 'UTF-8') . "\n" . "\t\t\t" . Settings::get('link') . Settings::get('postPage') . "/" . $post->slug . "\n" . - "\t\t\t" . Settings::get('link') . Settings::get('postPage') . "/" . $post->slug . "\n" . + "\t\t\t" . Settings::get('link') . Settings::get('postPage') . "/" . $post->slug . "\n" . "\t\t\t" . $published->format(DateTime::RFC2822) . "\n" . - "\t\t\t" . htmlspecialchars($description, ENT_QUOTES, 'UTF-8') . "\n" . + "\t\t\t\n" . "\t\t\n"; } @@ -104,6 +104,7 @@ class Plugin extends PluginBase protected function loadPosts() { $posts = Db::table('rainlab_blog_posts') + ->select('id','title','slug','published_at','content','excerpt','featured_image') ->orderBy('published_at', 'desc') ->where('published', '=', '1') ->get();