From: Alexander Ebert Date: Wed, 6 Jan 2016 15:46:16 +0000 (+0100) Subject: Using Box::render() instead of Box::__toString() X-Git-Tag: 3.0.0_Beta_1~2030^2~170^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2cd54d7f4f09e8df3a021f6e13eed7ed00c71d94;p=GitHub%2FWoltLab%2FWCF.git Using Box::render() instead of Box::__toString() `__toString()` is not allowed to throw any exception (for whatever reason, this is php I guess), causing a real pain when trying to debug errors. All though `__toString()` is the most elegant way, it turned out to be less practical hence all occurences have been replaced with `render()` instead. --- diff --git a/com.woltlab.wcf/templates/footer.tpl b/com.woltlab.wcf/templates/footer.tpl index 2cc8504a71..a86014672d 100644 --- a/com.woltlab.wcf/templates/footer.tpl +++ b/com.woltlab.wcf/templates/footer.tpl @@ -5,7 +5,7 @@
{content} {foreach from=$__wcf->getBoxHandler()->getBoxes('contentBottom') item=box} - {@$box} + {@$box->render()} {/foreach} {/content}
@@ -35,7 +35,7 @@ {/if} {foreach from=$__wcf->getBoxHandler()->getBoxes('sidebarRight') item=box} - {@$box} + {@$box->render()} {/foreach} {event name='boxesSidebarRightBottom'} @@ -52,7 +52,7 @@
{content} {foreach from=$__wcf->getBoxHandler()->getBoxes('bottom') item=box} - {@$box} + {@$box->render()} {/foreach} {/content}
@@ -68,7 +68,7 @@ {if !$footerBoxes|empty}{@$footerBoxes}{/if} {foreach from=$__wcf->getBoxHandler()->getBoxes('footerBoxes') item=box} - {@$box} + {@$box->render()} {/foreach} {/content} diff --git a/com.woltlab.wcf/templates/header.tpl b/com.woltlab.wcf/templates/header.tpl index 0d35123630..c6e8bd4429 100644 --- a/com.woltlab.wcf/templates/header.tpl +++ b/com.woltlab.wcf/templates/header.tpl @@ -13,7 +13,7 @@
{content} {foreach from=$__wcf->getBoxHandler()->getBoxes('headerBoxes') item=box} - {@$box} + {@$box->render()} {/foreach} {/content}
@@ -29,7 +29,7 @@
{content} {foreach from=$__wcf->getBoxHandler()->getBoxes('top') item=box} - {@$box} + {@$box->render()} {/foreach} {/content}
@@ -59,7 +59,7 @@ {/if} {foreach from=$__wcf->getBoxHandler()->getBoxes('sidebarLeft') item=box} - {@$box} + {@$box->render()} {/foreach} {event name='boxesSidebarLeftBottom'} @@ -78,7 +78,7 @@
{content} {foreach from=$__wcf->getBoxHandler()->getBoxes('contentTop') item=box} - {@$box} + {@$box->render()} {/foreach} {/content}
diff --git a/com.woltlab.wcf/templates/pageFooter.tpl b/com.woltlab.wcf/templates/pageFooter.tpl index 2f6c23fcee..322c8f4ba2 100644 --- a/com.woltlab.wcf/templates/pageFooter.tpl +++ b/com.woltlab.wcf/templates/pageFooter.tpl @@ -5,7 +5,7 @@
{content} {foreach from=$__wcf->getBoxHandler()->getBoxes('footer') item=box} - {@$box} + {@$box->render()} {/foreach} {/content}
diff --git a/com.woltlab.wcf/templates/pageHeader.tpl b/com.woltlab.wcf/templates/pageHeader.tpl index 200dce29a2..345e9db9e5 100644 --- a/com.woltlab.wcf/templates/pageHeader.tpl +++ b/com.woltlab.wcf/templates/pageHeader.tpl @@ -33,7 +33,7 @@
{content} {foreach from=$__wcf->getBoxHandler()->getBoxes('hero') item=box} - {@$box} + {@$box->render()} {/foreach} {/content}
diff --git a/com.woltlab.wcf/templates/pageHeaderMenu.tpl b/com.woltlab.wcf/templates/pageHeaderMenu.tpl index fab563ca1b..b31bbf463f 100644 --- a/com.woltlab.wcf/templates/pageHeaderMenu.tpl +++ b/com.woltlab.wcf/templates/pageHeaderMenu.tpl @@ -1,4 +1,4 @@ -{@$__wcf->getBoxHandler()->getBoxes('mainMenu')[0]} +{@$__wcf->getBoxHandler()->getBoxes('mainMenu')[0]->render()} {*if $__wcf->getPageMenu()->getMenuItems('header')|count > 0}