if (!$project_id) {
return false;
}
- $p = DB_DataObject::factory('Projects');
+ $p = DB_DataObject::factory('core_project');
$p->get($project_id);
if (!$this->authUser) {
if ($p->code != '*PUBLIC') {
function userProjects()
{
- $p = DB_DataObject::factory('Projects');
+ $p = DB_DataObject::factory('core_project');
if (!$this->authUser) {
$p->code = '*PUBLIC';
$ar = $p->fetchAll('id', 'name');
} else {
//DB_DAtaObject::debugLevel(1);
- $p->applyFilters(array(), $this->authUser);
+ $p->applyFilters(array(), $this->authUser, $this);
if (!$this->authUser->hasPerm('Core.Projects_All', 'S')) {
$p->whereAdd("Projects.id in (SELECT ProjectDirectory.project_id FROM ProjectDirectory WHERE
person_id = ". $this->authUser->id . " and role != '')");
function getAuthUser()
{
- $u = DB_DataObject::factory('Person');
+ $u = DB_DataObject::factory('core_project');
if (!$u->isAuth()) {
return false;
}