Redbean + Smarty update
This commit is contained in:
parent
c1b8226466
commit
eb0835ff74
122 changed files with 12653 additions and 11637 deletions
|
@ -1,18 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Registered Function
|
||||
*
|
||||
* Compiles code for the execution of a registered function
|
||||
*
|
||||
* @package Smarty
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
* @author Uwe Tews
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Compile Registered Function Class
|
||||
*
|
||||
* @package Smarty
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
*/
|
||||
class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Internal_CompileBase
|
||||
|
@ -32,6 +31,7 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
|
|||
* @param object $compiler compiler object
|
||||
* @param array $parameter array with compilation parameter
|
||||
* @param string $tag name of function
|
||||
*
|
||||
* @return string compiled code
|
||||
*/
|
||||
public function compile($args, $compiler, $parameter, $tag)
|
||||
|
@ -44,20 +44,20 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
|
|||
$compiler->tag_nocache = true;
|
||||
}
|
||||
unset($_attr['nocache']);
|
||||
if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {
|
||||
$tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag];
|
||||
} else {
|
||||
$tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_FUNCTION][$tag];
|
||||
}
|
||||
if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {
|
||||
$tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag];
|
||||
} else {
|
||||
$tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_FUNCTION][$tag];
|
||||
}
|
||||
// not cachable?
|
||||
$compiler->tag_nocache = $compiler->tag_nocache || !$tag_info[1];
|
||||
$compiler->tag_nocache = $compiler->tag_nocache || !$tag_info[1];
|
||||
// convert attributes into parameter array string
|
||||
$_paramsArray = array();
|
||||
foreach ($_attr as $_key => $_value) {
|
||||
if (is_int($_key)) {
|
||||
$_paramsArray[] = "$_key=>$_value";
|
||||
} elseif ($compiler->template->caching && in_array($_key,$tag_info[2])) {
|
||||
$_value = str_replace("'","^#^",$_value);
|
||||
} elseif ($compiler->template->caching && in_array($_key, $tag_info[2])) {
|
||||
$_value = str_replace("'", "^#^", $_value);
|
||||
$_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";
|
||||
} else {
|
||||
$_paramsArray[] = "'$_key'=>$_value";
|
||||
|
@ -76,5 +76,4 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
|
|||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue