@@ -143,7 +143,9 @@ |
||
| 143 | 143 | 'sender_id' => $user_id |
| 144 | 144 | )); |
| 145 | 145 | $check_widget = true; |
| 146 | - if ($user_id == $this->user->data['user_id']) $check_widget = false; |
|
| 146 | + if ($user_id == $this->user->data['user_id']) { |
|
| 147 | + $check_widget = false; |
|
| 148 | + } |
|
| 147 | 149 | $this->template->assign_vars(array( |
| 148 | 150 | 'U_USER_ID' => $user_id, |
| 149 | 151 | 'U_CHECK_FRIEND' => $check_friend, |
@@ -158,10 +158,11 @@ discard block |
||
| 158 | 158 | 'sentAt' => time() |
| 159 | 159 | ); |
| 160 | 160 | |
| 161 | - if ($this->db->insert('messages', $insert)) |
|
| 162 | - return $this->db->lastInsertId(); |
|
| 163 | - else |
|
| 164 | - return false; |
|
| 161 | + if ($this->db->insert('messages', $insert)) { |
|
| 162 | + return $this->db->lastInsertId(); |
|
| 163 | + } else { |
|
| 164 | + return false; |
|
| 165 | + } |
|
| 165 | 166 | } |
| 166 | 167 | |
| 167 | 168 | /** |
@@ -180,10 +181,11 @@ discard block |
||
| 180 | 181 | 'sentAt' => time() |
| 181 | 182 | ); |
| 182 | 183 | |
| 183 | - if ($this->db->insert('files', $insert)) |
|
| 184 | - return $this->db->lastInsertId(); |
|
| 185 | - else |
|
| 186 | - return false; |
|
| 184 | + if ($this->db->insert('files', $insert)) { |
|
| 185 | + return $this->db->lastInsertId(); |
|
| 186 | + } else { |
|
| 187 | + return false; |
|
| 188 | + } |
|
| 187 | 189 | } |
| 188 | 190 | |
| 189 | 191 | /** |