@@ 43-48 (lines=6) @@ | ||
40 | $accessToken = isTokenFreshByAccessToken($location, $accessToken); |
|
41 | ||
42 | ||
43 | if($_POST['vote'] == "up") { |
|
44 | $accountCreator = new Upvote(); |
|
45 | } |
|
46 | else if($_POST['vote'] == "down") { |
|
47 | $accountCreator = new Downvote(); |
|
48 | } |
|
49 | ||
50 | $accountCreator->setAccessToken($accessToken); |
|
51 | $accountCreator->postId = $_POST['postId']; |
@@ 50-55 (lines=6) @@ | ||
47 | $accessToken = isTokenFreshByAccessToken($location, $accessToken); |
|
48 | ||
49 | ||
50 | if($_POST['vote'] == "up") { |
|
51 | $accountCreator = new Upvote(); |
|
52 | } |
|
53 | else if($_POST['vote'] == "down") { |
|
54 | $accountCreator = new Downvote(); |
|
55 | } |
|
56 | ||
57 | $accountCreator->setAccessToken($accessToken); |
|
58 | $accountCreator->postId = $_POST['postId']; |
@@ 157-162 (lines=6) @@ | ||
154 | ||
155 | if(!$this->deviceUidHasVotedThisPostId($_GET['postID'])) |
|
156 | { |
|
157 | if($_GET['vote'] == "up") |
|
158 | { |
|
159 | $accountCreator = new Upvote(); |
|
160 | } |
|
161 | else if($_GET['vote'] == "down") |
|
162 | { |
|
163 | $accountCreator = new Downvote(); |
|
164 | } |
|
165 | $accountCreator->setAccessToken($this->accessToken); |