aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-27 20:36:43 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-27 20:36:43 +0000
commita5dae49520e7f4d7c42364c1be9907504c29b9c1 (patch)
treede309b7b7a6dee5514e2bad2f9e9b68a48494567 /data
parent190d0e92dbdd80c5c784fe08eaaf5f35486362e1 (diff)
downloadsemanticscuttle-a5dae49520e7f4d7c42364c1be9907504c29b9c1.tar.gz
semanticscuttle-a5dae49520e7f4d7c42364c1be9907504c29b9c1.tar.bz2
do not error out when user is not logged in
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@439 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'data')
-rw-r--r--data/templates/bookmarks-vote.inc.tpl.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/data/templates/bookmarks-vote.inc.tpl.php b/data/templates/bookmarks-vote.inc.tpl.php
index 37a58c1..5884284 100644
--- a/data/templates/bookmarks-vote.inc.tpl.php
+++ b/data/templates/bookmarks-vote.inc.tpl.php
@@ -8,20 +8,23 @@
if (!$GLOBALS['enableVoting']) {
return;
}
-if ($row['hasVoted']) {
+if (isset($row['hasVoted']) && !$row['hasVoted']) {
$classes = 'vote-badge vote-badge-inactive';
} else {
$classes = 'vote-badge';
}
echo '<span class="' . $classes . '">';
-if (!$row['hasVoted']) {
+
+if (isset($row['hasVoted']) && !$row['hasVoted']) {
echo '<a class="vote-for" href="'
. createVoteURL(true, $row['bId']) . '">+</a>';
} else {
echo '<span class="vote-for-inactive">+</span>';
}
+
echo '<span class="voting">' . $row['bVoting'] . '</span>';
-if (!$row['hasVoted']) {
+
+if (isset($row['hasVoted']) && !$row['hasVoted']) {
echo '<a class="vote-against" href="'
. createVoteURL(false, $row['bId']) . '">-</a>';
} else {