mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
- Allow '://' URL syntax in template names of stream resources (Issue #129)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== trunk =====
|
||||
06.01.2013
|
||||
- Allow '://' URL syntax in template names of stream resources (Issue #129)
|
||||
|
||||
27.11.2012
|
||||
- bugfix wrong variable usage in smarty_internal_utility.php (Issue #125)
|
||||
|
||||
|
@@ -30,7 +30,11 @@ class Smarty_Internal_Resource_Stream extends Smarty_Resource_Recompiled {
|
||||
*/
|
||||
public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
|
||||
{
|
||||
if(strpos($source->resource, '://') !== false) {
|
||||
$source->filepath = $source->resource;
|
||||
} else {
|
||||
$source->filepath = str_replace(':', '://', $source->resource);
|
||||
}
|
||||
$source->uid = false;
|
||||
$source->content = $this->getContent($source);
|
||||
$source->timestamp = false;
|
||||
@@ -72,5 +76,3 @@ class Smarty_Internal_Resource_Stream extends Smarty_Resource_Recompiled {
|
||||
return get_class($this) . '#' . $resource_name;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user