mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #41 from mattclegg/master
Merge pull request #41 from mattclegg/master
This commit is contained in:
commit
ac4e6f2b56
@ -78,8 +78,6 @@ class BlogEntry extends Page {
|
||||
|
||||
$fields->addFieldToTab("Root.Main", new TextField("Tags", _t("BlogEntry.TS", "Tags (comma sep.)")),"Content");
|
||||
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
@ -61,12 +61,12 @@ class BlogTree extends Page {
|
||||
if($top) return $top;
|
||||
|
||||
// Try to find any BlogTree that is not inside another BlogTree
|
||||
foreach(DataObject::get('BlogTree') as $tree) {
|
||||
if($blogTrees=DataObject::get('BlogTree')) foreach($blogTrees as $tree) {
|
||||
if(!($tree->getParent() instanceof BlogTree)) return $tree;
|
||||
}
|
||||
|
||||
// This shouldn't be possible, but assuming the above fails, just return anything you can get
|
||||
return DataObject::get_one('BlogTree');
|
||||
return $blogTrees->first();
|
||||
}
|
||||
|
||||
/* ----------- ACCESSOR OVERRIDES -------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user