[Svn] r2509 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Thu May 21 09:14:05 CEST 2009


Author: alec
Date: 2009-05-21 02:14:05 -0500 (Thu, 21 May 2009)
New Revision: 2509

Modified:
   trunk/roundcubemail/program/include/rcube_template.php
Log:
- support plugin templates


Modified: trunk/roundcubemail/program/include/rcube_template.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_template.php	2009-05-20 13:12:20 UTC (rev 2508)
+++ trunk/roundcubemail/program/include/rcube_template.php	2009-05-21 07:14:05 UTC (rev 2509)
@@ -332,7 +332,12 @@
     private function parse($name = 'main', $exit = true)
     {
         $skin_path = $this->config['skin_path'];
-        $path = "$skin_path/templates/$name.html";
+        
+	$temp = explode(".", $name, 2);
+	if (count($temp) > 1) {
+	    $path = $this->config['plugins_dir'] . '/' . $temp[0] . '/skins/' . $this->config['skin'] . '/templates/' . $temp[1] . '.html';
+	} else
+	    $path = "$skin_path/templates/$name.html";
 
         // read template file
         if (($templ = @file_get_contents($path)) === false) {

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list