]> git.mxchange.org Git - friendica.git/blobdiff - index.php
diabook-themes: small fix
[friendica.git] / index.php
index 1cb16778a6d27d7242cf42dfa891c2f3b9506382..5dd93523e3a78dd86e99a7df6ba1165f44aedebd 100644 (file)
--- a/index.php
+++ b/index.php
@@ -38,11 +38,10 @@ load_translation_table($lang);
  */
 
 require_once("dba.php");
-$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
-        unset($db_host, $db_user, $db_pass, $db_data);
-
 
 if(! $install) {
+$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
+        unset($db_host, $db_user, $db_pass, $db_data);
 
        /**
         * Load configs from db. Overwrite configs from .htconfig.php
@@ -360,13 +359,13 @@ $profile = $a->profile;
 
 header("Content-type: text/html; charset=utf-8");
 
-$template = 'view/' . current_theme() . '/' 
+$template = 'view/theme/' . current_theme() . '/' 
        . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
 
 if(file_exists($template))
        require_once($template);
 else
-       require_once(str_replace(current_theme() . '/', '', $template));
+       require_once(str_replace('theme/' . current_theme() . '/', '', $template));
 
 session_write_close();
 exit;