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