Skip to content

Commit

Permalink
Merge pull request #165 from paulcanning/2.5-stable
Browse files Browse the repository at this point in the history
Fix for delete flag default type in SQL and list_pms function
  • Loading branch information
REJack authored Jul 26, 2016
2 parents 4672cf8 + e404e0a commit a0391c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -1918,11 +1918,11 @@ public function send_pms( $sender_id, $receiver_ids, $title, $message ){
public function list_pms($limit=5, $offset=0, $receiver_id=NULL, $sender_id=NULL){
if (is_numeric($receiver_id)){
$query = $this->aauth_db->where('receiver_id', $receiver_id);
$query = $this->aauth_db->where('pm_deleted_receiver', 0);
$query = $this->aauth_db->where('pm_deleted_receiver', NULL);
}
if (is_numeric($sender_id)){
$query = $this->aauth_db->where('sender_id', $sender_id);
$query = $this->aauth_db->where('pm_deleted_sender', 0);
$query = $this->aauth_db->where('pm_deleted_sender', NULL);
}

$query = $this->aauth_db->order_by('id','DESC');
Expand Down
4 changes: 2 additions & 2 deletions sql/Aauth_v2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ CREATE TABLE `aauth_pms` (
`message` text,
`date_sent` datetime DEFAULT NULL,
`date_read` datetime DEFAULT NULL,
`pm_deleted_sender` int(1) DEFAULT '0',
`pm_deleted_receiver` int(1) DEFAULT '0',
`pm_deleted_sender` int(1) DEFAULT NULL,
`pm_deleted_receiver` int(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `full_index` (`id`,`sender_id`,`receiver_id`,`date_read`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Expand Down
4 changes: 2 additions & 2 deletions sql/Aauth_v2_BCrypt.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ CREATE TABLE `aauth_pms` (
`message` text,
`date_sent` datetime DEFAULT NULL,
`date_read` datetime DEFAULT NULL,
`pm_deleted_sender` int(1) DEFAULT '0',
`pm_deleted_receiver` int(1) DEFAULT '0',
`pm_deleted_sender` int(1) DEFAULT NULL,
`pm_deleted_receiver` int(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `full_index` (`id`,`sender_id`,`receiver_id`,`date_read`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Expand Down

0 comments on commit a0391c8

Please sign in to comment.