aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-06 19:25:01 -0800
committerfriendica <info@friendica.com>2013-01-06 19:25:01 -0800
commit3fc6df1000ea064e8f5ee6e066a79460d90b25cb (patch)
treebca9be1c79ae23bc3bde2c31e4254be5a991a30c /index.php
parenta9aa74a8074fd2eec58dd5927313fcef4fd5d930 (diff)
parentc94c500cdcfdc94427d7f7e2509e9af9ee0d78ae (diff)
downloadvolse-hubzilla-3fc6df1000ea064e8f5ee6e066a79460d90b25cb.tar.gz
volse-hubzilla-3fc6df1000ea064e8f5ee6e066a79460d90b25cb.tar.bz2
volse-hubzilla-3fc6df1000ea064e8f5ee6e066a79460d90b25cb.zip
Merge pull request #13 from fermionic/20130105-smarty3
implement smarty3
Diffstat (limited to 'index.php')
-rw-r--r--index.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/index.php b/index.php
index d5739f39e..cc6249256 100644
--- a/index.php
+++ b/index.php
@@ -96,13 +96,6 @@ if((x($_GET,'zid')) && (! $install)) {
if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login'))
require("auth.php");
-/*
- * Create the page head after setting the language
- * and getting any auth credentials
- */
-
-$a->init_pagehead();
-
if(! x($_SESSION,'sysmsg'))
$_SESSION['sysmsg'] = array();
@@ -280,18 +273,28 @@ if($a->module_loaded) {
if(! $a->error) {
+ // If a theme has defined an _aside() function, run that first
+ //
+ // If the theme function doesn't exist, see if this theme extends another,
+ // and see if that other theme has an _aside() function--if it does, run it
+ //
+ // If $aside_default is not False after the theme _aside() function, run the
+ // module's _aside() function too
+ //
+ // This gives themes more control over how the left sidebar looks
+
$aside_default = true;
call_hooks($a->module . '_mod_aside',$placeholder);
if(function_exists(str_replace('-','_',current_theme()) . '_' . $a->module . '_aside')) {
$func = str_replace('-','_',current_theme()) . '_' . $a->module . '_aside';
$aside_default = $func($a);
}
- elseif(x($a->theme_info,"extends") && $aside_default
+ elseif($aside_default && x($a->theme_info,"extends")
&& (function_exists(str_replace('-','_',$a->theme_info["extends"]) . '_' . $a->module . '_aside'))) {
$func = str_replace('-','_',$a->theme_info["extends"]) . '_' . $a->module . '_aside';
$aside_default = $func($a);
}
- elseif(function_exists($a->module . '_aside') && $aside_default) {
+ if($aside_default && function_exists($a->module . '_aside')) {
$func = $a->module . '_aside';
$func($a);
}
@@ -329,7 +332,6 @@ if(stristr( implode("",$_SESSION['sysmsg']), t('Permission denied'))) {
call_hooks('page_end', $a->page['content']);
-
construct_page($a);
session_write_close();