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
This commit is contained in:
parent
190d0e92db
commit
a5dae49520
1 changed files with 6 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue