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']) {
|
if (!$GLOBALS['enableVoting']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($row['hasVoted']) {
|
if (isset($row['hasVoted']) && !$row['hasVoted']) {
|
||||||
$classes = 'vote-badge vote-badge-inactive';
|
$classes = 'vote-badge vote-badge-inactive';
|
||||||
} else {
|
} else {
|
||||||
$classes = 'vote-badge';
|
$classes = 'vote-badge';
|
||||||
}
|
}
|
||||||
echo '<span class="' . $classes . '">';
|
echo '<span class="' . $classes . '">';
|
||||||
if (!$row['hasVoted']) {
|
|
||||||
|
if (isset($row['hasVoted']) && !$row['hasVoted']) {
|
||||||
echo '<a class="vote-for" href="'
|
echo '<a class="vote-for" href="'
|
||||||
. createVoteURL(true, $row['bId']) . '">+</a>';
|
. createVoteURL(true, $row['bId']) . '">+</a>';
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="vote-for-inactive">+</span>';
|
echo '<span class="vote-for-inactive">+</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<span class="voting">' . $row['bVoting'] . '</span>';
|
echo '<span class="voting">' . $row['bVoting'] . '</span>';
|
||||||
if (!$row['hasVoted']) {
|
|
||||||
|
if (isset($row['hasVoted']) && !$row['hasVoted']) {
|
||||||
echo '<a class="vote-against" href="'
|
echo '<a class="vote-against" href="'
|
||||||
. createVoteURL(false, $row['bId']) . '">-</a>';
|
. createVoteURL(false, $row['bId']) . '">-</a>';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue