allow vote changes
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@495 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
1b6f516bbb
commit
73212d6e3f
2 changed files with 1 additions and 8 deletions
|
@ -443,7 +443,7 @@ class VoteTest extends TestBase
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify that changing the vote from postitive to positive
|
* Verify that changing the vote from negative to negative
|
||||||
* has no strange effects
|
* has no strange effects
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
@ -57,13 +57,6 @@ if (!isset($GLOBALS['lastUrl']) || $GLOBALS['lastUrl'] == '') {
|
||||||
$from = $GLOBALS['lastUrl'];
|
$from = $GLOBALS['lastUrl'];
|
||||||
|
|
||||||
|
|
||||||
if ($vs->hasVoted($bookmark, $user)) {
|
|
||||||
//already voted
|
|
||||||
header('HTTP/1.0 412 Precondition failed');
|
|
||||||
echo 'Bookmark has been already voted for';
|
|
||||||
exit(6);
|
|
||||||
}
|
|
||||||
|
|
||||||
$vs->vote($bookmark, $user, $type == 'for' ? 1 : -1);
|
$vs->vote($bookmark, $user, $type == 'for' ? 1 : -1);
|
||||||
|
|
||||||
if (isset($GLOBALS['ajaxRequest']) && $GLOBALS['ajaxRequest']) {
|
if (isset($GLOBALS['ajaxRequest']) && $GLOBALS['ajaxRequest']) {
|
||||||
|
|
Loading…
Reference in a new issue