Completed
Push — master ( 027077...76536b )
by mains
02:56
created
error-pages/404.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -11,42 +11,42 @@  discard block
 block discarded – undo
11 11
 		<meta name="keywords" content="jodelblue, jodel, blue, webclient, web, client">
12 12
 		
13 13
 		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous">
14
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>css/font-awesome.min.css">
15
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>style.css" type="text/css">
14
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>css/font-awesome.min.css">
15
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>style.css" type="text/css">
16 16
 		
17
-		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
18
-		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
19
-		<link rel="icon" type="image/gif" href="<?php echo $baseUrl;?>img/favicon/favicon.gif">
20
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon.png">
21
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon.png">
22
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
23
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
24
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
25
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
26
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
27
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
28
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
29
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
30
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
31
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
32
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-precomposed.png">
33
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-16x16.png" sizes="16x16">
34
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-32x32.png" sizes="32x32">
35
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-96x96.png" sizes="96x96">
36
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-160x160.png" sizes="160x160">
37
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-192x192.png" sizes="192x192">
38
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-196x196.png" sizes="196x196">
39
-		<meta name="msapplication-TileImage" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
17
+		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
18
+		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
19
+		<link rel="icon" type="image/gif" href="<?php echo $baseUrl; ?>img/favicon/favicon.gif">
20
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon.png">
21
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon.png">
22
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
23
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
24
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
25
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
26
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
27
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
28
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
29
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
30
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
31
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
32
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-precomposed.png">
33
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-16x16.png" sizes="16x16">
34
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-32x32.png" sizes="32x32">
35
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-96x96.png" sizes="96x96">
36
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-160x160.png" sizes="160x160">
37
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-192x192.png" sizes="192x192">
38
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-196x196.png" sizes="196x196">
39
+		<meta name="msapplication-TileImage" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
40 40
 		<meta name="msapplication-TileColor" content="#5682a3"> 
41 41
 		<meta name="msapplication-navbutton-color" content="#5682a3"> 
42 42
 		<meta name="application-name" content="JodelBlue"/> 
43 43
 		<meta name="msapplication-tooltip" content="JodelBlue"/> 
44 44
 		<meta name="apple-mobile-web-app-title" content="JodelBlue"/> 
45
-		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-70x70.png"> 
46
-		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
47
-		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-150x150.png"> 
48
-		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x150.png"> 
49
-		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x310.png"> 
45
+		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-70x70.png"> 
46
+		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
47
+		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-150x150.png"> 
48
+		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x150.png"> 
49
+		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x310.png"> 
50 50
 	</head>
51 51
 	
52 52
 	<body>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 					</content>
116 116
 				</article>
117 117
 			</div>
118
-			<?php include './template/nav-bottom.php';?>
118
+			<?php include './template/nav-bottom.php'; ?>
119 119
 		</div>
120 120
 		
121 121
 		
Please login to merge, or discard this patch.
error-pages/410.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -11,42 +11,42 @@  discard block
 block discarded – undo
11 11
 		<meta name="keywords" content="jodelblue, jodel, blue, webclient, web, client">
12 12
 		
13 13
 		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous">
14
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>css/font-awesome.min.css">
15
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>style.css" type="text/css">
14
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>css/font-awesome.min.css">
15
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>style.css" type="text/css">
16 16
 		
17
-		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
18
-		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
19
-		<link rel="icon" type="image/gif" href="<?php echo $baseUrl;?>img/favicon/favicon.gif">
20
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon.png">
21
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon.png">
22
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
23
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
24
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
25
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
26
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
27
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
28
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
29
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
30
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
31
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
32
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-precomposed.png">
33
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-16x16.png" sizes="16x16">
34
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-32x32.png" sizes="32x32">
35
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-96x96.png" sizes="96x96">
36
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-160x160.png" sizes="160x160">
37
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-192x192.png" sizes="192x192">
38
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-196x196.png" sizes="196x196">
39
-		<meta name="msapplication-TileImage" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
17
+		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
18
+		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
19
+		<link rel="icon" type="image/gif" href="<?php echo $baseUrl; ?>img/favicon/favicon.gif">
20
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon.png">
21
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon.png">
22
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
23
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
24
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
25
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
26
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
27
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
28
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
29
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
30
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
31
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
32
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-precomposed.png">
33
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-16x16.png" sizes="16x16">
34
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-32x32.png" sizes="32x32">
35
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-96x96.png" sizes="96x96">
36
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-160x160.png" sizes="160x160">
37
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-192x192.png" sizes="192x192">
38
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-196x196.png" sizes="196x196">
39
+		<meta name="msapplication-TileImage" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
40 40
 		<meta name="msapplication-TileColor" content="#5682a3"> 
41 41
 		<meta name="msapplication-navbutton-color" content="#5682a3"> 
42 42
 		<meta name="application-name" content="JodelBlue"/> 
43 43
 		<meta name="msapplication-tooltip" content="JodelBlue"/> 
44 44
 		<meta name="apple-mobile-web-app-title" content="JodelBlue"/> 
45
-		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-70x70.png"> 
46
-		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
47
-		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-150x150.png"> 
48
-		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x150.png"> 
49
-		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x310.png"> 
45
+		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-70x70.png"> 
46
+		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
47
+		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-150x150.png"> 
48
+		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x150.png"> 
49
+		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x310.png"> 
50 50
 	</head>
51 51
 	
52 52
 	<body>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 					</content>
116 116
 				</article>
117 117
 			</div>
118
-			<?php include './template/nav-bottom.php';?>
118
+			<?php include './template/nav-bottom.php'; ?>
119 119
 		</div>
120 120
 		
121 121
 		
Please login to merge, or discard this patch.
php/Requests/GetChannel.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -2,41 +2,41 @@
 block discarded – undo
2 2
 
3 3
 class GetChannel extends AbstractRequest
