Completed
Push — master ( 83518f...4b3242 )
by mains
02:59
created
php/Requests/GetUserConfig.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
 class GetUserConfig extends AbstractRequest
3 3
 {
4 4
 		
5
-    function getApiEndPoint()
6
-    {
7
-        return '/v3/user/config/';
8
-    }
9
-    function getPayload()
10
-    {
11
-        return array(
12
-        );
13
-    }
14
-    function getMethod()
15
-    {
16
-        return 'GET';
17
-    }
5
+	function getApiEndPoint()
6
+	{
7
+		return '/v3/user/config/';
8
+	}
9
+	function getPayload()
10
+	{
11
+		return array(
12
+		);
13
+	}
14
+	function getMethod()
15
+	{
16
+		return 'GET';
17
+	}
18 18
 }
19 19
 
Please login to merge, or discard this patch.
php/Requests/UpdateLocation.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -3,37 +3,37 @@
 block discarded – undo
3 3
 
4 4
 class UpdateLocation extends AbstractRequest {
5 5
 		 /**
6
-     * @var Location
7
-     */
8
-    public $location;
9
-    /**
10
-     * @return Location
11
-     */
12
-    public function getLocation()
13
-    {
14
-        return $this->location;
15
-    }
16
-    /**
17
-     * @param Location $location
18
-     */
19
-    public function setLocation($location)
20
-    {
21
-        $this->location = $location;
22
-    }
6
+		  * @var Location
7
+		  */
8
+	public $location;
9
+	/**
10
+	 * @return Location
11
+	 */
12
+	public function getLocation()
13
+	{
14
+		return $this->location;
15
+	}
16
+	/**
17
+	 * @param Location $location
18
+	 */
19
+	public function setLocation($location)
20
+	{
21
+		$this->location = $location;
22
+	}
23 23
 		
24
-    function getApiEndPoint()
25
-    {
26
-        return '/v2/users/location';
27
-    }
28
-    function getPayload()
29
-    {
30
-        return array(
24
+	function getApiEndPoint()
25
+	{
26
+		return '/v2/users/location';
27
+	}
28
+	function getPayload()
29
+	{
30
+		return array(
31 31
 			'location' => $this->getLocation()->toArray(),
32
-        );
33
-    }
34
-    function getMethod()
35
-    {
36
-        return 'PUT';
37
-    }
32
+		);
33
+	}
34
+	function getMethod()
35
+	{
36
+		return 'PUT';
37
+	}
38 38
 }
39 39
 
Please login to merge, or discard this patch.
php/Requests/GetCaptcha.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 class GetCaptcha extends AbstractRequest
3 3
 {		
4
-    function getApiEndPoint()
5
-    {
6
-        return '/v3/user/verification/imageCaptcha/';
7
-    }
8
-    function getPayload()
9
-    {
10
-        return array(
11
-        );
12
-    }
13
-    function getMethod()
14
-    {
15
-        return 'GET';
16
-    }
4
+	function getApiEndPoint()
5
+	{
6
+		return '/v3/user/verification/imageCaptcha/';
7
+	}
8
+	function getPayload()
9
+	{
10
+		return array(
11
+		);
12
+	}
13
+	function getMethod()
14
+	{
15
+		return 'GET';
16
+	}
17 17
 }
18 18
 
Please login to merge, or discard this patch.
php/Jodel.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 class Jodel
4 4
 {
5
-    public $jodel;
5
+	public $jodel;
6 6
 
7 7
    
8 8
 }
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
php/Requests/GetPostDetails.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 
4 4
 class GetPostDetails extends AbstractRequest {
5 5
 		
6
-    function getApiEndPoint()
7
-    {
8
-        return '/v2/posts/' . $_GET['postId'];
9
-    }
10
-    function getPayload()
11
-    {
12
-        return array(
13
-        );
14
-    }
15
-    function getMethod()
16
-    {
17
-        return 'GET';
18
-    }
6
+	function getApiEndPoint()
7
+	{
8
+		return '/v2/posts/' . $_GET['postId'];
9
+	}
10
+	function getPayload()
11
+	{
12
+		return array(
13
+		);
14
+	}
15
+	function getMethod()
16
+	{
17
+		return 'GET';
18
+	}
19 19
 }
20 20
 
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.
templates/footer.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 		<?php  
130 130
 			if(is_file(realpath(__DIR__ . '/..') . '/piwik-script.html'))
131 131
 			{
132
-			    include(realpath(__DIR__ . '/..') . '/piwik-script.html');
132
+				include(realpath(__DIR__ . '/..') . '/piwik-script.html');
133 133
 			}
134 134
 		?>
135 135
 
Please login to merge, or discard this patch.
php/jodel-web.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -39,27 +39,27 @@  discard block
 block discarded – undo
39 39
 
40 40
 function user_log($msg)
41 41
 {
42
-    $log  = $msg . PHP_EOL;
43
-    file_put_contents(realpath(__DIR__ . '/..') . '/logs/user_log-' . date("j.n.Y") . '.txt', $log, FILE_APPEND);
42
+	$log  = $msg . PHP_EOL;
43
+	file_put_contents(realpath(__DIR__ . '/..') . '/logs/user_log-' . date("j.n.Y") . '.txt', $log, FILE_APPEND);
44 44
 }
