Browse Source

Merge pull request #165 from paulcanning/2.5-stable

Fix for delete flag default type in SQL and list_pms function
develop
Raphael Jackstadt 9 years ago committed by GitHub
parent
commit
a0391c871e
  1. 4
      application/libraries/Aauth.php
  2. 4
      sql/Aauth_v2.sql
  3. 4
      sql/Aauth_v2_BCrypt.sql

4
application/libraries/Aauth.php

@ -1918,11 +1918,11 @@ class Aauth {
public function list_pms($limit=5, $offset=0, $receiver_id=NULL, $sender_id=NULL){ public function list_pms($limit=5, $offset=0, $receiver_id=NULL, $sender_id=NULL){
if (is_numeric($receiver_id)){ if (is_numeric($receiver_id)){
$query = $this->aauth_db->where('receiver_id', $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)){ if (is_numeric($sender_id)){
$query = $this->aauth_db->where('sender_id', $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'); $query = $this->aauth_db->order_by('id','DESC');

4
sql/Aauth_v2.sql

@ -77,8 +77,8 @@ CREATE TABLE `aauth_pms` (
`message` text, `message` text,
`date_sent` datetime DEFAULT NULL, `date_sent` datetime DEFAULT NULL,
`date_read` datetime DEFAULT NULL, `date_read` datetime DEFAULT NULL,
`pm_deleted_sender` int(1) DEFAULT '0', `pm_deleted_sender` int(1) DEFAULT NULL,
`pm_deleted_receiver` int(1) DEFAULT '0', `pm_deleted_receiver` int(1) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `full_index` (`id`,`sender_id`,`receiver_id`,`date_read`) KEY `full_index` (`id`,`sender_id`,`receiver_id`,`date_read`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

4
sql/Aauth_v2_BCrypt.sql

@ -77,8 +77,8 @@ CREATE TABLE `aauth_pms` (
`message` text, `message` text,
`date_sent` datetime DEFAULT NULL, `date_sent` datetime DEFAULT NULL,
`date_read` datetime DEFAULT NULL, `date_read` datetime DEFAULT NULL,
`pm_deleted_sender` int(1) DEFAULT '0', `pm_deleted_sender` int(1) DEFAULT NULL,
`pm_deleted_receiver` int(1) DEFAULT '0', `pm_deleted_receiver` int(1) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `full_index` (`id`,`sender_id`,`receiver_id`,`date_read`) KEY `full_index` (`id`,`sender_id`,`receiver_id`,`date_read`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Loading…
Cancel
Save