DataObjects/ProjectDirectory.php
authorAlan Knowles <alan@akbkhome.com>
Wed, 4 Apr 2012 12:18:54 +0000 (20:18 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 4 Apr 2012 12:18:54 +0000 (20:18 +0800)
DataObjects/ProjectDirectory.php

index 6930160..05820a9 100644 (file)
@@ -68,13 +68,13 @@ class Pman_Core_DataObjects_ProjectDirectory extends DB_DataObject
      */
     function projects($au)
     {
      */
     function projects($au)
     {
-        $c = clone ($this);
         if (empty($au)) {
             $p = DB_DataObject::Factory('Projects');
             $p->get('code',  '*PUBLIC');
             return array($p->id);          
             
         } 
         if (empty($au)) {
             $p = DB_DataObject::Factory('Projects');
             $p->get('code',  '*PUBLIC');
             return array($p->id);          
             
         } 
+        $c = clone ($this);
         
         if (is_array($au)) {
             $c->whereAddIn('person_id', $au, 'int');
         
         if (is_array($au)) {
             $c->whereAddIn('person_id', $au, 'int');