Index: /trunk/admin/themes/clear/themeconf.inc.php
===================================================================
--- /trunk/admin/themes/clear/themeconf.inc.php	(revision 5176)
+++ /trunk/admin/themes/clear/themeconf.inc.php	(revision 5177)
@@ -1,5 +1,5 @@
 <?php
 $themeconf = array(
-  'theme'    => 'clear',
+  'name'    => 'clear',
   'parent'   => 'default',
   'admin_icon_dir' => 'admin/themes/clear/icon',
Index: /trunk/admin/themes/default/themeconf.inc.php
===================================================================
--- /trunk/admin/themes/default/themeconf.inc.php	(revision 5176)
+++ /trunk/admin/themes/default/themeconf.inc.php	(revision 5177)
@@ -1,8 +1,9 @@
 <?php
 $themeconf = array(
-  'theme'          => 'default',
+  'name'          => 'default',
   'icon_dir'       => 'themes/default/icon',
   'admin_icon_dir' => 'admin/themes/default/icon',
   'mime_icon_dir'  => 'themes/default/icon/mimetypes/',
+  'local_head'     => 'local_head.tpl',
 );
 ?>
Index: /trunk/admin/themes/roma/themeconf.inc.php
===================================================================
--- /trunk/admin/themes/roma/themeconf.inc.php	(revision 5176)
+++ /trunk/admin/themes/roma/themeconf.inc.php	(revision 5177)
@@ -1,5 +1,5 @@
 <?php
 $themeconf = array(
-  'theme'  => 'roma',
+  'name'  => 'roma',
   'parent' => 'default',
 );
Index: /trunk/include/template.class.php
===================================================================
--- /trunk/include/template.class.php	(revision 5176)
+++ /trunk/include/template.class.php	(revision 5177)
@@ -25,13 +25,4 @@
 require_once(PHPWG_ROOT_PATH.'include/smarty/libs/Smarty.class.php');
 
-// migrate lang:XXX
-//    sed "s/{lang:\([^}]\+\)}/{\'\1\'|@translate}/g" my_template.tpl
-// migrate change root level vars {XXX}
-//    sed "s/{pwg_root}/{ROOT_URL}/g" my_template.tpl
-// migrate change root level vars {XXX}
-//    sed "s/{\([a-zA-Z_]\+\)}/{$\1}/g" my_template.tpl
-// migrate all
-//    cat my_template.tpl | sed "s/{lang:\([^}]\+\)}/{\'\1\'|@translate}/g" | sed "s/{pwg_root}/{ROOT_URL}/g" | sed "s/{\([a-zA-Z_]\+\)}/{$\1}/g"
-
 
 class Template {
@@ -49,5 +40,5 @@
   // Templates prefilter from external sources (plugins)
   var $external_filters = array();
-  
+
   // used by html_head smarty block to add content before </head>
   var $html_head_elements = array();
@@ -79,5 +70,8 @@
 
     $this->smarty->template_dir = array();
-    $this->set_theme($root, $theme, $path);
+    if ( !empty($theme) )
+      $this->set_theme($root, $theme, $path);
+    else
+      $this->set_template_dir($root);
 
     $this->smarty->assign('lang_info', $lang_info);
@@ -104,8 +98,8 @@
     }
 
-    $tpl_var = array('name' => $themeconf['theme']);
-    if (file_exists($root.'/'.$theme.'/local_head.tpl'))
-    {
-      $tpl_var['local_head'] = realpath($root.'/'.$theme.'/local_head.tpl');
+    $tpl_var = array('name' => $themeconf['name']);
+    if (!empty($themeconf['local_head']) )
+    {
+      $tpl_var['local_head'] = realpath($root.'/'.$theme.'/'.$themeconf['local_head'] );
     }
     $this->smarty->append('themes', $tpl_var);
@@ -469,5 +463,5 @@
     ksort($this->external_filters[$handle]);
   }
-  
+
  /**
    * This function actually triggers the filters on the tpl files.
@@ -480,7 +474,7 @@
     {
       $compile_id = '';
-      foreach ($this->external_filters[$handle] as $filters) 
-      {
-        foreach ($filters as $filter) 
+      foreach ($this->external_filters[$handle] as $filters)
+      {
+        foreach ($filters as $filter)
         {
           list($type, $callback) = $filter;
@@ -497,7 +491,7 @@
     if (isset($this->external_filters[$handle]))
     {
-      foreach ($this->external_filters[$handle] as $filters) 
-      {
-        foreach ($filters as $filter) 
+      foreach ($this->external_filters[$handle] as $filters)
+      {
+        foreach ($filters as $filter)
         {
           list($type, $callback) = $filter;
Index: /trunk/themes/Sylvia/themeconf.inc.php
===================================================================
--- /trunk/themes/Sylvia/themeconf.inc.php	(revision 5176)
+++ /trunk/themes/Sylvia/themeconf.inc.php	(revision 5177)
@@ -1,5 +1,5 @@
 <?php
 $themeconf = array(
-  'theme'         => 'Sylvia',
+  'name'         => 'Sylvia',
   'parent'        => 'default',
   'icon_dir'      => 'themes/Sylvia/icon',
Index: /trunk/themes/clear/themeconf.inc.php
===================================================================
--- /trunk/themes/clear/themeconf.inc.php	(revision 5176)
+++ /trunk/themes/clear/themeconf.inc.php	(revision 5177)
@@ -1,5 +1,5 @@
 <?php
 $themeconf = array(
-  'theme'  => 'clear',
+  'name'  => 'clear',
   'parent' => 'default',
 );
Index: /trunk/themes/dark/themeconf.inc.php
===================================================================
--- /trunk/themes/dark/themeconf.inc.php	(revision 5176)
+++ /trunk/themes/dark/themeconf.inc.php	(revision 5177)
@@ -1,5 +1,5 @@
 <?php
 $themeconf = array(
-  'theme'  => 'dark',
+  'name'  => 'dark',
   'parent' => 'default',
 );
Index: /trunk/themes/default/themeconf.inc.php
===================================================================
--- /trunk/themes/default/themeconf.inc.php	(revision 5176)
+++ /trunk/themes/default/themeconf.inc.php	(revision 5177)
@@ -1,7 +1,8 @@
 <?php
 $themeconf = array(
-  'theme'         => 'default',
+  'name'         => 'default',
   'icon_dir'      => 'themes/default/icon',
   'mime_icon_dir' => 'themes/default/icon/mimetypes/',
+  'local_head'    => 'local_head.tpl',
 );
 ?>
