From fd626022ec02ef47b9142bba08180502babbd0ca Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Jul 2012 22:23:08 -0700 Subject: add smarty engine, remove some obsolete zot1 stuff --- .../Smarty/demo/plugins/resource.extendsall.php | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 library/Smarty/demo/plugins/resource.extendsall.php (limited to 'library/Smarty/demo/plugins/resource.extendsall.php') diff --git a/library/Smarty/demo/plugins/resource.extendsall.php b/library/Smarty/demo/plugins/resource.extendsall.php new file mode 100644 index 000000000..d8c40b5ba --- /dev/null +++ b/library/Smarty/demo/plugins/resource.extendsall.php @@ -0,0 +1,60 @@ +smarty->getTemplateDir() as $key => $directory) { + try { + $s = Smarty_Resource::source(null, $source->smarty, '[' . $key . ']' . $source->name ); + if (!$s->exists) { + continue; + } + $sources[$s->uid] = $s; + $uid .= $s->filepath; + } + catch (SmartyException $e) {} + } + + if (!$sources) { + $source->exists = false; + $source->template = $_template; + return; + } + + $sources = array_reverse($sources, true); + reset($sources); + $s = current($sources); + + $source->components = $sources; + $source->filepath = $s->filepath; + $source->uid = sha1($uid); + $source->exists = $exists; + if ($_template && $_template->smarty->compile_check) { + $source->timestamp = $s->timestamp; + } + // need the template at getContent() + $source->template = $_template; + } +} + +?> \ No newline at end of file -- cgit v1.2.3