}
if (is_array($item)) {
$this->_applications[$item['app']] = $item['app'];
- $block = Horde_Block_Collection::getBlock($item['app'], $item['params']['type'], $item['params']['params'], $row_num, $col_num);
- $rowspan = $item['height'];
- $colspan = $item['width'];
- for ($i = 0; $i < $item['height']; $i++) {
- if (!isset($covered[$row_num + $i])) {
- $covered[$row_num + $i] = array();
+ try {
+ $block = Horde_Block_Collection::getBlock($item['app'], $item['params']['type'], $item['params']['params'], $row_num, $col_num);
+ $rowspan = $item['height'];
+ $colspan = $item['width'];
+ for ($i = 0; $i < $item['height']; $i++) {
+ if (!isset($covered[$row_num + $i])) {
+ $covered[$row_num + $i] = array();
+ }
+ for ($j = 0; $j < $item['width']; $j++) {
+ $covered[$row_num + $i][$col_num + $j] = true;
+ }
}
- for ($j = 0; $j < $item['width']; $j++) {
- $covered[$row_num + $i][$col_num + $j] = true;
+ if ($block instanceof Horde_Block) {
+ $header = $block->getTitle();
+ $content = $block->getContent();
+ if ($content instanceof PEAR_Error) {
+ $content = $content->getMessage();
+ }
+ if ($browser->hasFeature('xmlhttpreq')) {
+ $refresh_time = isset($item['params']['params']['_refresh_time']) ? $item['params']['params']['_refresh_time'] : $interval;
+ }
+ ob_start();
+ include $tplDir . '/portal/block.inc';
+ $html .= ob_get_clean();
+ } else {
+ $html .= '<td width="' . ($width * $colspan) . '%"> </td>';
}
- }
- if ($block instanceof PEAR_Error) {
+ } catch (Horde_Exception $e) {
$header = _("Error");
- $content = $block->getMessage();
- ob_start();
- include $tplDir . '/portal/block.inc';
- $html .= ob_get_clean();
- } elseif ($block instanceof Horde_Block) {
- $header = $block->getTitle();
- $content = $block->getContent();
- if ($content instanceof PEAR_Error) {
- $content = $content->getMessage();
- }
- if ($browser->hasFeature('xmlhttpreq')) {
- $refresh_time = isset($item['params']['params']['_refresh_time']) ? $item['params']['params']['_refresh_time'] : $interval;
- }
+ $content = $e->getMessage();
ob_start();
include $tplDir . '/portal/block.inc';
$html .= ob_get_clean();
- } else {
- $html .= '<td width="' . ($width * $colspan) . '%"> </td>';
}
} else {
$html .= '<td width="' . ($width) . '%"> </td>';