@@ -108,8 +108,9 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $render = $page->render(); |
| 111 | - if ($render === false) |
|
| 112 | - throw new \yii\web\HttpException(404, 'No template found'); |
|
| 111 | + if ($render === false) { |
|
| 112 | + throw new \yii\web\HttpException(404, 'No template found'); |
|
| 113 | + } |
|
| 113 | 114 | |
| 114 | 115 | \Neon::endProfile('COBE::RENDER_ACTION', 'cobe'); |
| 115 | 116 | |
@@ -153,10 +154,12 @@ discard block |
||
| 153 | 154 | { |
| 154 | 155 | $request = neon()->request; |
| 155 | 156 | $url = $request->get('page'); |
| 156 | - if (!$url) |
|
| 157 | - $this->pageNotFound(); |
|
| 158 | - if (($urlEntry = CmsUrl::findByUrl($url))) |
|
| 159 | - return $this->actionPage($urlEntry['nice_id']); |
|
| 157 | + if (!$url) { |
|
| 158 | + $this->pageNotFound(); |
|
| 159 | + } |
|
| 160 | + if (($urlEntry = CmsUrl::findByUrl($url))) { |
|
| 161 | + return $this->actionPage($urlEntry['nice_id']); |
|
| 162 | + } |
|
| 160 | 163 | $this->pageNotFound(); |
| 161 | 164 | } |
| 162 | 165 | |