diff options
author | zotlabs <mike@macgirvin.com> | 2018-10-30 18:11:49 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-10-30 18:11:49 -0700 |
commit | 70c55da1df69d90dcbeb5a78c994b23a8456bfc9 (patch) | |
tree | 86d39069b02ecabe4ed091514e5076a98abda43a /vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php | |
parent | 623aa7ea48149ca7c2bc556931f25befdf49e58a (diff) | |
parent | f9ab7647dd660adb37464614616cb8484c500de4 (diff) | |
download | volse-hubzilla-70c55da1df69d90dcbeb5a78c994b23a8456bfc9.tar.gz volse-hubzilla-70c55da1df69d90dcbeb5a78c994b23a8456bfc9.tar.bz2 volse-hubzilla-70c55da1df69d90dcbeb5a78c994b23a8456bfc9.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php b/vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php index 77f619eca..8d66be3ae 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php @@ -30,7 +30,7 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource * {@internal implementing this method is optional. * Only implement it if modification times can be accessed faster than loading the complete template source.}} * - * @param string $name template name + * @param string $name template name * * @return integer|boolean timestamp (epoch) the template was modified, or false if not found */ @@ -47,9 +47,8 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource */ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null) { - $source->filepath = $source->type . ':' . substr(preg_replace('/[^A-Za-z0-9.]/','',$source->name),0,25); + $source->filepath = $source->type . ':' . substr(preg_replace('/[^A-Za-z0-9.]/', '', $source->name), 0, 25); $source->uid = sha1($source->type . ':' . $source->name); - $mtime = $this->fetchTimestamp($source->name); if ($mtime !== null) { $source->timestamp = $mtime; @@ -66,7 +65,7 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource /** * Load template's source into current template object * - * @param Smarty_Template_Source $source source object + * @param Smarty_Template_Source $source source object * * @return string template source * @throws SmartyException if source cannot be loaded @@ -77,19 +76,18 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource if (isset($content)) { return $content; } - throw new SmartyException("Unable to read template {$source->type} '{$source->name}'"); } /** * Determine basename for compiled filename * - * @param Smarty_Template_Source $source source object + * @param Smarty_Template_Source $source source object * * @return string resource's basename */ public function getBasename(Smarty_Template_Source $source) { - return basename(substr(preg_replace('/[^A-Za-z0-9.]/','',$source->name),0,25)); + return basename(substr(preg_replace('/[^A-Za-z0-9.]/', '', $source->name), 0, 25)); } } |