aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-07 18:13:51 -0800
committerFriendika <info@friendika.com>2010-12-07 18:13:51 -0800
commit5763d31b4f213fbb2eea4d366a9c7ad534a7f1ec (patch)
tree7e90cc7594e842f9bc9da8bdefd298a3bf73a274 /index.php
parent8b086a76e5607c3db96ca17ce66d2a68139d2584 (diff)
downloadvolse-hubzilla-5763d31b4f213fbb2eea4d366a9c7ad534a7f1ec.tar.gz
volse-hubzilla-5763d31b4f213fbb2eea4d366a9c7ad534a7f1ec.tar.bz2
volse-hubzilla-5763d31b4f213fbb2eea4d366a9c7ad534a7f1ec.zip
db prepare for enhanced magic profiles and remote privacy indicators, fixed $lang setting to use system config var, some other syntax issues
Diffstat (limited to 'index.php')
-rw-r--r--index.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/index.php b/index.php
index cf20d35a2..4ad5f17e2 100644
--- a/index.php
+++ b/index.php
@@ -12,8 +12,12 @@ $install = ((file_exists('.htconfig.php')) ? false : true);
@include(".htconfig.php");
-if(isset($lang) && strlen($lang))
- load_translation_table($lang);
+// get language setting directly from system variables, bypassing get_config()
+// as database may not yet be configured.
+
+$lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');
+
+load_translation_table($lang);
require_once("dba.php");
$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
@@ -111,7 +115,7 @@ if($a->module != 'install')
// make sure the desired theme exists, though if the default theme doesn't exist we're stuffed.
-if((x($_SESSION,'theme')) && (! file_exists('/view/theme/' . $_SESSION['theme'] . '/style.css')))
+if((x($_SESSION,'theme')) && (! file_exists('view/theme/' . $_SESSION['theme'] . '/style.css')))
unset($_SESSION['theme']);
$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array(
@@ -122,9 +126,6 @@ $a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array(
$page = $a->page;
$profile = $a->profile;
-$lang = get_config('system','language');
-if($lang === false)
- $lang = 'en';
header("Content-type: text/html; charset=utf-8");