4 4
 {
5
-    /**
6
-     * @var Location
7
-     */
8
-    public $location;
9
-    public $channel;
10
-    public $hasPayload = FALSE;
11
-    public $lastPostId = '';
12
-    public $view = 'combo';
5
+	/**
6
+	 * @var Location
7
+	 */
8
+	public $location;
9
+	public $channel;
10
+	public $hasPayload = FALSE;
11
+	public $lastPostId = '';
12
+	public $view = 'combo';
13 13
 		
14
-    function getApiEndPoint()
15
-    {
16
-        if($this->lastPostId == '')
17
-        {
18
-            $apiEndPoint = '/v3/posts/hashtag/' . $this->view . '?hashtag=' . $this->channel;
19
-        }
20
-        else
21
-        {
22
-            if($this->view == 'combo')
23
-            {
24
-                $apiEndPoint = '/v3/posts/hashtag?hashtag=' . $this->channel . '&after=' . $this->lastPostId;
25
-            }
26
-            else
27
-            {
28
-                $apiEndPoint = '/v3/posts/hashtag/' . $this->view . '?hashtag=' . $this->channel . '&after=' . $this->lastPostId;
29
-            }
30
-        }
31
-        return $apiEndPoint;
32
-    }
33
-    function getPayload()
34
-    {
35
-        return array(
36
-        );
37
-    }
38
-    function getMethod()
39
-    {
40
-        return 'GET';
41
-    }
14
+	function getApiEndPoint()
15
+	{
16
+		if($this->lastPostId == '')
17
+		{
18
+			$apiEndPoint = '/v3/posts/hashtag/' . $this->view . '?hashtag=' . $this->channel;
19
+		}
20
+		else
21
+		{
22
+			if($this->view == 'combo')
23
+			{
24
+				$apiEndPoint = '/v3/posts/hashtag?hashtag=' . $this->channel . '&after=' . $this->lastPostId;
25
+			}
26
+			else
27
+			{
28
+				$apiEndPoint = '/v3/posts/hashtag/' . $this->view . '?hashtag=' . $this->channel . '&after=' . $this->lastPostId;
29
+			}
30
+		}
31
+		return $apiEndPoint;
32
+	}
33
+	function getPayload()
34
+	{
35
+		return array(
36
+		);
37
+	}
38
+	function getMethod()
39
+	{
40
+		return 'GET';
41
+	}
42 42
 }
Please login to merge, or discard this patch.
php/View.php 4 patches
Indentation   +188 added lines, -188 removed lines patch added patch discarded remove patch
@@ -2,105 +2,105 @@  discard block
 block discarded – undo
2 2
 
3 3
 class View
