version: Only show vote link when logged in
This commit is contained in:
committed by
Chris Morgan
parent
b9577f0815
commit
93c01ad56b
@@ -822,9 +822,13 @@ class version {
|
|||||||
$oM = new objectManager("voteManager", "Vote");
|
$oM = new objectManager("voteManager", "Vote");
|
||||||
$oM->setReturnTo($this->objectMakeUrl());
|
$oM->setReturnTo($this->objectMakeUrl());
|
||||||
// Votes
|
// Votes
|
||||||
|
if($_SESSION['current']->isLoggedIn())
|
||||||
|
$shVoteLink = ' <a href="'.$oM->makeUrl("edit", $_SESSION['current']->iUserId).'&iVersionId='.$this->iVersionId.'">Vote</a>';
|
||||||
|
else
|
||||||
|
$shVoteLink = '';
|
||||||
echo html_tr(array(
|
echo html_tr(array(
|
||||||
"<b>Votes</b>",
|
"<b>Votes</b>",
|
||||||
vote_count_version_total($this->iVersionId).' <a href="'.$oM->makeUrl("edit", $_SESSION['current']->iUserId).'&iVersionId='.$this->iVersionId.'">Vote</a>'),
|
vote_count_version_total($this->iVersionId).$shVoteLink),
|
||||||
"color0");
|
"color0");
|
||||||
|
|
||||||
if($this->sTestedRating != "/" && $this->sTestedRating)
|
if($this->sTestedRating != "/" && $this->sTestedRating)
|
||||||
|
|||||||
Reference in New Issue
Block a user