add current dev version (WIP)
[GitHub/Stricted/Domain-Control-Panel.git] / lib / system / DNS.class.php
index 87edc9d57fd09338dd272caa1a371c6fbebed508..1b1dc515d8ff30ef7b506a81c2c544a8792149c8 100644 (file)
@@ -138,9 +138,11 @@ class DNS {
                if (error_reporting() != 0) {
                        $type = 'error';
                        switch ($errorNo) {
-                               case 2: $type = 'warning';
+                               case 2:
+                                       $type = 'warning';
                                        break;
-                               case 8: $type = 'notice';
+                               case 8:
+                                       $type = 'notice';
                                        break;
                        }
                        
@@ -285,7 +287,12 @@ class DNS {
                require_once(DNS_DIR.'/lib/system/api/smarty/libs/Smarty.class.php');
                self::$tplObj = new \Smarty;
                
-               self::getTPL()->setTemplateDir(DNS_DIR.(empty(self::$module) ? '' : '/'.self::$module)."/templates/".$tpl);
+               if (!empty(self::$module)) {
+                       // try first to load the template from module then from core
+                       self::getTPL()->addTemplateDir(DNS_DIR.'/'.self::$module."/templates/".$tpl);
+               }
+               
+               self::getTPL()->addTemplateDir(DNS_DIR."/templates/".$tpl);
                self::getTPL()->setCompileDir(DNS_DIR.(empty(self::$module) ? '' : '/'.self::$module)."/templates/compiled/".$tpl);
                self::getTPL()->setPluginsDir(array(
                        DNS_DIR."/lib/system/api/smarty/libs/plugins",