Alexander Nicolaysen Sørnes : version: Only show vote link when logged in
Chris Morgan
cmorgan at winehq.org
Thu Dec 6 18:26:15 CST 2007
Module: appdb
Branch: master
Commit: 93c01ad56b2322fc6e059348b7eea01f5eef3785
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=93c01ad56b2322fc6e059348b7eea01f5eef3785
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Thu Dec 6 09:43:34 2007 +0100
version: Only show vote link when logged in
---
include/version.php | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/version.php b/include/version.php
index 1caeaa4..37f3d79 100644
--- a/include/version.php
+++ b/include/version.php
@@ -822,9 +822,13 @@ class version {
$oM = new objectManager("voteManager", "Vote");
$oM->setReturnTo($this->objectMakeUrl());
// 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(
"<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");
if($this->sTestedRating != "/" && $this->sTestedRating)
More information about the wine-cvs
mailing list