Index: /trunk/admin/notification_by_mail.php
===================================================================
--- /trunk/admin/notification_by_mail.php	(revision 5124)
+++ /trunk/admin/notification_by_mail.php	(revision 5125)
@@ -397,5 +397,4 @@
                       'content' => $env_nbm['mail_template']->parse('notification_by_mail', true),
                       'content_format' => $env_nbm['email_format'],
-                      'template' => $nbm_user['template'],
                       'theme' => $nbm_user['theme']
                     )
Index: /trunk/include/functions_mail.inc.php
===================================================================
--- /trunk/include/functions_mail.inc.php	(revision 5124)
+++ /trunk/include/functions_mail.inc.php	(revision 5125)
@@ -655,11 +655,9 @@
       if ($content_type == 'text/html')
       {
-        /*
-        if (is_file($conf_mail[$cache_key]['theme']->get_template_dir().'/global-mail-css.tpl'))
+        if ($conf_mail[$cache_key]['theme']->smarty->template_exists('global-mail-css.tpl'))
         {
           $conf_mail[$cache_key]['theme']->set_filename('css', 'global-mail-css.tpl');
           $conf_mail[$cache_key]['theme']->assign_var_from_handle('GLOBAL_MAIL_CSS', 'css');
         }
-        */
 
         $file = PHPWG_ROOT_PATH.'themes/'.$args['theme'].'/mail-css.tpl';
@@ -669,12 +667,4 @@
           $conf_mail[$cache_key]['theme']->assign_var_from_handle('MAIL_CSS', 'css');
         }
-        /*
-        $file = $root_abs_path.'/template-common/local-mail-css.tpl';
-        if (is_file($file))
-        {
-          $conf_mail[$cache_key]['template']->set_filename('css', $file);
-          $conf_mail[$cache_key]['template']->assign_var_from_handle('LOCAL_MAIL_CSS', 'css');
-        }
-        */
       }
 
Index: /trunk/themes/Sylvia/mail-css.tpl
===================================================================
--- /trunk/themes/Sylvia/mail-css.tpl	(revision 5124)
+++ /trunk/themes/Sylvia/mail-css.tpl	(revision 5125)
@@ -4,7 +4,7 @@
 #the_page {ldelim} }
 #content {ldelim} }
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.jpg) no-repeat scroll left bottom;
+#copyright {ldelim} background: transparent url({$ROOT_URL}themes/{$themeconf.theme}/images/bottom-left-bg.jpg) no-repeat scroll left bottom;
 min-height: 220px; height: 220px; width: 100%; min-width: 100%; padding: 10px 100px 30px 100px; }
-h2 {ldelim} color:#f70;background: transparent url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/fillet.gif) repeat-x scroll left bottom; padding-bottom: 5px;}
+h2 {ldelim} color:#f70;background: transparent url({$ROOT_URL}themes/{$themeconf.theme}/images/fillet.gif) repeat-x scroll left bottom; padding-bottom: 5px;}
 img {ldelim} margin: 16px; border: 16px solid #444; -moz-border-radius: 4px; border-radius: 4px 4px; }
 img:hover {ldelim} padding: 15px; border: 0; background-color:#222;-moz-border-radius: 4px; border-radius: 4px 4px; }
Index: /trunk/themes/clear/mail-css.tpl
===================================================================
--- /trunk/themes/clear/mail-css.tpl	(revision 5124)
+++ /trunk/themes/clear/mail-css.tpl	(revision 5125)
@@ -2,7 +2,7 @@
 
 body {ldelim} background-color:#fff; color:#696969;}
-#the_page {ldelim} background: #fff url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+#the_page {ldelim} background: #fff url({$ROOT_URL}themes/default/images/mail/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/footer-bg.png) no-repeat scroll left bottom;
 color: #333;}
 h2 {ldelim} background-color: #ddd;}
