| @@ 33-38 (lines=6) @@ | ||
| 30 | var_dump($accessToken); |
|
| 31 | isTokenFreshByAccessToken($location, $accessToken); |
|
| 32 | ||
| 33 | if($_POST['vote'] == "up") { |
|
| 34 | $accountCreator = new Upvote(); |
|
| 35 | } |
|
| 36 | else if($_POST['vote'] == "down") { |
|
| 37 | $accountCreator = new Downvote(); |
|
| 38 | } |
|
| 39 | ||
| 40 | $accountCreator->setAccessToken($accessToken); |
|
| 41 | $accountCreator->postId = $_POST['postId']; |
|
| @@ 114-119 (lines=6) @@ | ||
| 111 | ||
| 112 | //Vote |
|
| 113 | if(isset($_GET['vote']) && isset($_GET['postID'])) { |
|
| 114 | if($_GET['vote'] == "up") { |
|
| 115 | $accountCreator = new Upvote(); |
|
| 116 | } |
|
| 117 | else if($_GET['vote'] == "down") { |
|
| 118 | $accountCreator = new Downvote(); |
|
| 119 | } |
|
| 120 | $accountCreator->setAccessToken($accessToken); |
|
| 121 | $accountCreator->postId = $_GET['postID']; |
|
| 122 | $data = $accountCreator->execute(); |
|