projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07949dc
)
DataObjects/Person.php
author
Alan Knowles
<alan@akbkhome.com>
Thu, 17 Nov 2011 07:38:57 +0000
(15:38 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 17 Nov 2011 07:38:57 +0000
(15:38 +0800)
DataObjects/Person.php
DataObjects/Person.php
patch
|
blob
|
history
diff --git
a/DataObjects/Person.php
b/DataObjects/Person.php
index
a46dbab
..
13329f2
100644
(file)
--- a/
DataObjects/Person.php
+++ b/
DataObjects/Person.php
@@
-465,13
+465,10
@@
class Pman_Core_DataObjects_Person extends DB_DataObject
$pd->selectAdd();
$pd->selectAdd('distinct(person_id) as person_id');
$roled = $pd->fetchAll('person_id');
- $this->whereAdd("
- join_company_id_id.comptype = 'OWNER'
- OR
+ $rs = $roled ? " OR
{$this->tableName()}.id IN (".implode(',', $roled) . ")
-
-
- ");
+ " : '';
+ $this->whereAdd(" join_company_id_id.comptype = 'OWNER' $rs ");
}
// -- for distribution