Completed
Branch master (9d86c3)
by Florin
12:02 queued 04:59
created
models/friends_model.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		$this->user_friends_table = $user_friends_table;
20 20
 	}
21 21
 
22
-    public function getFriends()
22
+	public function getFriends()
23 23
 	{
24 24
 		$sql = "
25 25
             SELECT u.user_id, 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 				'user_id' => $row['user_id'],
45 45
 				'username' => $row['username_clean'],
46 46
 				'user_colour' => $row['user_colour'],
47
-                'user_status' => ($row['session_time'] >= (time() - ($this->config['load_online_time'] * 60))) ? 1 : 0,
47
+				'user_status' => ($row['session_time'] >= (time() - ($this->config['load_online_time'] * 60))) ? 1 : 0,
48 48
 			);
49 49
 		}
50 50
 		$this->db->sql_freeresult();
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 		}
107 107
 	}
108 108
     
109
-    public function get_request_by_sender_id($sender_id)
110
-    {
111
-        $sql = "
109
+	public function get_request_by_sender_id($sender_id)
110
+	{
111
+		$sql = "
112 112
             SELECT `request_id`,
113 113
 					`user_id`,
114 114
 					`sender_id`,
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
 			ORDER BY `time` DESC
121 121
 			LIMIT 1 
122 122
         ";
123
-        $result = $this->db->sql_query($sql);
124
-        $row = $this->db->sql_fetchrow($result);
123
+		$result = $this->db->sql_query($sql);
124
+		$row = $this->db->sql_fetchrow($result);
125 125
         
126 126
 		return $row;
127
-    }
127
+	}
128 128
 
129 129
 	public function insert_friends_request(array $data) {
130 130
 		$sql = "
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
 		}
247 247
 	}
248 248
     
249
-    public function remove_friend($user_id)
250
-    {
251
-        $sql = "DELETE FROM ". $this->user_friends_table ." WHERE `user_id` = ". (int)$user_id ."";
252
-        $this->db->sql_query($sql);
249
+	public function remove_friend($user_id)
250
+	{
251
+		$sql = "DELETE FROM ". $this->user_friends_table ." WHERE `user_id` = ". (int)$user_id ."";
252
+		$this->db->sql_query($sql);
253 253
         
254
-        $sql = "DELETE FROM ". $this->user_friends_table ." WHERE `friend_id` = ". (int)$user_id ."";
255
-        $this->db->sql_query($sql);
256
-    }
254
+		$sql = "DELETE FROM ". $this->user_friends_table ." WHERE `friend_id` = ". (int)$user_id ."";
255
+		$this->db->sql_query($sql);
256
+	}
257 257
 
258 258
 }
Please login to merge, or discard this patch.