summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplateManager.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-05-21 17:10:29 +0000
committerctrlaltca@gmail.com <>2011-05-21 17:10:29 +0000
commit6f00b28a1d9c7409c956a83866eac48a9493e83c (patch)
treefb3e14f0a527cf32d186932b13bd6ae9ed50a5c1 /framework/Web/UI/TTemplateManager.php
parent5a91b2a3328c8c15ce9dbed9a599ab87f9e8f112 (diff)
branch/3.1: merged bugfixesfrom trunk/ up to r2880; correct svn:mergeinfo property
Diffstat (limited to 'framework/Web/UI/TTemplateManager.php')
-rw-r--r--framework/Web/UI/TTemplateManager.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 6d44d7d7..af88620c 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -890,15 +890,19 @@ class TTemplate extends TApplicationComponent implements ITemplate
else
return array(self::CONFIG_EXPRESSION,ltrim($expr,'.'));
}
- else if(preg_match('/\\s*(<%~.*?%>|<%\\$.*?%>|<%\\[.*?\\]%>)\\s*/msS',$value,$matches) && $matches[0]===$value)
+ else if(preg_match('/\\s*(<%~.*?%>|<%\\$.*?%>|<%\\[.*?\\]%>|<%\/.*?%>)\\s*/msS',$value,$matches) && $matches[0]===$value)
{
$value=$matches[1];
- if($value[2]==='~') // a URL
+ if($value[2]==='~')
return array(self::CONFIG_ASSET,trim(substr($value,3,strlen($value)-5)));
- else if($value[2]==='[')
+ elseif($value[2]==='[')
return array(self::CONFIG_LOCALIZATION,trim(substr($value,3,strlen($value)-6)));
- else if($value[2]==='$')
+ elseif($value[2]==='$')
return array(self::CONFIG_PARAMETER,trim(substr($value,3,strlen($value)-5)));
+ elseif($value[2]==='/') {
+ $literal = trim(substr($value,3,strlen($value)-5));
+ return array(self::CONFIG_EXPRESSION,"dirname(\$this->getApplication()->getRequest()->getApplicationUrl()).'/$literal'");
+ }
}
else
return $value;