]> git.mxchange.org Git - friendica.git/blobdiff - index.php
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
[friendica.git] / index.php
old mode 100644 (file)
new mode 100755 (executable)
index 98733c4..5f6d74a
--- a/index.php
+++ b/index.php
@@ -2,7 +2,7 @@
 
 /**
  *
- * Friendika
+ * Friendica
  *
  */
 
@@ -75,8 +75,6 @@ $a->timezone = (($default_timezone) ? $default_timezone : 'UTC');
 
 date_default_timezone_set($a->timezone);
 
-$a->init_pagehead();
-
 session_start();
 
 /**
@@ -115,6 +113,16 @@ if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module ==
 if(! x($_SESSION,'authenticated'))
        header('X-Account-Management-Status: none');
 
+
+/*
+ * Create the page head after setting the language
+ * and getting any auth credentials
+ */
+
+$a->init_pagehead();
+
+
+
 if(! x($_SESSION,'sysmsg'))
        $_SESSION['sysmsg'] = array();
 
@@ -133,6 +141,7 @@ if($install)
 else
        check_config($a);
 
+nav_set_selected('nothing');
 
 $arr = array('app_menu' => $a->apps);
 
@@ -140,7 +149,6 @@ call_hooks('app_menu', $arr);
 
 $a->apps = $arr['app_menu'];
 
-
 /**
  *
  * We have already parsed the server path into $a->argc and $a->argv
@@ -218,6 +226,13 @@ if(strlen($a->module)) {
        }
 }
 
+/**
+ * load current theme info
+ */
+$theme_info_file = "view/theme/".current_theme()."/theme.php";
+if (file_exists($theme_info_file)){
+       require_once($theme_info_file);
+}
 
 
 /* initialise content region */