summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-22 21:50:39 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-22 21:50:39 +0000
commit35cfbfdef457d7d330c5a3839baea250a563af67 (patch)
tree5e584553da64631dbc69e0b18cb7f650641e5d7e
parentc6f0cc036df6a1306b03c987092197d8bab27111 (diff)
Pass extra args on to the block function.
Avoid excess string concatenation (not benchmarked).
-rw-r--r--core/libraries/Theme.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php
index d7790626..569b2d52 100644
--- a/core/libraries/Theme.php
+++ b/core/libraries/Theme.php
@@ -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");