X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=index.php;h=3e72baddc5a9d7ec278d9aa9b410da6e4e161564;hb=363c4c57986706f6fadac33717759c5ab3ed0b29;hp=05eef6c6e0bfe0f2e7475b29798ff96866702e6d;hpb=b3fa03d3b4175b565ae7ed9106cb83c43801b558;p=friendica.git diff --git a/index.php b/index.php index 05eef6c6e0..3e72baddc5 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,5 @@ config['system']['language'])) ? $a->config['system']['language'] : 'en'); -} - +$lang = get_language(); load_translation_table($lang); @@ -59,6 +42,21 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data, $install); unset($db_host, $db_user, $db_pass, $db_data); +if(! $install) { + + /** + * Load configs from db. Overwrite configs from .htconfig.php + */ + + load_config('config'); + load_config('system'); + + require_once("session.php"); + load_hooks(); + call_hooks('init_1'); +} + + /** * * Important stuff we always need to do. @@ -71,14 +69,6 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data, $install); * */ -if(! $install) { - require_once("session.php"); - load_hooks(); - call_hooks('init_1'); -} - - - require_once("datetime.php"); $a->timezone = (($default_timezone) ? $default_timezone : 'UTC'); @@ -124,6 +114,9 @@ if(! x($_SESSION,'authenticated')) if(! x($_SESSION,'sysmsg')) $_SESSION['sysmsg'] = ''; +if(! x($_SESSION,'sysmsg_info')) + $_SESSION['sysmsg_info'] = ''; + /* * check_config() is responsible for running update scripts. These automatically * update the DB schema whenever we push a new one out. It also checks to see if @@ -276,8 +269,16 @@ if(stristr($_SESSION['sysmsg'], t('Permission denied'))) { if(x($_SESSION,'sysmsg')) { $a->page['content'] = "
{$_SESSION['sysmsg']}
\r\n" . ((x($a->page,'content')) ? $a->page['content'] : ''); + $_SESSION['sysmsg']=""; unset($_SESSION['sysmsg']); } +if(x($_SESSION,'sysmsg_info')) { + $a->page['content'] = "
{$_SESSION['sysmsg_info']}
\r\n" + . ((x($a->page,'content')) ? $a->page['content'] : ''); + $_SESSION['sysmsg_info']=""; + unset($_SESSION['sysmsg_info']); +} + call_hooks('page_end', $a->page['content']);