Pull Request 2 Dev 1.1

```
if (!$user_has_record) {
    $params = array(// insert params here);
    $db->insert('thread_likes', $params);
    $db->commit();
    return;
}

if ($user_has_record['like_status'] != $like_status) {
    $db->update('thread_likes', array('like_status' => $like_status), 
    array('thread_id' => $this->thread_id, 'user_id' => $this->user_id));
} else {
    $db->query('DELETE FROM thread_likes WHERE thread_id = ? AND user_id = ? AND like_status = ?', 
        array($this->thread_id, $this->user_id, $like_status));                
}

$db->commit();
```