DataObjects/Core_person.php
[Pman.Core] / DataObjects / Core_project.php
index eed83fb..de9db55 100644 (file)
@@ -93,7 +93,12 @@ class Pman_Core_DataObjects_Core_project extends DB_DataObject
         $tn = $this->tableName();
         if (!empty($q['query']['project_search'])) {
             $s = $this->escape($q['query']['project_search']);
-            $this->whereAdd(" ({$tn}.code LIKE '$s%') OR ({$tn}.name LIKE '%$s%')");
+            $this->whereAdd(" ({$tn}.code LIKE '$s%')
+                            OR
+                            ({$tn}.name LIKE '%$s%')
+                            OR
+                            join_client_id_id.name LIKE '%$s%'
+                ");
         }
         // types of project to list ... - default is only the open ones...
         if (!empty($q['query']['project_indaterange'])) {
@@ -151,7 +156,7 @@ class Pman_Core_DataObjects_Core_project extends DB_DataObject
           // DB_DataObjecT::debuglevel(1);
             $this->selectAdd();
             $this->selectAdd('distinct(client_id)');
-            $this->selectAs(DB_DataObject::factory('Companies'), 'client_id_%s','join_client_id_id');
+            $this->selectAs(DB_DataObject::factory('core_company'), 'client_id_%s','join_client_id_id');
             $this->groupBy('client_id');
              
         }