mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX If BlogPost has date field, return it in getDate
This commit is contained in:
parent
0b6a2d710a
commit
3a18b9f69b
@ -693,6 +693,9 @@ class BlogPost extends Page
|
|||||||
*/
|
*/
|
||||||
public function getDate()
|
public function getDate()
|
||||||
{
|
{
|
||||||
|
if ($this->hasDatabaseField('Date')) {
|
||||||
|
return $this->getField('Date');
|
||||||
|
}
|
||||||
return !empty($this->PublishDate) ? $this->PublishDate : null;
|
return !empty($this->PublishDate) ? $this->PublishDate : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user