mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX Fixed call to deprecated function Form::loadNonBlankDataFrom() on BlogHolder, replacing it with Form::loadDataFrom()
This commit is contained in:
parent
488319ceb5
commit
dfb9e17c2c
@ -212,11 +212,11 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
|||||||
if($id != 0) {
|
if($id != 0) {
|
||||||
$entry = DataObject::get_by_id('BlogEntry', $id);
|
$entry = DataObject::get_by_id('BlogEntry', $id);
|
||||||
if($entry->IsOwner()) {
|
if($entry->IsOwner()) {
|
||||||
$form->loadNonBlankDataFrom($entry);
|
$form->loadDataFrom($entry);
|
||||||
$form->datafieldByName('BlogPost')->setValue($entry->Content);
|
$form->datafieldByName('BlogPost')->setValue($entry->Content);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$form->loadNonBlankDataFrom(array("Author" => Cookie::get("BlogHolder_Name")));
|
$form->loadDataFrom(array("Author" => Cookie::get("BlogHolder_Name")));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
|
Loading…
Reference in New Issue
Block a user