]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
do not error out when user is not logged in
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 27 Oct 2009 20:36:43 +0000 (20:36 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 27 Oct 2009 20:36:43 +0000 (20:36 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@439 b3834d28-1941-0410-a4f8-b48e95affb8f

data/templates/bookmarks-vote.inc.tpl.php

index 37a58c1d86a0d5dc62ba841e69c3f50e6fb4117e..58842845be2aca1f0002bbbaed5896c8b770df14 100644 (file)
@@ -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 {