mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Update BlogEntry.php
Can't use $this for controller here - Using controller::curr() instead
This commit is contained in:
parent
b831bb87d8
commit
8398c8e199
@ -49,7 +49,7 @@ class BlogEntry extends Page {
|
||||
public function populateDefaults(){
|
||||
parent::populateDefaults();
|
||||
|
||||
$requestedDevBuild = (stripos($this->request->getURL(), 'dev/build') === 0);
|
||||
$requestedDevBuild = (stripos(Controller::curr()->request->getURL(), 'dev/build') === 0);
|
||||
if(!$requestedDevBuild){
|
||||
$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));
|
||||
$this->setField('Author', Member::currentUser() ? Member::currentUser()->getName() : '');
|
||||
|
Loading…
Reference in New Issue
Block a user