mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Updates to blog to work with Sapphire 2.4
This commit is contained in:
parent
42beb23f42
commit
c14ff3851b
@ -38,7 +38,7 @@ class BlogTree extends Page {
|
|||||||
* - Otherwise, try and find a 'top-level' BlogTree
|
* - Otherwise, try and find a 'top-level' BlogTree
|
||||||
*/
|
*/
|
||||||
static function current() {
|
static function current() {
|
||||||
$page = Director::currentPage();
|
$page = Director::get_current_page();
|
||||||
|
|
||||||
// If we _are_ a BlogTree, use us
|
// If we _are_ a BlogTree, use us
|
||||||
if ($page instanceof BlogTree) return $page;
|
if ($page instanceof BlogTree) return $page;
|
||||||
|
@ -60,9 +60,9 @@ class RSSWidget extends Widget {
|
|||||||
include_once(Director::getAbsFile(SAPPHIRE_DIR . '/thirdparty/simplepie/SimplePie.php'));
|
include_once(Director::getAbsFile(SAPPHIRE_DIR . '/thirdparty/simplepie/SimplePie.php'));
|
||||||
|
|
||||||
$t1 = microtime(true);
|
$t1 = microtime(true);
|
||||||
$this->feed = new SimplePie($this->AbsoluteRssUrl, TEMP_FOLDER);
|
$feed = new SimplePie($this->AbsoluteRssUrl, TEMP_FOLDER);
|
||||||
$this->feed->init();
|
$feed->init();
|
||||||
if($items = $this->feed->get_items(0, $this->NumberToShow)) {
|
if($items = $feed->get_items(0, $this->NumberToShow)) {
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
|
|
||||||
// Cast the Date
|
// Cast the Date
|
||||||
@ -84,4 +84,4 @@ class RSSWidget extends Widget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user