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
|
||||
*/
|
||||
static function current() {
|
||||
$page = Director::currentPage();
|
||||
$page = Director::get_current_page();
|
||||
|
||||
// If we _are_ a BlogTree, use us
|
||||
if ($page instanceof BlogTree) return $page;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user