X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=94329eedc833a150f5cab8f27693fa9d3da1ed5c;hb=cde0de965f8f2fde2b289ebcb1c1814ffa303ca6;hp=0cf74365c6db7a6d40d54e11f363909044554fc9;hpb=0d60dbef31ea645b8495d8e28fca6c248d20048b;p=friendica.git diff --git a/index.php b/index.php index 0cf74365c6..94329eedc8 100644 --- a/index.php +++ b/index.php @@ -11,7 +11,6 @@ * bootstrap the application * */ -try { require_once('boot.php'); @@ -28,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); @@ -39,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 @@ -94,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); } /** @@ -361,19 +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; -} catch(Exception $ex) { -// it may fail because logger uses the db, -// but give it a try: -logger('exception caught at index.php: '.$ex->getMessage()); -system_unavailable(); -} \ No newline at end of file