aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web
diff options
context:
space:
mode:
authorM.Dent <dentm42@dm42.net>2017-12-23 10:58:51 -0500
committerM.Dent <dentm42@dm42.net>2017-12-23 10:58:51 -0500
commite7f6cd2cfa2995de8dc3d3dbc145922de8c67747 (patch)
treecf552ee60113d4523bacab6b1e4713de6d320ecd /Zotlabs/Web
parent89fbb86c7b29f47d39b05568a2dc5a1055708cb3 (diff)
downloadvolse-hubzilla-e7f6cd2cfa2995de8dc3d3dbc145922de8c67747.tar.gz
volse-hubzilla-e7f6cd2cfa2995de8dc3d3dbc145922de8c67747.tar.bz2
volse-hubzilla-e7f6cd2cfa2995de8dc3d3dbc145922de8c67747.zip
fix dupe bug in content hooks
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r--Zotlabs/Web/Router.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index 12ef315d4..b1bc9655c 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -263,21 +263,21 @@ 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());
- }
- elseif(function_exists(\App::$module . '_content')) {
- $func = \App::$module . '_content';
- $arr = array('content' => $func($a));
- }
- }
- call_hooks(\App::$module . '_mod_aftercontent', $arr);
- \App::$page['content'] .= $arr['content'];
+ $arr = array('content' => \App::$page['content'], 'replace' => false);
+ call_hooks(\App::$module . '_mod_content', $arr);
+
+ if(! $arr['replace']) {
+ if($this->controller && method_exists($this->controller,'get')) {
+ $arr = array('content' => $this->controller->get());
+ }
+ elseif(function_exists(\App::$module . '_content')) {
+ $func = \App::$module . '_content';
+ $arr = array('content' => $func($a));
+ }
+ }
+ call_hooks(\App::$module . '_mod_aftercontent', $arr);
+ \App::$page['content'] = (($arr['replace']) ? $arr['content'] : \App::$page['content'] . $arr['content']);
}
}
}
-} \ No newline at end of file
+}