Skip to content

Commit

Permalink
Check conditions first
Browse files Browse the repository at this point in the history
  • Loading branch information
JustCarmen committed Mar 1, 2018
1 parent 257f962 commit 40c409d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions module.php
Expand Up @@ -134,16 +134,16 @@ public function getMenu() {
// We don't actually have a menu - this is just a convenient "hook" to execute code at the right time during page execution
global $controller;

echo $this->includeCss();

// Check if the Fancy Imagebar is implemented in a (custom) theme
// Quicker loading through theme. Include styling.
if (method_exists(Theme::theme(), 'fancyImagebar')) {
return null;
}

try {
if ($this->module()->loadFancyImagebar()) {
echo $this->includeCss();

// Check if the Fancy Imagebar is implemented in a (custom) theme
// Quicker loading through theme. Include styling.
if (method_exists(Theme::theme(), 'fancyImagebar')) {
return null;
}

// put the fancy imagebar in the right position
echo $this->module()->getFancyImagebar();
$controller->addInlineJavaScript('
Expand Down

0 comments on commit 40c409d

Please sign in to comment.