45 45
 
46 46
 function isUserBot()
47 47
 {
48
-    preg_match('/bot|spider|google|twitter/i', $_SERVER['HTTP_USER_AGENT'], $matches);
48
+	preg_match('/bot|spider|google|twitter/i', $_SERVER['HTTP_USER_AGENT'], $matches);
49 49
 
50
-    return (isset($matches[0])) ? true : false;
50
+	return (isset($matches[0])) ? true : false;
51 51
 }
52 52
 
53 53
 function configPropertyExists($config, $property)
54 54
 {
55
-    if(!array_key_exists($property, $config) || !isset($config[$property]) || $config[$property] == '' || $config[$property] == 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
56
-    {
57
-        return FALSE;
58
-    }
59
-    else
60
-    {
61
-        return TRUE;
62
-    }
55
+	if(!array_key_exists($property, $config) || !isset($config[$property]) || $config[$property] == '' || $config[$property] == 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
56
+	{
57
+		return FALSE;
58
+	}
59
+	else
60
+	{
61
+		return TRUE;
62
+	}
63 63
 }
64 64
 function isUserAdmin() {
65 65
 	global $config;
@@ -75,17 +75,17 @@  discard block
 block discarded – undo
75 75
 
76 76
 function isDeviceUidInDatabase($deviceUid)
77 77
 {
78
-    $db = new DatabaseConnect();  
79
-    $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $deviceUid  . "'");
80
-
81
-    if ($result->num_rows > 0)
82
-    {
83
-        return TRUE;
84
-    }
85
-    else
86
-    {
87
-        return FALSE;
88
-    }
78
+	$db = new DatabaseConnect();  
79
+	$result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $deviceUid  . "'");
80
+
81
+	if ($result->num_rows > 0)
82
+	{
83
+		return TRUE;
84
+	}
85
+	else
86
+	{
87
+		return FALSE;
88
+	}
89 89
 }
90 90
 
91 91
 	//Check if it's a Spider or Google Bot
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 	}
113 113
 	
114 114
 	if(configPropertyExists($config, 'karmaDeviceUid'))
115
-    {
116
-    	$jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']);
117
-    }
118
-    else
119
-    {
120
-    	error_log("No Karma deviceUid set in config file");
115
+	{
116
+		$jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']);
117
+	}
118
+	else
119
+	{
120
+		error_log("No Karma deviceUid set in config file");
121 121
 		$jodelAccountForKarma = new JodelAccount($deviceUid);
122
-    }
122
+	}
123 123
 
124 124
 	/*
125 125
 	 * Cunstruct View
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
 	{
230 230
 		$jodelAccountForKarma->votePostId($_GET['postId'], $_GET['vote']);
231 231
 		if(isset($_GET['getPostDetails']) && isset($_GET['getPostDetails']))
232
-        {
233
-            header('Location: index.php?getPostDetails=true&postId=' . htmlspecialchars($_GET['postId_parent']) . '#postId-' . htmlspecialchars($_GET['postId']));
234
-        }
235
-        else
236
-        {
237
-            header("Location: index.php#postId-" . htmlspecialchars($_GET['postId']));
238
-        }   
239
-        die();
232
+		{
233
+			header('Location: index.php?getPostDetails=true&postId=' . htmlspecialchars($_GET['postId_parent']) . '#postId-' . htmlspecialchars($_GET['postId']));
234
+		}
235
+		else
236
+		{
237
+			header("Location: index.php#postId-" . htmlspecialchars($_GET['postId']));
238
+		}   
239
+		die();
240 240
 	}
241 241
 	
242 242
 	//SendJodel
Please login to merge, or discard this patch.
php/CustomError.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@
 block discarded – undo
13 13
 	public $varsToDump;
14 14
 
15 15
 	function __construct($msg = 'not Set', $varsToDump = 'not Set', $view = 'not Set', $actions = 'not Set', $accountId = 'not Set', $isVerified = 'not Set', $isTokenFresh = 'not Set', $page = 'not Set', $referrer = 'not Set')
16
-    {
17
-        $this->view = $view;
18
-        $this->actions = $actions;
19
-        $this->accountId = $accountId;
20
-        $this->isVerified = $isVerified;
21
-        $this->isTokenFresh = $isTokenFresh;
22
-        $this->page = $page;
23
-        $this->referrer = $referrer;
24
-        $this->msg = $msg;
25
-        $this->varsToDump = $varsToDump;
26
-    }
16
+	{
17
+		$this->view = $view;
18
+		$this->actions = $actions;
19
+		$this->accountId = $accountId;
20
+		$this->isVerified = $isVerified;
21
+		$this->isTokenFresh = $isTokenFresh;
22
+		$this->page = $page;
23
+		$this->referrer = $referrer;
24
+		$this->msg = $msg;
25
+		$this->varsToDump = $varsToDump;
26
+	}
27 27
 
28 28
 	function writeErrorToLog()
29 29
 	{
Please login to merge, or discard this patch.