X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=e7227962f479436a31cfff2054dc79bdcb995920;hb=355c42cb309eb1313097411067ca999b699aa620;hp=78ceb6d770018c1587d6909cb50236a1e31a1919;hpb=7b48b33b4905d671dc87dd95fcf102d2d2231aef;p=friendica.git diff --git a/index.php b/index.php index 78ceb6d770..e7227962f4 100644 --- a/index.php +++ b/index.php @@ -75,8 +75,6 @@ $a->timezone = (($default_timezone) ? $default_timezone : 'UTC'); date_default_timezone_set($a->timezone); -$a->init_pagehead(); - session_start(); /** @@ -95,6 +93,10 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) { load_translation_table($lang); } +if(x($_GET,'zrl')) { + $_SESSION['my_url'] = $_GET['zrl']; + $a->query_string = preg_replace('/[\?&]zrl=(.*?)([\?&]|$)/is','',$a->query_string); +} /** * @@ -115,6 +117,16 @@ if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module == if(! x($_SESSION,'authenticated')) header('X-Account-Management-Status: none'); + +/* + * Create the page head after setting the language + * and getting any auth credentials + */ + +$a->init_pagehead(); + + + if(! x($_SESSION,'sysmsg')) $_SESSION['sysmsg'] = array(); @@ -232,6 +244,8 @@ if (file_exists($theme_info_file)){ if(! x($a->page,'content')) $a->page['content'] = ''; +if(! $install) + call_hooks('page_content_top',$a->page['content']); /** * Call module functions @@ -334,13 +348,13 @@ $profile = $a->profile; header("Content-type: text/html; charset=utf-8"); -$template = 'view/' . $lang . '/' +$template = 'view/' . current_theme() . '/' . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php'; if(file_exists($template)) require_once($template); else - require_once(str_replace($lang . '/', '', $template)); + require_once(str_replace(current_theme() . '/', '', $template)); session_write_close(); exit;