From 415e6a769bbe53328b27129c12fa0488b88ab8a3 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 4 Apr 2012 20:18:45 +0800 Subject: [PATCH] DataObjects/ProjectDirectory.php --- DataObjects/ProjectDirectory.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DataObjects/ProjectDirectory.php b/DataObjects/ProjectDirectory.php index 4d9cf5c5..69301603 100644 --- a/DataObjects/ProjectDirectory.php +++ b/DataObjects/ProjectDirectory.php @@ -69,6 +69,13 @@ class Pman_Core_DataObjects_ProjectDirectory extends DB_DataObject function projects($au) { $c = clone ($this); + if (empty($au)) { + $p = DB_DataObject::Factory('Projects'); + $p->get('code', '*PUBLIC'); + return array($p->id); + + } + if (is_array($au)) { $c->whereAddIn('person_id', $au, 'int'); } else { -- 2.39.2