[limb-svn] r6775 - in 3.x/trunk/limb/macro/src: . compiler

svn at limb-project.com svn at limb-project.com
Thu Feb 7 14:47:36 MSK 2008


Author: korchasa
Date: 2008-02-07 14:47:36 +0300 (Thu, 07 Feb 2008)
New Revision: 6775
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6775

Modified:
   3.x/trunk/limb/macro/src/compiler/lmbMacroCompiler.class.php
   3.x/trunk/limb/macro/src/lmbMacroTemplate.class.php
Log:
 -- the presence of a template is defined in the compiler

Modified: 3.x/trunk/limb/macro/src/compiler/lmbMacroCompiler.class.php
===================================================================
--- 3.x/trunk/limb/macro/src/compiler/lmbMacroCompiler.class.php	2008-02-07 11:15:59 UTC (rev 6774)
+++ 3.x/trunk/limb/macro/src/compiler/lmbMacroCompiler.class.php	2008-02-07 11:47:36 UTC (rev 6775)
@@ -68,7 +68,8 @@
 
   function parseTemplate($file_name, $root_node)
   {
-    $source_file_path = $this->template_locator->locateSourceTemplate($file_name);
+    if(!$source_file_path = $this->template_locator->locateSourceTemplate($file_name))
+          throw new lmbMacroException('Template source file not found', array('file_name' => $file_name));
     $parser = new lmbMacroParser($this->tree_builder, $this->tag_dictionary);
     $parser->parse($source_file_path, $root_node);
   }

Modified: 3.x/trunk/limb/macro/src/lmbMacroTemplate.class.php
===================================================================
--- 3.x/trunk/limb/macro/src/lmbMacroTemplate.class.php	2008-02-07 11:15:59 UTC (rev 6774)
+++ 3.x/trunk/limb/macro/src/lmbMacroTemplate.class.php	2008-02-07 11:47:36 UTC (rev 6775)
@@ -68,9 +68,6 @@
 
       if($this->config['is_force_compile'] || !file_exists($this->compiled_file))
       {
-        if(!$source_file = $this->locator->locateSourceTemplate($this->file))
-          throw new lmbMacroException('Template source file not found', array('file_name' => $this->file));
-
         $macro_executor_class = 'MacroTemplateExecutor' . uniqid();//think about evaling this instance
 
         $compiler = $this->_createCompiler();



More information about the limb-svn mailing list