Permalink
Browse files

Fix error on reports_to where that prevents where filter to work prop…

…erly.
  • Loading branch information...
1 parent 87bb14a commit ea8029a4a057c29c3be943a28c59fc2ef92193f0 Sergi Almacellas Abellana committed Apr 30, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 data/SugarBean.php
View
@@ -5166,11 +5166,11 @@ function getOwnerWhere($user_id)
{
if(isset($this->field_defs['assigned_user_id']))
{
- return " $this->table_name.assigned_user_id ='$user_id' or $this->table_name.assigned_user_id in (select id from users where reports_to_id = '$user_id') ";
+ return " ( $this->table_name.assigned_user_id ='$user_id' or $this->table_name.assigned_user_id in (select id from users where reports_to_id = '$user_id') ) ";
}
if(isset($this->field_defs['created_by']))
{
- return " $this->table_name.created_by ='$user_id' or $this->table_name.created_by in (select id from users where reports_to_id = '$user_id') ";
+ return " ( $this->table_name.created_by ='$user_id' or $this->table_name.created_by in (select id from users where reports_to_id = '$user_id') ) ";
}
return '';
}

0 comments on commit ea8029a

Please sign in to comment.