Don't show vote link for obsolete versions
This commit is contained in:
committed by
Chris Morgan
parent
6808c187eb
commit
0f5bb1b0f9
@@ -836,17 +836,24 @@ class version {
|
|||||||
// main URL
|
// main URL
|
||||||
echo " <tr class=\"color1\"><td><b>URL</b></td><td>".$appLinkURL."</td></tr>\n";
|
echo " <tr class=\"color1\"><td><b>URL</b></td><td>".$appLinkURL."</td></tr>\n";
|
||||||
|
|
||||||
|
// Votes
|
||||||
|
if(!$this->iObsoleteBy)
|
||||||
|
{
|
||||||
$oM = new objectManager("voteManager", "Vote");
|
$oM = new objectManager("voteManager", "Vote");
|
||||||
$oM->setReturnTo($this->objectMakeUrl());
|
$oM->setReturnTo($this->objectMakeUrl());
|
||||||
// Votes
|
|
||||||
if($_SESSION['current']->isLoggedIn())
|
if($_SESSION['current']->isLoggedIn())
|
||||||
$shVoteLink = ' <a href="'.$oM->makeUrl("edit", $_SESSION['current']->iUserId).'&iVersionId='.$this->iVersionId.'">Vote</a>';
|
$shVoteLink = ' <a href="'.$oM->makeUrl("edit", $_SESSION['current']->iUserId).'&iVersionId='.$this->iVersionId.'">Vote</a>';
|
||||||
else
|
else
|
||||||
$shVoteLink = '';
|
$shVoteLink = '';
|
||||||
echo html_tr(array(
|
|
||||||
"<b>Votes</b>",
|
$shVoteText = vote_count_version_total($this->iVersionId).$shVoteLink;
|
||||||
vote_count_version_total($this->iVersionId).$shVoteLink),
|
} else
|
||||||
"color0");
|
{
|
||||||
|
$shVoteText = 'Marked as obsolete';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo html_tr(array('<b>Votes</b>', $shVoteText), 'color0');
|
||||||
|
|
||||||
$sRating = $this->sTestedRating;
|
$sRating = $this->sTestedRating;
|
||||||
$sRelease = $this->sTestedRelease;
|
$sRelease = $this->sTestedRelease;
|
||||||
|
|||||||
Reference in New Issue
Block a user