version: Only show vote link when logged in

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-12-06 09:43:34 +01:00
committed by Chris Morgan
parent b9577f0815
commit 93c01ad56b

View File

@@ -822,9 +822,13 @@ class version {
$oM = new objectManager("voteManager", "Vote");
$oM->setReturnTo($this->objectMakeUrl());
// Votes
if($_SESSION['current']->isLoggedIn())
$shVoteLink = ' &nbsp; <a href="'.$oM->makeUrl("edit", $_SESSION['current']->iUserId).'&iVersionId='.$this->iVersionId.'">Vote</a>';
else
$shVoteLink = '';
echo html_tr(array(
"<b>Votes</b>",
vote_count_version_total($this->iVersionId).' &nbsp; <a href="'.$oM->makeUrl("edit", $_SESSION['current']->iUserId).'&iVersionId='.$this->iVersionId.'">Vote</a>'),
vote_count_version_total($this->iVersionId).$shVoteLink),
"color0");
if($this->sTestedRating != "/" && $this->sTestedRating)