mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #2239 from pine3ree/patch-3
simplify code using !empty
This commit is contained in:
commit
eae155a228
@ -435,8 +435,8 @@ HTML;
|
|||||||
public function getViewer($action)
|
public function getViewer($action)
|
||||||
{
|
{
|
||||||
// Manually set templates should be dealt with by Controller::getViewer()
|
// Manually set templates should be dealt with by Controller::getViewer()
|
||||||
if (isset($this->templates[$action]) && $this->templates[$action]
|
if (!empty($this->templates[$action])
|
||||||
|| (isset($this->templates['index']) && $this->templates['index'])
|
|| !empty($this->templates['index'])
|
||||||
|| $this->template
|
|| $this->template
|
||||||
) {
|
) {
|
||||||
return parent::getViewer($action);
|
return parent::getViewer($action);
|
||||||
|
Loading…
Reference in New Issue
Block a user