diff options
Diffstat (limited to 'index.php')
-rwxr-xr-x[-rw-r--r--] | index.php | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/index.php b/index.php index cc6249256..fe09e88fc 100644..100755 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /** * - * Friendica Red + * Red Matrix * */ @@ -29,7 +29,6 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false $a->language = get_best_language(); -load_translation_table($a->language); /** * @@ -37,11 +36,11 @@ load_translation_table($a->language); * */ -require_once("dba.php"); +require_once("include/dba/dba_driver.php"); if(! $install) { - $db = new dba($db_host, $db_user, $db_pass, $db_data, $install); - unset($db_host, $db_user, $db_pass, $db_data); + $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $install); + unset($db_host, $db_port, $db_user, $db_pass, $db_data); /** * Load configs from db. Overwrite configs from .htconfig.php @@ -49,13 +48,22 @@ if(! $install) { load_config('config'); load_config('system'); + load_config('feature'); - require_once("session.php"); + require_once("include/session.php"); load_hooks(); call_hooks('init_1'); + + load_translation_table($a->language); +} +else { + // load translations but do not check plugins as we have no database + load_translation_table($a->language,true); } + + /** * * Important stuff we always need to do. @@ -94,7 +102,7 @@ if((x($_GET,'zid')) && (! $install)) { } if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login')) - require("auth.php"); + require("include/auth.php"); if(! x($_SESSION,'sysmsg')) @@ -110,8 +118,11 @@ if(! x($_SESSION,'sysmsg_info')) */ -if($install) - $a->module = 'setup'; +if($install) { + /* Allow an exception for the view module so that pcss will be interpreted during installation */ + if($a->module != 'view') + $a->module = 'setup'; +} else check_config($a); @@ -281,7 +292,7 @@ if($a->module_loaded) { // 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 + // This gives themes more control over how the sidebar looks $aside_default = true; call_hooks($a->module . '_mod_aside',$placeholder); @@ -317,7 +328,7 @@ if($a->module_loaded) { if(x($_SESSION,'visitor_home')) $homebase = $_SESSION['visitor_home']; elseif(local_user()) - $homebase = $a->get_baseurl() . '/channel/' . $a->user['nickname']; + $homebase = $a->get_baseurl() . '/channel/' . $a->channel['channel_address']; if(isset($homebase)) $a->page['content'] .= '<script>var homebase="' . $homebase . '" ; </script>'; |