fix dupe bug in content hooks
This commit is contained in:
parent
259f425050
commit
34d28e7ba9
@ -265,7 +265,7 @@ class Router {
|
|||||||
if(! \App::$error) {
|
if(! \App::$error) {
|
||||||
$arr = array('content' => \App::$page['content'], 'replace' => false);
|
$arr = array('content' => \App::$page['content'], 'replace' => false);
|
||||||
call_hooks(\App::$module . '_mod_content', $arr);
|
call_hooks(\App::$module . '_mod_content', $arr);
|
||||||
\App::$page['content'] = $arr['content'];
|
|
||||||
if(! $arr['replace']) {
|
if(! $arr['replace']) {
|
||||||
if($this->controller && method_exists($this->controller,'get')) {
|
if($this->controller && method_exists($this->controller,'get')) {
|
||||||
$arr = array('content' => $this->controller->get());
|
$arr = array('content' => $this->controller->get());
|
||||||
@ -276,7 +276,7 @@ class Router {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
call_hooks(\App::$module . '_mod_aftercontent', $arr);
|
call_hooks(\App::$module . '_mod_aftercontent', $arr);
|
||||||
\App::$page['content'] .= $arr['content'];
|
\App::$page['content'] = (($arr['replace']) ? $arr['content'] : \App::$page['content'] . $arr['content']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user