From c14ff3851bb83a104be4f0a325bedef6bba8874a Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Wed, 11 Nov 2009 23:11:32 +0000 Subject: [PATCH] Updates to blog to work with Sapphire 2.4 --- code/BlogTree.php | 2 +- code/RSSWidget.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/BlogTree.php b/code/BlogTree.php index 94e85de..c977ddc 100644 --- a/code/BlogTree.php +++ b/code/BlogTree.php @@ -38,7 +38,7 @@ class BlogTree extends Page { * - Otherwise, try and find a 'top-level' BlogTree */ static function current() { - $page = Director::currentPage(); + $page = Director::get_current_page(); // If we _are_ a BlogTree, use us if ($page instanceof BlogTree) return $page; diff --git a/code/RSSWidget.php b/code/RSSWidget.php index 99d60c0..6578411 100644 --- a/code/RSSWidget.php +++ b/code/RSSWidget.php @@ -60,9 +60,9 @@ class RSSWidget extends Widget { include_once(Director::getAbsFile(SAPPHIRE_DIR . '/thirdparty/simplepie/SimplePie.php')); $t1 = microtime(true); - $this->feed = new SimplePie($this->AbsoluteRssUrl, TEMP_FOLDER); - $this->feed->init(); - if($items = $this->feed->get_items(0, $this->NumberToShow)) { + $feed = new SimplePie($this->AbsoluteRssUrl, TEMP_FOLDER); + $feed->init(); + if($items = $feed->get_items(0, $this->NumberToShow)) { foreach($items as $item) { // Cast the Date @@ -84,4 +84,4 @@ class RSSWidget extends Widget { } } -?> \ No newline at end of file +?>