Code Duplication    Length = 18-18 lines in 2 locations

get-posts-ajax.php 1 location

@@ 50-67 (lines=18) @@
47
}
48
	$posts;
49
50
	if(isset($_GET['commentView']))
51
	{
52
		$commentView = true;
53
		$url = "/posts/location/discussed/";
54
	}
55
	else
56
	{
57
		if(isset($_GET['upVoteView']))
58
		{
59
			$upVoteView = true;
60
			$url = "/posts/location/popular/";
61
		}
62
		else
63
		{
64
			$timeView = true;
65
			$url = "/v2/posts";
66
		}
67
	}
68
69
	if(isset($_GET['lastPostId'])) {
70
	

index.php 1 location

@@ 161-178 (lines=18) @@
158
							}
159
							//Get Posts
160
							else {
161
								if(isset($_GET['commentView']))
162
								{
163
									$commentView = true;
164
									$url = "/v2/posts/location/discussed/";
165
								}
166
								else
167
								{
168
									if(isset($_GET['upVoteView']))
169
									{
170
										$upVoteView = true;
171
										$url = "/v2/posts/location/popular/";
172
									}
173
									else
174
									{
175
										$timeView = true;
176
										$url = "/v2/posts";
177
									}
178
								}
179
180
								$posts = getPosts($lastPostId, $accessToken, $url)['posts'];
181
								$loops = 29;