X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FDashlet%2FPage%2FBlog.php;h=1c3d78c7be3088bd0c923e9e57d5c209576fc427;hb=368b491a511dae319823cb1c635aadb872cdb795;hp=7be04dd73417af70ae4871ee2665d6050b004157;hpb=4d20ef52acecafc3c3aa0f22b8268e5468352022;p=civicrm-core.git diff --git a/CRM/Dashlet/Page/Blog.php b/CRM/Dashlet/Page/Blog.php index 7be04dd734..1c3d78c7be 100644 --- a/CRM/Dashlet/Page/Blog.php +++ b/CRM/Dashlet/Page/Blog.php @@ -1,7 +1,7 @@ created_date) < $expire) { - $new_data = $this->_getFeed(); + $new_data = $this->_getFeed($this->getBlogUrl()); // If fetching the new rss feed was successful, return it // Otherwise use the old cached data - it's better than nothing if ($new_data) { @@ -81,7 +96,7 @@ class CRM_Dashlet_Page_Blog extends CRM_Core_Page { } return unserialize($cache->data); } - return $this->_getFeed(); + return $this->_getFeed($this->getBlogUrl()); } /** @@ -89,11 +104,11 @@ class CRM_Dashlet_Page_Blog extends CRM_Core_Page { * * @return array|NULL array of blog items; or NULL if not available * - * @access private + * @access public */ - private function _getFeed() { + public function _getFeed($url) { $httpClient = new CRM_Utils_HttpClient(self::CHECK_TIMEOUT); - list ($status, $rawFeed) = $httpClient->get(self::BLOG_URL); + list ($status, $rawFeed) = $httpClient->get($url); if ($status !== CRM_Utils_HttpClient::STATUS_OK) { return NULL; }