Updates to blog to work with Sapphire 2.4

This commit is contained in:
Luke Hudson 2009-11-11 23:11:32 +00:00
parent 42beb23f42
commit c14ff3851b
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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 {
}
}
?>
?>