added explicit sorting to getMyIssues()
This commit is contained in:
parent
53455a7d0d
commit
024952312c
@ -104,7 +104,6 @@ class IssueModel extends Model
|
||||
$this->db->trans_start ();
|
||||
if (strlen($userid) > 0) $this->db->where ('owner', $userid);
|
||||
|
||||
//$this->db->order_by ('id', 'desc');
|
||||
if (is_array($filter))
|
||||
{
|
||||
$this->db->where_in ('status', array_keys($filter));
|
||||
@ -115,6 +114,15 @@ class IssueModel extends Model
|
||||
$this->db->where ("updatedon >= SYSDATE() - INTERVAL {$hour_limit} HOUR");
|
||||
}
|
||||
|
||||
if (strlen($userid) > 0)
|
||||
{
|
||||
$this->db->order_by ('id', 'desc');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->order_by ('updatedon', 'desc');
|
||||
}
|
||||
|
||||
$query = $this->db->get ('issue');
|
||||
$this->db->trans_complete ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user