diff options
author | marijus <mario@localhost.localdomain> | 2014-02-05 14:48:42 +0100 |
---|---|---|
committer | marijus <mario@localhost.localdomain> | 2014-02-05 14:48:42 +0100 |
commit | 419e3b5024efec40c98e48c3bf213c4e60d39fae (patch) | |
tree | d3754aa1d251308eb6178fe4ab138463ceaaf135 /index.php | |
parent | d7d2fff24b05bcb3ff3acc215e99f8f7d33d058d (diff) | |
parent | 0844110f7b154a0fb5102362fe732c2b091222d7 (diff) | |
download | volse-hubzilla-419e3b5024efec40c98e48c3bf213c4e60d39fae.tar.gz volse-hubzilla-419e3b5024efec40c98e48c3bf213c4e60d39fae.tar.bz2 volse-hubzilla-419e3b5024efec40c98e48c3bf213c4e60d39fae.zip |
Merge branch 'master' of https://github.com/friendica/red into upstream
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -23,7 +23,7 @@ $a = new App; * */ -$install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false : true); +$a->install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false : true); @include(".htconfig.php"); @@ -38,8 +38,8 @@ $a->language = get_best_language(); require_once("include/dba/dba_driver.php"); -if(! $install) { - $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $install); +if(! $a->install) { + $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $a->install); unset($db_host, $db_port, $db_user, $db_pass, $db_data); /** @@ -91,7 +91,7 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) { load_translation_table($a->language); } -if((x($_GET,'zid')) && (! $install)) { +if((x($_GET,'zid')) && (! $a->install)) { $a->query_string = preg_replace('/[\?&]zid=(.*?)([\?&]|$)/is','',$a->query_string); if(! local_user()) { $_SESSION['my_address'] = $_GET['zid']; @@ -116,7 +116,7 @@ if(! x($_SESSION,'sysmsg_info')) */ -if($install) { +if($a->install) { /* Allow an exception for the view module so that pcss will be interpreted during installation */ if($a->module != 'view') $a->module = 'setup'; @@ -242,18 +242,22 @@ if (file_exists($theme_info_file)){ if(! x($a->page,'content')) $a->page['content'] = ''; -/* set JS cookie */ -if($_COOKIE['jsAvailable'] != 1) { - $a->page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; var jsMatch = /\&JS=1/; if (!jsMatch.exec(location.href)) { location.href = location.href + "&JS=1"; }</script>'; - /* emulate JS cookie if cookies are not accepted */ - if ($_GET['JS'] == 1) { - $_COOKIE['jsAvailable'] = 1; + + +if(! ($a->module === 'setup')) { + /* set JS cookie */ + if($_COOKIE['jsAvailable'] != 1) { + $a->page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; var jsMatch = /\&JS=1/; if (!jsMatch.exec(location.href)) { location.href = location.href + "&JS=1"; }</script>'; + /* emulate JS cookie if cookies are not accepted */ + if ($_GET['JS'] == 1) { + $_COOKIE['jsAvailable'] = 1; + } } + call_hooks('page_content_top',$a->page['content']); } -if(! $install) - call_hooks('page_content_top',$a->page['content']); + /** * Call module functions |