Skip to content

Commit

Permalink
adding the modules when there is an error
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed May 28, 2012
1 parent 59029a9 commit 12c7c54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Core/Modules/View/Helper/ModuleLoaderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public function load($position = null, $admin = false){
}

$moduleOut = $this->loadModule($module['Module']['module'], $params);

$error = !empty($this->_View->viewVars['error']) && $this->_View->viewVars['error'] instanceof Exception;

if (!empty($module['ModuleRoute']) && $currentRoute instanceof CakeRoute){
foreach($module['ModuleRoute'] as $route) {
Expand All @@ -80,7 +82,7 @@ public function load($position = null, $admin = false){
}
}

else if (empty($module['ModuleRoute'])) {
else if (empty($module['ModuleRoute']) || $error) {
$out .= $moduleOut;
}
}
Expand Down

0 comments on commit 12c7c54

Please sign in to comment.