DataObjects/Person.php
authorEdward <edward@roojs.com>
Tue, 7 Oct 2014 06:45:25 +0000 (14:45 +0800)
committerEdward <edward@roojs.com>
Tue, 7 Oct 2014 06:45:25 +0000 (14:45 +0800)
DataObjects/Person.php

index 41a4a65..8d3a809 100644 (file)
@@ -666,6 +666,11 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
     function applyFilters($q, $au, $roo)
     {
         //DB_DataObject::DebugLevel(1);
+        
+        if (!empty($q['query']['is_owner'])) {
+            $this->whereAdd(" join_company_id_id.comptype = 'OWNER'");
+        }
+        
         if (!empty($q['query']['person_not_internal'])) {
             $this->whereAdd(" join_company_id_id.isOwner = 0 ");
         }