@@ -48,12 +48,14 @@ discard block |
||
| 48 | 48 | // set up the theme directories |
| 49 | 49 | foreach ($themeHierarchy as $theme) { |
| 50 | 50 | if (isset($theme['templates'])) { |
| 51 | - foreach ($theme['templates'] as $tplDir) |
|
| 52 | - $this->smarty->addTemplateDir($tplDir); |
|
| 51 | + foreach ($theme['templates'] as $tplDir) { |
|
| 52 | + $this->smarty->addTemplateDir($tplDir); |
|
| 53 | + } |
|
| 53 | 54 | } |
| 54 | 55 | if (isset($theme['plugins'])) { |
| 55 | - foreach ($theme['plugins'] as $pluginDir) |
|
| 56 | - $this->smarty->addPluginsDir($pluginDir); |
|
| 56 | + foreach ($theme['plugins'] as $pluginDir) { |
|
| 57 | + $this->smarty->addPluginsDir($pluginDir); |
|
| 58 | + } |
|
| 57 | 59 | } |
| 58 | 60 | } |
| 59 | 61 | |
@@ -125,7 +127,9 @@ discard block |
||
| 125 | 127 | */ |
| 126 | 128 | public static function component($params, $content, $tagName, $template, $repeat) |
| 127 | 129 | { |
| 128 | - if ($repeat) return; |
|
| 130 | + if ($repeat) { |
|
| 131 | + return; |
|
| 132 | + } |
|
| 129 | 133 | $params['content'] = $content; |
| 130 | 134 | $params['slot'] = $content; |
| 131 | 135 | $params['type'] = $tagName; |
@@ -154,8 +158,9 @@ discard block |
||
| 154 | 158 | $this->smarty->assign('site', $this->_page->getSiteData()); |
| 155 | 159 | |
| 156 | 160 | // an expensive-ish call so reduce need for it in repeated renders |
| 157 | - if (!isset($templates[$template])) |
|
| 158 | - $templates[$template] = $this->smarty->createTemplate($template); |
|
| 161 | + if (!isset($templates[$template])) { |
|
| 162 | + $templates[$template] = $this->smarty->createTemplate($template); |
|
| 163 | + } |
|
| 159 | 164 | $tpl = $templates[$template]; |
| 160 | 165 | |
| 161 | 166 | // reset any parameters for the new render |