4 4
 {
5
-    public $country;
6
-    public $city;
7
-    public $hashtag;
5
+	public $country;
6
+	public $city;
7
+	public $hashtag;
8 8
 	public $view;
9
-    public $postId;
10
-    public $isDetailedView;
9
+	public $postId;
10
+	public $isDetailedView;
11 11
 
12 12
 	public $lastPostId = '';
13 13
 
14
-    function __construct($country, $city, $hashtag = '#all', $view = 'time', $postId = '')
15
-    {
16
-        $this->country = $country;
17
-        $this->city = $city;
18
-        $this->hashtag = $hashtag;
19
-        $this->view = $view;
20
-        $this->postId = $postId;
14
+	function __construct($country, $city, $hashtag = '#all', $view = 'time', $postId = '')
15
+	{
16
+		$this->country = $country;
17
+		$this->city = $city;
18
+		$this->hashtag = $hashtag;
19
+		$this->view = $view;
20
+		$this->postId = $postId;
21 21
 
22
-        if($postId == '')
23
-        {
24
-            $this->isDetailedView = FALSE;
25
-        }
26
-        else
27
-        {
28
-            $this->isDetailedView = TRUE;
29
-        }
30
-    }
22
+		if($postId == '')
23
+		{
24
+			$this->isDetailedView = FALSE;
25
+		}
26
+		else
27
+		{
28
+			$this->isDetailedView = TRUE;
29
+		}
30
+	}
31 31
 	/**
32 32
 	 * Compute HTML Code
33 33
 	 */
34 34
  	function jodelToHtml($post)
35
-    {   //ToDO
36
-        //Replace # with link
37
-        //preg_replace('~(\#)([^\s!,. /()"\'?]+)~', '<a href="tag/$2">#$2</a>', $text);
35
+	{   //ToDO
36
+		//Replace # with link
37
+		//preg_replace('~(\#)([^\s!,. /()"\'?]+)~', '<a href="tag/$2">#$2</a>', $text);
38 38
 
39
-        //Time to time difference
40
-        $now = new DateTime();
41
-        $d = new DateTime($post['created_at']);
42
-        $timediff = $now->diff($d);
39
+		//Time to time difference
40
+		$now = new DateTime();
41
+		$d = new DateTime($post['created_at']);
42
+		$timediff = $now->diff($d);
43 43
 
44
-        $timediff_inSeconds = (string)$timediff->format('%s');
45
-        $timediff_inMinutes = (string)$timediff->format('%i');
46
-        $timediff_inHours = (string)$timediff->format('%h');
47
-        $timediff_inDays = (string)$timediff->format('%d');
48
-        $timediff_inMonth = (string)$timediff->format('%m');
44
+		$timediff_inSeconds = (string)$timediff->format('%s');
45
+		$timediff_inMinutes = (string)$timediff->format('%i');
46
+		$timediff_inHours = (string)$timediff->format('%h');
47
+		$timediff_inDays = (string)$timediff->format('%d');
48
+		$timediff_inMonth = (string)$timediff->format('%m');
49 49
 
50
-        if($timediff_inMonth!=0)
51
-        {
52
-                $timediff = $timediff_inMonth . "m";
53
-        }
54
-        else
55
-        {
56
-            if($timediff_inDays!=0)
57
-            {
58
-                $timediff = $timediff_inDays . "d";
59
-            }
60
-            else
61
-            {
62
-                if($timediff_inHours!=0)
63
-                {
64
-                    $timediff = $timediff_inHours . "h";
65
-                }
66
-                else
67
-                {
68
-                    if($timediff_inMinutes!=0)
69
-                    {
70
-                        $timediff = $timediff_inMinutes . "m";
71
-                    }
72
-                    else
73
-                    {
74
-                        $timediff = $timediff_inSeconds . "s";
75
-                    }
76
-                }
77
-            }
78
-        }
50
+		if($timediff_inMonth!=0)
51
+		{
52
+				$timediff = $timediff_inMonth . "m";
53
+		}
54
+		else
55
+		{
56
+			if($timediff_inDays!=0)
57
+			{
58
+				$timediff = $timediff_inDays . "d";
59
+			}
60
+			else
61
+			{
62
+				if($timediff_inHours!=0)
63
+				{
64
+					$timediff = $timediff_inHours . "h";
65
+				}
66
+				else
67
+				{
68
+					if($timediff_inMinutes!=0)
69
+					{
70
+						$timediff = $timediff_inMinutes . "m";
71
+					}
72
+					else
73
+					{
74
+						$timediff = $timediff_inSeconds . "s";
75
+					}
76
+				}
77
+			}
78
+		}
79 79
 
80 80
 
81
-        ?>
81
+		?>
82 82
         <article id ="postId-<?php echo $post['post_id']; ?>" class="jodel" style="background-color: #<?php echo $post['color'];?>;">
83 83
             <content>
84 84
                 <?php 
85
-                if(isset($post['image_url']))
86
-                {
87
-                    $regexRest = '/[^\w$ .!?-]+/u';
85
+				if(isset($post['image_url']))
86
+				{
87
+					$regexRest = '/[^\w$ .!?-]+/u';
88 88
 
89
-                    echo '<img src="' . $post['image_url'] . '" alt="' . htmlspecialchars(preg_replace($regexRest, '', $post['message'])) . '">';
90
-                }
91
-                else {
92
-                    echo str_replace('  ', ' &nbsp;', nl2br(htmlspecialchars($post['message'])));
93
-                }
94
-                ?>
89
+					echo '<img src="' . $post['image_url'] . '" alt="' . htmlspecialchars(preg_replace($regexRest, '', $post['message'])) . '">';
90
+				}
91
+				else {
92
+					echo str_replace('  ', ' &nbsp;', nl2br(htmlspecialchars($post['message'])));
93
+				}
94
+				?>
95 95
             </content>
96 96
             <aside>
97 97
                 <?php
98
-                    if($this->isDetailedView)
99
-                    {?>
98
+					if($this->isDetailedView)
99
+					{?>
100 100
                         <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
101 101
               <?php }
102
-                    else
103
-                    {?>
102
+					else
103
+					{?>
104 104
                         <a href="index.php?vote=up&postId=<?php echo $post['post_id'];?>" rel="nofollow">
105 105
               <?php } ?>
106 106
                             <i class="fa fa-angle-up fa-3x"></i>
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
                             <br />
109 109
                         <?php echo $post["vote_count"];?><br />
110 110
                 <?php
111
-                    if($this->isDetailedView)
112
-                    {?>
111
+					if($this->isDetailedView)
112
+					{?>
113 113
                         <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
114 114
               <?php }
115
-                    else
116
-                    {?>
115
+					else
116
+					{?>
117 117
                         <a href="index.php?vote=down&postId=<?php echo $post['post_id'];?>" rel="nofollow">
118 118
               <?php } ?>
119 119
                             <i class="fa fa-angle-down fa-3x"></i>
@@ -136,39 +136,39 @@  discard block
 block discarded – undo
136 136
                                 <a href="index.php?getPostDetails=true&view=<?php echo $this->view;?>&postId=<?php echo $post["post_id"];?>">
137 137
                                     <i class="fa fa-commenting-o"></i>
138 138
                                     <?php if(array_key_exists("child_count", $post)) {
139
-                                                echo $post["child_count"];
140
-                                            } else echo "0";
141
-                                    ?>
139
+												echo $post["child_count"];
140
+											} else echo "0";
141
+									?>
142 142
                                     </a>
143 143
                             </span>
144 144
                             <?php } ?>
145 145
                         </td>
146 146
                         <td class="distance">
147 147
                             <?php
148
-                                if($this->isDetailedView)
149
-                                {
150
-                                    if(isset($post["parent_creator"]) && $post["parent_creator"] == 1)
151
-                                    {
152
-                                        ?>
148
+								if($this->isDetailedView)
149
+								{
150
+									if(isset($post["parent_creator"]) && $post["parent_creator"] == 1)
151
+									{
152
+										?>
153 153
                                         <span data-tooltip="Author">
154 154
                                             <i class="fa fa-user-o"></i> OJ |
155 155
                                         </span>
156 156
                                         <?php 
157
-                                    }
158
-                                    else
159
-                                    {
160
-                                        //Is not parent Jodel in detailed View
161
-                                        if(!array_key_exists('child_count', $post) && array_key_exists('parent_creator', $post))
162
-                                        {
163
-                                            ?>
157
+									}
158
+									else
159
+									{
160
+										//Is not parent Jodel in detailed View
161
+										if(!array_key_exists('child_count', $post) && array_key_exists('parent_creator', $post))
162
+										{
163
+											?>
164 164
                                             <span data-tooltip="Author">
165 165
                                                 <i class="fa fa-user-o"></i> #<?php echo $post["user_handle"];?> |
166 166
                                             </span>
167 167
                                             <?php
168
-                                        }
169
-                                    }
170
-                                }
171
-                                ?>
168
+										}
169
+									}
170
+								}
171
+								?>
172 172
 
173 173
                             <span class="tip" data-tooltip="Distance">
174 174
                                 <i class="fa fa-map-marker"></i>
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             </footer>
182 182
         </article>
183 183
     <?php
184
-    }
184
+	}
185 185
 
186 186
 
187 187
 	/**
@@ -254,96 +254,96 @@  discard block
 block discarded – undo
254 254
 
255 255
 	function getPosts($jodelAccount)
256 256
 	{
257
-        if($this->hashtag != '#all' && $this->hashtag != '' && $this->hashtag != NULL)
258
-        {
259
-            $accountCreator = new GetChannel();
260
-            $accountCreator->view = $this->view;
261
-            $accountCreator->setAccessToken($jodelAccount->accessToken);
262
-            $accountCreator->channel = $this->hashtag;
263
-            $accountCreator->lastPostId = $this->lastPostId;
264
-            $data = $accountCreator->execute();
265
-        }
266
-        else
267
-        {
268
-            if($this->lastPostId == '' && $this->view == 'combo')
269
-            {
270
-                $url = "/v3/posts/location/combo";
271
-            }
272
-            else
273
-            {
274
-                if($this->view == 'discussed')
275
-                {
276
-                    $url = "/v2/posts/location/discussed/";
277
-                }
278
-                else
279
-                {
280
-                    if($this->view == 'popular')
281
-                    {
282
-                        $url = "/v2/posts/location/popular/";
283
-                    }
284
-                    else
285
-                    {
286
-                        $url = "/v2/posts/location/";
287
-                    }
288
-                }
289
-            }
257
+		if($this->hashtag != '#all' && $this->hashtag != '' && $this->hashtag != NULL)
258
+		{
259
+			$accountCreator = new GetChannel();
260
+			$accountCreator->view = $this->view;
261
+			$accountCreator->setAccessToken($jodelAccount->accessToken);
262
+			$accountCreator->channel = $this->hashtag;
263
+			$accountCreator->lastPostId = $this->lastPostId;
264
+			$data = $accountCreator->execute();
265
+		}
266
+		else
267
+		{
268
+			if($this->lastPostId == '' && $this->view == 'combo')
269
+			{
270
+				$url = "/v3/posts/location/combo";
271
+			}
272
+			else
273
+			{
274
+				if($this->view == 'discussed')
275
+				{
276
+					$url = "/v2/posts/location/discussed/";
277
+				}
278
+				else
279
+				{
280
+					if($this->view == 'popular')
281
+					{
282
+						$url = "/v2/posts/location/popular/";
283
+					}
284
+					else
285
+					{
286
+						$url = "/v2/posts/location/";
287
+					}
288
+				}
289
+			}
290 290
 
291
-            $accountCreator = new GetPosts();
292
-            $accountCreator->setLastPostId($this->lastPostId);
293
-            $accountCreator->setAccessToken($jodelAccount->accessToken);
294
-            $accountCreator->setUrl($url);
295
-            $accountCreator->version = 'v3';
291
+			$accountCreator = new GetPosts();
292
+			$accountCreator->setLastPostId($this->lastPostId);
293
+			$accountCreator->setAccessToken($jodelAccount->accessToken);
294
+			$accountCreator->setUrl($url);
295
+			$accountCreator->version = 'v3';
296 296
 
297
-            $config = parse_ini_file('config/config.ini.php');
298
-            $location = new Location();
299
-            $location->setLat($config['default_lat']);
300
-            $location->setLng($config['default_lng']);
301
-            $location->setCityName($config['default_location']);
302
-            $accountCreator->location = $location;
303
-            $data = $accountCreator->execute();
304
-        }
305
-    	if(array_key_exists('recent', $data))
306
-        {
307
-            return $data['recent'];
308
-        }
309
-        else if(array_key_exists('posts', $data))
310
-        {
311
-            return $data['posts'];
312
-        }
313
-        else
314
-        {
315
-            error_log('Fehler View getPosts ');
316
-            error_log(print_r($data, true));
297
+			$config = parse_ini_file('config/config.ini.php');
298
+			$location = new Location();
299
+			$location->setLat($config['default_lat']);
300
+			$location->setLng($config['default_lng']);
301
+			$location->setCityName($config['default_location']);
302
+			$accountCreator->location = $location;
303
+			$data = $accountCreator->execute();
304
+		}
305
+		if(array_key_exists('recent', $data))
306
+		{
307
+			return $data['recent'];
308
+		}
309
+		else if(array_key_exists('posts', $data))
310
+		{
311
+			return $data['posts'];
312
+		}
313
+		else
314
+		{
315
+			error_log('Fehler View getPosts ');
316
+			error_log(print_r($data, true));
317 317
 
318
-            $notFound[0] = array(
319
-                "post_id" => "0",
320
-                "discovered_by" => 0,
321
-                "message" => "Not found",
322
-                "created_at" => "2017-02-11T16:44:50.385Z",
323
-                "updated_at" => "2017-02-11T16:44:50.385Z",
324
-                "pin_count" => 0,
325
-                "color" => "FFBA00",
326
-                "got_thanks" => FALSE,
327
-                "post_own" => "friend",
328
-                "discovered" => 0,
329
-                "distance" => 9,
330
-                "vote_count" => 0,
331
-                "location" =>
332
-                array("name" => "Berlin",
333
-                  "loc_coordinates" =>
334
-                  array(
335
-                    "lat" => 0,
336
-                    "lng" => 0
337
-                  ),
338
-                  "loc_accuracy" => 0,
339
-                  "country" => "",
340
-                  "city" => "",
341
-                ),
342
-                "tags" =>
343
-                array(),
344
-                "user_handle" => "0"
345
-            );
346
-            return $notFound;
347
-        }
318
+			$notFound[0] = array(
319
+				"post_id" => "0",
320
+				"discovered_by" => 0,
321
+				"message" => "Not found",
322
+				"created_at" => "2017-02-11T16:44:50.385Z",
323
+				"updated_at" => "2017-02-11T16:44:50.385Z",
324
+				"pin_count" => 0,
325
+				"color" => "FFBA00",
326
+				"got_thanks" => FALSE,
327
+				"post_own" => "friend",
328
+				"discovered" => 0,
329
+				"distance" => 9,
330
+				"vote_count" => 0,
331
+				"location" =>
332
+				array("name" => "Berlin",
333
+				  "loc_coordinates" =>
334
+				  array(
335
+					"lat" => 0,
336
+					"lng" => 0
337
+				  ),
338
+				  "loc_accuracy" => 0,
339
+				  "country" => "",
340
+				  "city" => "",
341
+				),
342
+				"tags" =>
343
+				array(),
344
+				"user_handle" => "0"
345
+			);
346
+			return $notFound;
347
+		}
348 348
 	}
349 349
 }
350 350
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -47,25 +47,25 @@  discard block
 block discarded – undo
47 47
         $timediff_inDays = (string)$timediff->format('%d');
48 48
         $timediff_inMonth = (string)$timediff->format('%m');
49 49
 
50
-        if($timediff_inMonth!=0)
50
+        if($timediff_inMonth != 0)
51 51
         {
52 52
                 $timediff = $timediff_inMonth . "m";
53 53
         }
54 54
         else
55 55
         {
56
-            if($timediff_inDays!=0)
56
+            if($timediff_inDays != 0)
57 57
             {
58 58
                 $timediff = $timediff_inDays . "d";
59 59
             }
60 60
             else
61 61
             {
62
-                if($timediff_inHours!=0)
62
+                if($timediff_inHours != 0)
63 63
                 {
64 64
                     $timediff = $timediff_inHours . "h";
65 65
                 }
66 66
                 else
67 67
                 {
68
-                    if($timediff_inMinutes!=0)
68
+                    if($timediff_inMinutes != 0)
69 69
                     {
70 70
                         $timediff = $timediff_inMinutes . "m";
71 71
                     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
 
81 81
         ?>
82
-        <article id ="postId-<?php echo $post['post_id']; ?>" class="jodel" style="background-color: #<?php echo $post['color'];?>;">
82
+        <article id ="postId-<?php echo $post['post_id']; ?>" class="jodel" style="background-color: #<?php echo $post['color']; ?>;">
83 83
             <content>
84 84
                 <?php 
85 85
                 if(isset($post['image_url']))
@@ -97,24 +97,24 @@  discard block
 block discarded – undo
97 97
                 <?php
98 98
                     if($this->isDetailedView)
99 99
                     {?>
100
-                        <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
100
+                        <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id']; ?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']); ?>" rel="nofollow">
101 101
               <?php }
102 102
                     else
103 103
                     {?>
104
-                        <a href="index.php?vote=up&postId=<?php echo $post['post_id'];?>" rel="nofollow">
104
+                        <a href="index.php?vote=up&postId=<?php echo $post['post_id']; ?>" rel="nofollow">
105 105
               <?php } ?>
106 106
                             <i class="fa fa-angle-up fa-3x"></i>
107 107
                         </a>    
108 108
                             <br />
109
-                        <?php echo $post["vote_count"];?><br />
109
+                        <?php echo $post["vote_count"]; ?><br />
110 110
                 <?php
111 111
                     if($this->isDetailedView)
112 112
                     {?>
113
-                        <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
113
+                        <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id']; ?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']); ?>" rel="nofollow">
114 114
               <?php }
115 115
                     else
116 116
                     {?>
117
-                        <a href="index.php?vote=down&postId=<?php echo $post['post_id'];?>" rel="nofollow">
117
+                        <a href="index.php?vote=down&postId=<?php echo $post['post_id']; ?>" rel="nofollow">
118 118
               <?php } ?>
119 119
                             <i class="fa fa-angle-down fa-3x"></i>
120 120
                         </a>
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
                         <td class="time">
127 127
                             <span class="tip" data-tooltip="Time">
128 128
                                 <i class="fa fa-clock-o"></i>
129
-                                <?php echo $timediff;?>
130
-                                <span class="tiptext"><?php echo $d->format('Y-m-d H:i:s');?></span>
129
+                                <?php echo $timediff; ?>
130
+                                <span class="tiptext"><?php echo $d->format('Y-m-d H:i:s'); ?></span>
131 131
                             </span> 
132 132
                         </td>
133 133
                         <td class="comments">
134 134
                             <?php if(!$this->isDetailedView) {?>
135 135
                             <span data-tooltip="Comments">
136
-                                <a href="index.php?getPostDetails=true&view=<?php echo $this->view;?>&postId=<?php echo $post["post_id"];?>">
136
+                                <a href="index.php?getPostDetails=true&view=<?php echo $this->view; ?>&postId=<?php echo $post["post_id"]; ?>">
137 137
                                     <i class="fa fa-commenting-o"></i>
138 138
                                     <?php if(array_key_exists("child_count", $post)) {
139 139
                                                 echo $post["child_count"];
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                                         {
163 163
                                             ?>
164 164
                                             <span data-tooltip="Author">
165
-                                                <i class="fa fa-user-o"></i> #<?php echo $post["user_handle"];?> |
165
+                                                <i class="fa fa-user-o"></i> #<?php echo $post["user_handle"]; ?> |
166 166
                                             </span>
167 167
                                             <?php
168 168
                                         }
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 
173 173
                             <span class="tip" data-tooltip="Distance">
174 174
                                 <i class="fa fa-map-marker"></i>
175
-                                <?php echo $post['distance'];?> km
176
-                                <span class="tiptext"><?php echo $post['location']['name'];?></span>
175
+                                <?php echo $post['distance']; ?> km
176
+                                <span class="tiptext"><?php echo $post['location']['name']; ?></span>
177 177
                             </span>
178 178
                         </td>
179 179
                     </tr>
Please login to merge, or discard this patch.
Braces   +24 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@  discard block
 block discarded – undo
32 32
 	 * Compute HTML Code
33 33
 	 */
34 34
  	function jodelToHtml($post)
35
-    {   //ToDO
35
+ 	{
36
+//ToDO
36 37
         //Replace # with link
37 38
         //preg_replace('~(\#)([^\s!,. /()"\'?]+)~', '<a href="tag/$2">#$2</a>', $text);
38 39
 
@@ -88,7 +89,8 @@  discard block
 block discarded – undo
88 89
 
89 90
                     echo '<img src="' . $post['image_url'] . '" alt="' . htmlspecialchars(preg_replace($regexRest, '', $post['message'])) . '">';
90 91
                 }
91
-                else {
92
+                else
93
+                {
92 94
                     echo str_replace('  ', ' &nbsp;', nl2br(htmlspecialchars($post['message'])));
93 95
                 }
94 96
                 ?>
@@ -96,11 +98,13 @@  discard block
 block discarded – undo
96 98
             <aside>
97 99
                 <?php
98 100
                     if($this->isDetailedView)
99
-                    {?>
101
+                    {
102
+?>
100 103
                         <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
101 104
               <?php }
102
-                    else
103
-                    {?>
105
+else
106
+                    {
107
+?>
104 108
                         <a href="index.php?vote=up&postId=<?php echo $post['post_id'];?>" rel="nofollow">
105 109
               <?php } ?>
106 110
                             <i class="fa fa-angle-up fa-3x"></i>
@@ -109,11 +113,13 @@  discard block
 block discarded – undo
109 113
                         <?php echo $post["vote_count"];?><br />
110 114
                 <?php
111 115
                     if($this->isDetailedView)
112
-                    {?>
116
+                    {
117
+?>
113 118
                         <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
114 119
               <?php }
115
-                    else
116
-                    {?>
120
+else
121
+                    {
122
+?>
117 123
                         <a href="index.php?vote=down&postId=<?php echo $post['post_id'];?>" rel="nofollow">
118 124
               <?php } ?>
119 125
                             <i class="fa fa-angle-down fa-3x"></i>
@@ -131,13 +137,19 @@  discard block
 block discarded – undo
131 137
                             </span> 
132 138
                         </td>
133 139
                         <td class="comments">
134
-                            <?php if(!$this->isDetailedView) {?>
140
+                            <?php if(!$this->isDetailedView)
141
+{
142
+?>
135 143
                             <span data-tooltip="Comments">
136 144
                                 <a href="index.php?getPostDetails=true&view=<?php echo $this->view;?>&postId=<?php echo $post["post_id"];?>">
137 145
                                     <i class="fa fa-commenting-o"></i>
138
-                                    <?php if(array_key_exists("child_count", $post)) {
146
+                                    <?php if(array_key_exists("child_count", $post))
147
+{
139 148
                                                 echo $post["child_count"];
140
-                                            } else echo "0";
149
+                                            }
150
+                                            else {
151
+                                            	echo "0";
152
+                                            }
141 153
                                     ?>
142 154
                                     </a>
143 155
                             </span>
@@ -303,7 +315,7 @@  discard block
 block discarded – undo
303 315
             $data = $accountCreator->execute();
304 316
         }
305 317
     	if(array_key_exists('recent', $data))
306
-        {
318
+    	{
307 319
             return $data['recent'];
308 320
         }
309 321
         else if(array_key_exists('posts', $data))
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -313,7 +313,7 @@
 block discarded – undo
313 313
         else
314 314
         {
315 315
             error_log('Fehler View getPosts ');
316
-            error_log(print_r($data, true));
316
+            error_log(print_r($data, TRUE));
317 317
 
318 318
             $notFound[0] = array(
319 319
                 "post_id" => "0",
Please login to merge, or discard this patch.
php/jodel-web.php 3 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -41,36 +41,36 @@  discard block
 block discarded – undo
41 41
 
42 42
 function isUserBot()
43 43
 {
44
-    preg_match('/bot|spider|google|twitter/i', $_SERVER['HTTP_USER_AGENT'], $matches);
44
+	preg_match('/bot|spider|google|twitter/i', $_SERVER['HTTP_USER_AGENT'], $matches);
45 45
 
46
-    return (isset($matches[0])) ? true : false;
46
+	return (isset($matches[0])) ? true : false;
47 47
 }
48 48
 
49 49
 function configPropertyExists($config, $property)
50 50
 {
51
-    if(!array_key_exists($property, $config) || !isset($config[$property]) || $config[$property] == '' || $config[$property] == 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
52
-    {
53
-        return FALSE;
54
-    }
55
-    else
56
-    {
57
-        return TRUE;
58
-    }
51
+	if(!array_key_exists($property, $config) || !isset($config[$property]) || $config[$property] == '' || $config[$property] == 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
52
+	{
53
+		return FALSE;
54
+	}
55
+	else
56
+	{
57
+		return TRUE;
58
+	}
59 59
 }
60 60
 
61 61
 function isDeviceUidInDatabase($deviceUid)
62 62
 {
63
-    $db = new DatabaseConnect();  
64
-    $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $deviceUid  . "'");
65
-
66
-    if ($result->num_rows > 0)
67
-    {
68
-        return TRUE;
69
-    }
70
-    else
71
-    {
72
-        return FALSE;
73
-    }
63
+	$db = new DatabaseConnect();  
64
+	$result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $deviceUid  . "'");
65
+
66
+	if ($result->num_rows > 0)
67
+	{
68
+		return TRUE;
69
+	}
70
+	else
71
+	{
72
+		return FALSE;
73
+	}
74 74
 }
75 75
 
76 76
 	//Check if it's a Spider or Google Bot
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 	
99 99
 	if(configPropertyExists($config, 'karmaDeviceUid'))
100
-    {
101
-    	$jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']);
102
-    }
103
-    else
104
-    {
105
-    	error_log("No Karma deviceUid set in config file");
100
+	{
101
+		$jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']);
102
+	}
103
+	else
104
+	{
105
+		error_log("No Karma deviceUid set in config file");
106 106
 		$jodelAccountForKarma = new JodelAccount($deviceUid);
107
-    }
107
+	}
108 108
 
109 109
 	/*
110 110
 	 * Cunstruct View
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
 	{
213 213
 		$jodelAccountForKarma->votePostId($_GET['postId'], $_GET['vote']);
214 214
 		if(isset($_GET['getPostDetails']) && isset($_GET['getPostDetails']))
215
-        {
216
-            header('Location: index.php?getPostDetails=true&postId=' . htmlspecialchars($_GET['postId_parent']) . '#postId-' . htmlspecialchars($_GET['postId']));
217
-        }
218
-        else
219
-        {
220
-            header("Location: index.php#postId-" . htmlspecialchars($_GET['postId']));
221
-        }   
222
-        die();
215
+		{
216
+			header('Location: index.php?getPostDetails=true&postId=' . htmlspecialchars($_GET['postId_parent']) . '#postId-' . htmlspecialchars($_GET['postId']));
217
+		}
218
+		else
219
+		{
220
+			header("Location: index.php#postId-" . htmlspecialchars($_GET['postId']));
221
+		}   
222
+		die();
223 223
 	}
224 224
 	
225 225
 	//SendJodel
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 {
44 44
     preg_match('/bot|spider|google|twitter/i', $_SERVER['HTTP_USER_AGENT'], $matches);
45 45
 
46
-    return (isset($matches[0])) ? true : false;
46
+    return (isset($matches[0]))?true : false;
47 47
 }
48 48
 
49 49
 function configPropertyExists($config, $property)
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 function isDeviceUidInDatabase($deviceUid)
62 62
 {
63 63
     $db = new DatabaseConnect();  
64
-    $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $deviceUid  . "'");
64
+    $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $deviceUid . "'");
65 65
 
66
-    if ($result->num_rows > 0)
66
+    if($result->num_rows > 0)
67 67
     {
68 68
         return TRUE;
69 69
     }
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 		if(!isset($_COOKIE['JodelDeviceId']) || !isDeviceUidInDatabase($_COOKIE['JodelDeviceId']))
86 86
 		{
87 87
 			$jodelAccountForView = new JodelAccount();
88
-			setcookie('JodelDeviceId', $jodelAccountForView->deviceUid, time()+60*60*24*365*10);
89
-			error_log('Created account with JodelDeviceId:' . $jodelAccountForView->deviceUid .  ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']');
88
+			setcookie('JodelDeviceId', $jodelAccountForView->deviceUid, time() + 60 * 60 * 24 * 365 * 10);
89
+			error_log('Created account with JodelDeviceId:' . $jodelAccountForView->deviceUid . ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']');
90 90
 			
91 91
 		}
92 92
 		else
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	
166 166
 	if(isset($_GET['view']))
167 167
 	{
168
-		switch ($_GET['view']) {
168
+		switch($_GET['view']) {
169 169
 			case 'discussed':
170 170
 				$view = 'discussed';
171 171
 				break;
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 	
99 99
 	if(configPropertyExists($config, 'karmaDeviceUid'))
100
-    {
100
+	{
101 101
     	$jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']);
102 102
     }
103 103
     else
@@ -165,7 +165,8 @@  discard block
 block discarded – undo
165 165
 	
166 166
 	if(isset($_GET['view']))
167 167
 	{
168
-		switch ($_GET['view']) {
168
+		switch ($_GET['view'])
169
+		{
169 170
 			case 'discussed':
170 171
 				$view = 'discussed';
171 172
 				break;
@@ -212,7 +213,7 @@  discard block
 block discarded – undo
212 213
 	{
213 214
 		$jodelAccountForKarma->votePostId($_GET['postId'], $_GET['vote']);
214 215
 		if(isset($_GET['getPostDetails']) && isset($_GET['getPostDetails']))
215
-        {
216
+		{
216 217
             header('Location: index.php?getPostDetails=true&postId=' . htmlspecialchars($_GET['postId_parent']) . '#postId-' . htmlspecialchars($_GET['postId']));
217 218
         }
218 219
         else
Please login to merge, or discard this patch.
template/nav-bottom.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@
 block discarded – undo
2 2
 	<div class="col-xs-12">
3 3
 		<div class="row">
4 4
 			<div class="col-xs-3">
5
-				<a href="<?php echo $baseUrl;?>index.php" <?php if($view->view=='combo') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a>
5
+				<a href="<?php echo $baseUrl; ?>index.php" <?php if($view->view == 'combo') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a>
6 6
 			</div>
7 7
 			<div class="col-xs-3">
8
-				<a href="<?php echo $baseUrl;?>index.php?view=discussed" <?php if($view->view=='discussed') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a>
8
+				<a href="<?php echo $baseUrl; ?>index.php?view=discussed" <?php if($view->view == 'discussed') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a>
9 9
 			</div>
10 10
 			<div class="col-xs-3">
11
-				<a href="<?php echo $baseUrl;?>index.php?view=popular" <?php if($view->view=='popular') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a>
11
+				<a href="<?php echo $baseUrl; ?>index.php?view=popular" <?php if($view->view == 'popular') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a>
12 12
 			</div>
13 13
 			<div class="col-xs-3">
14 14
 				<nav>
15
-					<a href="<?php echo $baseUrl;?>about-us.php">about us</a>
15
+					<a href="<?php echo $baseUrl; ?>about-us.php">about us</a>
16 16
 				</nav>
17 17
 			</div>
18 18
 		</div>
Please login to merge, or discard this patch.
Braces   +15 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,13 +2,25 @@
 block discarded – undo
2 2
 	<div class="col-xs-12">
3 3
 		<div class="row">
4 4
 			<div class="col-xs-3">
5
-				<a href="<?php echo $baseUrl;?>index.php" <?php if($view->view=='combo') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a>
5
+				<a href="<?php echo $baseUrl;?>index.php" <?php if($view->view=='combo')
6
+{
7
+	echo 'class="active"';
8
+}
9
+?>><i class="fa fa-clock-o fa-3x"></i></a>
6 10
 			</div>
7 11
 			<div class="col-xs-3">
8
-				<a href="<?php echo $baseUrl;?>index.php?view=discussed" <?php if($view->view=='discussed') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a>
12
+				<a href="<?php echo $baseUrl;?>index.php?view=discussed" <?php if($view->view=='discussed')
13
+{
14
+	echo 'class="active"';
15
+}
16
+?>><i class="fa fa-commenting-o fa-3x"></i></a>
9 17
 			</div>
10 18
 			<div class="col-xs-3">
11
-				<a href="<?php echo $baseUrl;?>index.php?view=popular" <?php if($view->view=='popular') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a>
19
+				<a href="<?php echo $baseUrl;?>index.php?view=popular" <?php if($view->view=='popular')
20
+{
21
+	echo 'class="active"';
22
+}
23
+?>><i class="fa fa-angle-up fa-3x"></i></a>
12 24
 			</div>
13 25
 			<div class="col-xs-3">
14 26
 				<nav>
Please login to merge, or discard this patch.
index.php 2 patches
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -51,52 +51,52 @@  discard block
 block discarded – undo
51 51
 <!DOCTYPE html>
52 52
 <html lang="en">
53 53
 	<head>
54
-		<title><?php echo $view->getTitle($posts[0]);?></title>
54
+		<title><?php echo $view->getTitle($posts[0]); ?></title>
55 55
 		
56 56
 		<meta charset="utf-8">
57 57
 		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
58 58
 		<meta http-equiv="x-ua-compatible" content="ie=edge">
59 59
 		
60
-		<meta name="description" content="<?php echo $view->getMetaDescription($posts[0]);?>">
60
+		<meta name="description" content="<?php echo $view->getMetaDescription($posts[0]); ?>">
61 61
 		<meta name="keywords" content="jodelblue, jodel, blue, webclient, web, client, web-app, browser, app">
62 62
 		
63 63
 		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous">
64
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>css/font-awesome.min.css">
65
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>style.css" type="text/css">
64
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>css/font-awesome.min.css">
65
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>style.css" type="text/css">
66 66
 		
67
-		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
68
-		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
69
-		<link rel="icon" type="image/gif" href="<?php echo $baseUrl;?>img/favicon/favicon.gif">
70
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon.png">
71
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon.png">
72
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
73
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
74
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
75
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
76
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
77
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
78
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
79
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
80
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
81
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
82
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-precomposed.png">
83
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-16x16.png" sizes="16x16">
84
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-32x32.png" sizes="32x32">
85
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-96x96.png" sizes="96x96">
86
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-160x160.png" sizes="160x160">
87
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-192x192.png" sizes="192x192">
88
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-196x196.png" sizes="196x196">
89
-		<meta name="msapplication-TileImage" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
67
+		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
68
+		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
69
+		<link rel="icon" type="image/gif" href="<?php echo $baseUrl; ?>img/favicon/favicon.gif">
70
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon.png">
71
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon.png">
72
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
73
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
74
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
75
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
76
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
77
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
78
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
79
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
80
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
81
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
82
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-precomposed.png">
83
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-16x16.png" sizes="16x16">
84
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-32x32.png" sizes="32x32">
85
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-96x96.png" sizes="96x96">
86
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-160x160.png" sizes="160x160">
87
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-192x192.png" sizes="192x192">
88
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-196x196.png" sizes="196x196">
89
+		<meta name="msapplication-TileImage" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
90 90
 		<meta name="msapplication-TileColor" content="#5682a3"> 
91 91
 		<meta name="msapplication-navbutton-color" content="#5682a3"> 
92 92
 		<meta name="application-name" content="JodelBlue"/> 
93 93
 		<meta name="msapplication-tooltip" content="JodelBlue"/> 
94 94
 		<meta name="apple-mobile-web-app-title" content="JodelBlue"/> 
95
-		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-70x70.png"> 
96
-		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
97
-		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-150x150.png"> 
98
-		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x150.png"> 
99
-		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x310.png"> 
95
+		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-70x70.png"> 
96
+		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
97
+		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-150x150.png"> 
98
+		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x150.png"> 
99
+		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x310.png"> 
100 100
 	</head>
101 101
 	
102 102
 	<body>
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?>
179 179
 								<h2>Comment on Jodel</h2>
180 180
 								<form method="POST">				
181
-										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" />
181
+										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']); ?>" />
182 182
 										<textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> 
183 183
 									<br />
184 184
 									<input type="submit" value="SEND" /> 
@@ -211,14 +211,14 @@  discard block
 block discarded – undo
211 211
 					</div>
212 212
 				</aside>
213 213
 			</div>
214
-			<?php include './template/nav-bottom.php';?>
214
+			<?php include './template/nav-bottom.php'; ?>
215 215
 		
216 216
 		
217 217
 		<!-- jQuery, Tether, Bootstrap JS and own-->
218 218
 		<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7" crossorigin="anonymous"></script>
219 219
     	<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js" integrity="sha384-XTs3FgkjiBgo8qjEjBk0tGmf3wPrWtA6coPfQDfFEY8AnYJwjalXCiosYRBIBZX8" crossorigin="anonymous"></script>
220 220
     	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js" integrity="sha384-BLiI7JTZm+JWlgKa0M0kGRpJbF2J8q+qreVrKBC47e3K6BW78kGLrCkeRX6I9RoK" crossorigin="anonymous"></script>
221
-    	<script src="<?php echo $baseUrl;?>js/jQueryEmoji.js"></script>
221
+    	<script src="<?php echo $baseUrl; ?>js/jQueryEmoji.js"></script>
222 222
 
223 223
 		<script>
224 224
 			//BackButton
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 							if(!$("article[id='"+ hash +"']").length)
267 267
 							{
268 268
 								$.ajax({
269
-									url: '<?php echo $baseUrl;?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURI(hashtag),
269
+									url: '<?php echo $baseUrl; ?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURI(hashtag),
270 270
 									dataType: 'html',
271 271
 									async: false,
272 272
 									success: function(html) {
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 						$('#loading').show();
310 310
 
311 311
 						$.ajax({
312
-							url: '<?php echo $baseUrl;?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURI(hashtag),
312
+							url: '<?php echo $baseUrl; ?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURI(hashtag),
313 313
 							dataType: 'html',
314 314
 							async: false,
315 315
 							success: function(html) {
Please login to merge, or discard this patch.
Braces   +25 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
 		$posts[0] = $data;
22 22
 
23
-		if(array_key_exists('children', $data)) {
23
+		if(array_key_exists('children', $data))
24
+		{
24 25
 			foreach($data['children'] as $key => $child)
25 26
 			{
26 27
 				
@@ -124,7 +125,11 @@  discard block
 block discarded – undo
124 125
 
125 126
 					<div id="location_mobile" class="hidden-sm-up">
126 127
 						<form method="get">
127
-							<input type="text" id="city_mobile" name="search" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required>
128
+							<input type="text" id="city_mobile" name="search" placeholder="<?php if(isset($newPositionStatus))
129
+{
130
+	echo $newPositionStatus;
131
+}
132
+?>" required>
128 133
 
129 134
 							<input type="submit" id="submit_mobile" class="fa" value="&#xf0ac;" />
130 135
 						</form>
@@ -146,7 +151,9 @@  discard block
 block discarded – undo
146 151
 							} ?>
147 152
 					</content>
148 153
 					
149
-					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
154
+					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails']))
155
+{
156
+?>
150 157
 						<p id="loading">
151 158
 							Loading…
152 159
 						</p>
@@ -159,7 +166,11 @@  discard block
 block discarded – undo
159 166
 							<div>
160 167
 								<h2>Position / Hashtag</h2>
161 168
 								<form method="get">
162
-									<input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required>
169
+									<input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus))
170
+{
171
+	echo $newPositionStatus;
172
+}
173
+?>" required>
163 174
 									<label>try: #jhj</label><br>
164 175
 									<input type="submit" value="Set Location" /> 
165 176
 								</form>
@@ -175,7 +186,9 @@  discard block
 block discarded – undo
175 186
 
176 187
 						<article>
177 188
 							<div>
178
-								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?>
189
+								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails']))
190
+{
191
+?>
179 192
 								<h2>Comment on Jodel</h2>
180 193
 								<form method="POST">				
181 194
 										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" />
@@ -183,7 +196,10 @@  discard block
 block discarded – undo
183 196
 									<br />
184 197
 									<input type="submit" value="SEND" /> 
185 198
 								</form>
186
-									<?php } else { ?>
199
+									<?php }
200
+else
201
+{
202
+?>
187 203
 								<h2>New Jodel</h2>
188 204
 								<form method="POST">
189 205
 									<textarea id="message" name="message" placeholder="Send a Jodel to all students within 10km" required></textarea> 
@@ -242,7 +258,9 @@  discard block
 block discarded – undo
242 258
 				    $('html,body').animate({scrollTop: aTag.offset().top-90},'slow');
243 259
 				}
244 260
 
245
-				<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
261
+				<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails']))
262
+{
263
+?>
246 264
 
247 265
 				
248 266
 
Please login to merge, or discard this patch.