first commit
This commit is contained in:
24
class/smarty_plugins/resource.fallback.php
Normal file
24
class/smarty_plugins/resource.fallback.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Resource File.
|
||||
*
|
||||
* Implements the file system as resource for Smarty templates
|
||||
*/
|
||||
class Smarty_Resource_Fallback extends Smarty_Internal_Resource_File
|
||||
{
|
||||
public function populate(Smarty_Template_Source $source, ?Smarty_Internal_Template $_template = null)
|
||||
{
|
||||
$files = $source->name;
|
||||
|
||||
foreach (explode(':', $files) as $part) {
|
||||
$source->name = $part;
|
||||
|
||||
parent::populate($source, $_template);
|
||||
|
||||
if ($source->filepath !== false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user