]> 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 e43d733..0916ed8
--- a/index.php
+++ b/index.php
@@ -93,12 +93,6 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) {
        load_translation_table($lang);
 }
 
-/*
- * Create the page head after setting the language
- *
- */
-
-$a->init_pagehead();
 
 /**
  *
@@ -119,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();
 
@@ -338,13 +342,13 @@ $profile = $a->profile;
 
 header("Content-type: text/html; charset=utf-8");
 
-$template = 'view/' . $lang . '/' 
+$template = 'view/' . current_theme() . '/' 
        . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
 
 if(file_exists($template))
        require_once($template);
 else
-       require_once(str_replace($lang . '/', '', $template));
+       require_once(str_replace(current_theme() . '/', '', $template));
 
 session_write_close();
 exit;