Index: /trunk/themes/dark/mail-css.tpl
===================================================================
--- /trunk/themes/dark/mail-css.tpl	(revision 5124)
+++ /trunk/themes/dark/mail-css.tpl	(revision 5125)
@@ -2,9 +2,9 @@
 
 body {ldelim} background-color:#444; color:#fff;}
-#the_page {ldelim} background: #444 url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+#the_page {ldelim} background: #444 url({$ROOT_URL}themes/default/images/mail/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/footer-bg.png) no-repeat scroll left bottom;
 color: #69c;}
-h2 {ldelim} background-color: #333;color:#fff48e;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);}
+h2 {ldelim} background-color: #333;color:#fff48e;background-image: url({$ROOT_URL}themes/{$themeconf.theme}/images/tableh1_bg.png);}
 img {ldelim} margin: 16px; border: 16px solid #111; -moz-border-radius: 4px; border-radius: 4px 4px; }
 img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#444;-moz-border-radius: 4px; border-radius: 4px 4px; }
Index: /trunk/themes/default/images/index.php
===================================================================
--- /trunk/themes/default/images/index.php	(revision 5125)
+++ /trunk/themes/default/images/index.php	(revision 5125)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /trunk/themes/default/images/mail/index.php
===================================================================
--- /trunk/themes/default/images/mail/index.php	(revision 5125)
+++ /trunk/themes/default/images/mail/index.php	(revision 5125)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /trunk/themes/default/template/mail/text/html/header.tpl
===================================================================
--- /trunk/themes/default/template/mail/text/html/header.tpl	(revision 5124)
+++ /trunk/themes/default/template/mail/text/html/header.tpl	(revision 5125)
@@ -11,5 +11,4 @@
 {if isset($GLOBAL_MAIL_CSS)}{$GLOBAL_MAIL_CSS}{/if}
 {if isset($MAIL_CSS)}{$MAIL_CSS}{/if}
-{if isset($LOCAL_MAIL_CSS)}{$LOCAL_MAIL_CSS}{/if}
 --></style>
 </head>
Index: /trunk/themes/p0w0/mail-css.tpl
===================================================================
--- /trunk/themes/p0w0/mail-css.tpl	(revision 5124)
+++ /trunk/themes/p0w0/mail-css.tpl	(revision 5125)
@@ -2,9 +2,9 @@
 
 body {ldelim} background-color:#cde; color:#369;}
-#the_page {ldelim} background: #cde url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+#the_page {ldelim} background: #cde url({$ROOT_URL}themes/default/images/mail/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/footer-bg.png) no-repeat scroll left bottom;
 color: #69c;}
-h2 {ldelim} color:#fff;background: #369 url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/button-bg.png);}
+h2 {ldelim} color:#fff;background: #369 url({$ROOT_URL}themes/{$themeconf.theme}/images/button-bg.png);}
 img {ldelim} margin:16px;padding:15px;border:1px solid #69c;background-color:#eef;-moz-border-radius:4px; border-radius:4px 4px; }
 img:hover {ldelim} border: 1px solid #c60; -moz-border-radius:4px; border-radius:4px 4px; }
Index: /trunk/themes/wipi/mail-css.tpl
===================================================================
--- /trunk/themes/wipi/mail-css.tpl	(revision 5124)
+++ /trunk/themes/wipi/mail-css.tpl	(revision 5125)
@@ -2,9 +2,9 @@
 
 body {ldelim} background-color:#111; color:#69c;}
-#the_page {ldelim} background: #111 url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
+#the_page {ldelim} background: #111 url({$ROOT_URL}themes/default/images/mail/mailbody-bg.png) repeat-y scroll left top;}
+#content {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/header-bg.png) no-repeat scroll left top;}
+#copyright {ldelim} background: transparent url({$ROOT_URL}themes/default/images/mail/footer-bg.png) no-repeat scroll left bottom;
 color: #69c;}
-h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/themes/{$themeconf.theme}/images/tableh1_bg.png);}
+h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}themes/{$themeconf.theme}/images/tableh1_bg.png);}
 img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; }
 img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; }
