aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/templates/default/sidebar.tpl.php12
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'];