mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-06 11:39:12 -04:00
Pass extra args on to the block function.
Avoid excess string concatenation (not benchmarked).
This commit is contained in:
@@ -87,13 +87,15 @@ class Theme_Core {
|
||||
}
|
||||
}
|
||||
|
||||
$blocks = "";
|
||||
$blocks = array();
|
||||
if (!empty($this->block_helpers[$function])) {
|
||||
foreach ($this->block_helpers[$function] as $helper_class) {
|
||||
$blocks .= call_user_func_array(array($helper_class, $function), array($this)) . "\n";
|
||||
$blocks[] = call_user_func_array(
|
||||
array($helper_class, $function),
|
||||
array_merge(array($this), $args));
|
||||
}
|
||||
}
|
||||
return $blocks;
|
||||
return implode("\n", $blocks);
|
||||
|
||||
default:
|
||||
throw new Exception("@todo UNKNOWN_THEME_FUNCTION: $function");
|
||||
|
||||
Reference in New Issue
Block a user