diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-08-17 18:16:50 +0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-08-17 18:16:50 +0200 |
commit | a468938a5a87c6cd135afbc3bf122723c9305d4f (patch) | |
tree | d5272f1b42856ba0c43f4796bf3454dea02cbf20 | |
parent | ec5ad71342971edd7dc5425f80a620fcf0d459fc (diff) | |
download | semanticscuttle-a468938a5a87c6cd135afbc3bf122723c9305d4f.tar.gz semanticscuttle-a468938a5a87c6cd135afbc3bf122723c9305d4f.tar.bz2 |
prevent notice when sidebar blocks are not defined
-rw-r--r-- | data/templates/default/sidebar.tpl.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/data/templates/default/sidebar.tpl.php b/data/templates/default/sidebar.tpl.php index e823af5..b4fac96 100644 --- a/data/templates/default/sidebar.tpl.php +++ b/data/templates/default/sidebar.tpl.php @@ -1,4 +1,6 @@ -<?php if($GLOBALS['enableAdminColors']!=false && isset($userid) && $userservice->isAdmin($userid)): ?> +<?php if ($GLOBALS['enableAdminColors'] != false + && isset($userid) && $userservice->isAdmin($userid) +): ?> <div id="sidebar" class="adminBackground"> <?php else: ?> <div id="sidebar"> @@ -8,9 +10,11 @@ <?php echo $GLOBALS['sidebarTopMessage'].' '; -$size = count($sidebar_blocks); -for ($i = 0; $i < $size; $i++) { - $this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]); +if (isset($sidebar_blocks) && count($sidebar_blocks)) { + $size = count($sidebar_blocks); + for ($i = 0; $i < $size; $i++) { + $this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]); + } } echo $GLOBALS['sidebarBottomMessage']; |