From 2775957a5d1149bc67695a71c00c09ace449a631 Mon Sep 17 00:00:00 2001 From: tchauviere Date: Tue, 20 Jan 2015 19:04:04 +0100 Subject: [PATCH] // Follow up df2bd6a --- controllers/admin/AdminDashboardController.php | 3 ++- js/admin/dashboard.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminDashboardController.php b/controllers/admin/AdminDashboardController.php index 304bf6a06acbe..07f5a7d3d2340 100644 --- a/controllers/admin/AdminDashboardController.php +++ b/controllers/admin/AdminDashboardController.php @@ -352,7 +352,8 @@ public function ajaxProcessGetBlogRss() $articles_limit = 2; foreach ($rss->channel->item as $item) { - if ($articles_limit > 0 && Validate::isCleanHtml((string)$item->title) && Validate::isCleanHtml((string)$item->description)) + if ($articles_limit > 0 && Validate::isCleanHtml((string)$item->title) && Validate::isCleanHtml((string)$item->description) + && isset($item->link) && isset($item->title)) { if (in_array($this->context->mode, array(Context::MODE_HOST, Context::MODE_HOST_CONTRIB))) $utm_content = 'cloud'; diff --git a/js/admin/dashboard.js b/js/admin/dashboard.js index 4374e5df3b5aa..bf6c8bcb9ae41 100644 --- a/js/admin/dashboard.js +++ b/js/admin/dashboard.js @@ -197,7 +197,7 @@ function getBlogRss() { success : function(jsonData) { if (typeof jsonData !== 'undefined' && jsonData !== null && !jsonData.has_errors) { for (var article in jsonData.rss) { - var article_html = '

'+jsonData.rss[article].title+'

'+jsonData.rss[article].date+'

'+jsonData.rss[article].short_desc+' '+read_more+'


'; + var article_html = '

'+jsonData.rss[article].title+'

'+jsonData.rss[article].date+'

'+jsonData.rss[article].short_desc+' '+read_more+'


'; $('.dash_news .dash_news_content').append(article_html); } }