Merge pull request #944 from dentm42/fix-dupe-bug-in-content-hooks

Fix dupe bug in content hooks
This commit is contained in:
git-marijus 2017-12-27 16:50:17 +01:00 committed by GitHub
commit ab1dec813b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,7 +265,7 @@ class Router {
if(! \App::$error) {
$arr = array('content' => \App::$page['content'], 'replace' => false);
call_hooks(\App::$module . '_mod_content', $arr);
\App::$page['content'] = $arr['content'];
if(! $arr['replace']) {
if($this->controller && method_exists($this->controller,'get')) {
$arr = array('content' => $this->controller->get());
@ -276,8 +276,8 @@ class Router {
}
}
call_hooks(\App::$module . '_mod_aftercontent', $arr);
\App::$page['content'] .= $arr['content'];
\App::$page['content'] = (($arr['replace']) ? $arr['content'] : \App::$page['content'] . $arr['content']);
}
}
}
}
}