diff options
author | Vasudev Kamath <kamathvasudev@gmail.com> | 2012-06-23 08:11:35 +0530 |
---|---|---|
committer | Vasudev Kamath <kamathvasudev@gmail.com> | 2012-06-23 08:11:35 +0530 |
commit | 6e4760dd9c512147309b5e4a98d25216610f81da (patch) | |
tree | cd1ea2edf6b257e52ab8fd10c781ba600d884506 /index.php | |
parent | 11974b4d948ae5d9b9fb53970838463bd88bb9f6 (diff) | |
parent | 4e7eb36dd1e65bf481ffe30614565674cbef4fe5 (diff) | |
download | volse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.tar.gz volse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.tar.bz2 volse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.zip |
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -59,8 +59,7 @@ if(! $install) { /** * * Important stuff we always need to do. - * Initialise authentication and date and time. - * Create the HTML head for the page, even if we may not use it (xml, etc.) + * * The order of these may be important so use caution if you think they're all * intertwingled with no logical order and decide to sort it out. Some of the * dependencies have changed, but at least at one time in the recent past - the @@ -68,12 +67,6 @@ if(! $install) { * */ -require_once("datetime.php"); - -$a->timezone = (($default_timezone) ? $default_timezone : 'UTC'); - -date_default_timezone_set($a->timezone); - session_start(); /** @@ -253,7 +246,10 @@ if(! $install) if($a->module_loaded) { $a->page['page_title'] = $a->module; + $placeholder = ''; + if(function_exists($a->module . '_init')) { + call_hooks($a->module . '_mod_init', $placeholder); $func = $a->module . '_init'; $func($a); } @@ -273,18 +269,25 @@ if($a->module_loaded) { if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error) && (function_exists($a->module . '_post')) && (! x($_POST,'auth-params'))) { + call_hooks($a->module . '_mod_post', $_POST); $func = $a->module . '_post'; $func($a); } if((! $a->error) && (function_exists($a->module . '_afterpost'))) { + call_hooks($a->module . '_mod_afterpost',$placeholder); $func = $a->module . '_afterpost'; $func($a); } if((! $a->error) && (function_exists($a->module . '_content'))) { + $arr = array('content' => $a->page['content']); + call_hooks($a->module . '_mod_content', $arr); + $a->page['content'] = $arr['content']; $func = $a->module . '_content'; - $a->page['content'] .= $func($a); + $arr = array('content' => $func($a)); + call_hooks($a->module . '_mod_aftercontent', $arr); + $a->page['content'] .= $arr['content']; } } |