Do not show inactive projects info on the dashboard and update picodb (merge #546)

This commit is contained in:
Frederic Guillot
2015-01-25 11:55:12 -05:00
parent 655d75a3cf
commit e506648cbc
12 changed files with 50 additions and 31 deletions

View File

@@ -315,10 +315,27 @@ class ProjectPermission extends Base
public function getMemberProjects($user_id)
{
return $this->db
->table(Project::TABLE)
->hashtable(Project::TABLE)
->eq('user_id', $user_id)
->join(self::TABLE, 'project_id', 'id')
->listing('projects.id', 'name');
->getAll('projects.id', 'name');
}
/**
* Return a list of active projects where the user is member
*
* @access public
* @param integer $user_id User id
* @return array
*/
public function getActiveMemberProjects($user_id)
{
return $this->db
->hashtable(Project::TABLE)
->eq('user_id', $user_id)
->eq(Project::TABLE.'.is_active', Project::ACTIVE)
->join(self::TABLE, 'project_id', 'id')
->getAll('projects.id', 'name');
}
/**