X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=8abca2eb82a87b3650f577b91507953ed7a35c69;hb=185d29c41ea9c7e4d286c685b958a0296d6ebeef;hp=0ea09c0c7a59ab5248098127684fbceb7d488e6b;hpb=c32f754b6e1c512b764e1c84356e654b57c6db55;p=friendica.git diff --git a/index.php b/index.php index 0ea09c0c7a..8abca2eb82 100644 --- a/index.php +++ b/index.php @@ -32,9 +32,7 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false -$lang = get_browser_language(); - -load_translation_table($lang); + /** * @@ -58,10 +56,13 @@ if(!$install) { require_once("include/session.php"); load_hooks(); call_hooks('init_1'); + + $maintenance = get_config('system', 'maintenance'); } -$maintenance = get_config('system', 'maintenance'); +$lang = get_browser_language(); +load_translation_table($lang); /** * @@ -141,7 +142,8 @@ if($install) elseif($maintenance) $a->module = 'maintenance'; else { - proc_run('php', 'include/dbupdate.php'); + check_url($a); + check_db(); check_plugins($a); } @@ -181,6 +183,10 @@ if(strlen($a->module)) { * */ + // Compatibility with the Android Diaspora client + if ($a->module == "stream") + $a->module = "network"; + if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) { include_once("addon/{$a->module}/{$a->module}.php"); if(function_exists($a->module . '_module')) @@ -408,7 +414,10 @@ if(!$a->theme['stylesheet']) $stylesheet = current_theme_url(); else $stylesheet = $a->theme['stylesheet']; -$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); +// this creates hundreds of compiled templates, when all we really want is a string replace. +// $a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); + +$a->page['htmlhead'] = str_replace('$stylesheet',$stylesheet,$a->page['htmlhead']); $page = $a->page; $profile = $a->profile;