summaryrefslogtreecommitdiff
path: root/data/templates/default
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-08-17 18:16:50 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-09-05 18:50:42 +0200
commit160ce01f7b709c38e9c3c081076a2d3e561ae2c5 (patch)
treed5b0181a6c665a74f129bd26e62305cc99038ab5 /data/templates/default
parentcf4036104b5fffd63473dfa53f44fd15ef4d1727 (diff)
downloadsemanticscuttle-160ce01f7b709c38e9c3c081076a2d3e561ae2c5.tar.gz
semanticscuttle-160ce01f7b709c38e9c3c081076a2d3e561ae2c5.tar.bz2
prevent notice when sidebar blocks are not defined
Diffstat (limited to 'data/templates/default')
-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'];