X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=94329eedc833a150f5cab8f27693fa9d3da1ed5c;hb=24f5e6b3f3f1f29cce8923c38fbdfb24fa5ed5a5;hp=1cb16778a6d27d7242cf42dfa891c2f3b9506382;hpb=315d496290747aab8b3147dc24b822460071bb2d;p=friendica.git diff --git a/index.php b/index.php index 1cb16778a6..94329eedc8 100644 --- a/index.php +++ b/index.php @@ -27,7 +27,7 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false @include(".htconfig.php"); -$lang = get_language(); +$lang = get_browser_language(); load_translation_table($lang); @@ -38,11 +38,10 @@ load_translation_table($lang); */ require_once("dba.php"); -$db = new dba($db_host, $db_user, $db_pass, $db_data, $install); - unset($db_host, $db_user, $db_pass, $db_data); - if(! $install) { + $db = new dba($db_host, $db_user, $db_pass, $db_data, $install); + unset($db_host, $db_user, $db_pass, $db_data); /** * Load configs from db. Overwrite configs from .htconfig.php @@ -93,9 +92,10 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) { load_translation_table($lang); } -if(x($_GET,'zrl')) { +if((x($_GET,'zrl')) && (! $install)) { $_SESSION['my_url'] = $_GET['zrl']; $a->query_string = preg_replace('/[\?&]zrl=(.*?)([\?&]|$)/is','',$a->query_string); + zrl_init($a); } /** @@ -360,13 +360,13 @@ $profile = $a->profile; header("Content-type: text/html; charset=utf-8"); -$template = 'view/' . current_theme() . '/' +$template = 'view/theme/' . current_theme() . '/' . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php'; if(file_exists($template)) require_once($template); else - require_once(str_replace(current_theme() . '/', '', $template)); + require_once(str_replace('theme/' . current_theme() . '/', '', $template)); session_write_close(); exit;