Author: spadkins
Date: Thu Nov  9 13:12:39 2006
New Revision: 8038

Modified:
   p5ee/trunk/App-Widget/lib/App/TemplateEngine.pm

Log:
Fixed bug with expand vars

Modified: p5ee/trunk/App-Widget/lib/App/TemplateEngine.pm
==============================================================================
--- p5ee/trunk/App-Widget/lib/App/TemplateEngine.pm     (original)
+++ p5ee/trunk/App-Widget/lib/App/TemplateEngine.pm     Thu Nov  9 13:12:39 2006
@@ -301,7 +301,12 @@
             else {
                 $value = "";
             }
-            $template_text =~ s/\{$var\}/$value/g;
+            if ($expand) {
+                $template_text =~ s/\{\+$var\}/$value/g;
+            }
+            else {
+                $template_text =~ s/\{$var\}/$value/g;
+            }
         }
     }
 
@@ -323,7 +328,13 @@
         else {
             $value = "";
         }
-        $template_text =~ s/\[%\+$var%\]/$value/g;
+
+        if ($expand) {
+            $template_text =~ s/\[%\+$var%\]/$value/g;
+        }
+        else {
+            $template_text =~ s/\[%$var%\]/$value/g;
+        }
     }
 
     &App::sub_exit($template_text) if ($App::trace);

Reply via email to