Add table/pagination to the project list

This commit is contained in:
Frederic Guillot
2015-01-31 11:21:43 -05:00
parent e1be338053
commit 9a98013736
14 changed files with 135 additions and 123 deletions

View File

@@ -98,24 +98,22 @@ class Project extends Base
* Get all projects
*
* @access public
* @param bool $filter_permissions If true, remove projects not allowed for the current user
* @return array
*/
public function getAll($filter_permissions = false)
public function getAll()
{
$projects = $this->db->table(self::TABLE)->asc('name')->findAll();
return $this->db->table(self::TABLE)->asc('name')->findAll();
}
if ($filter_permissions) {
foreach ($projects as $key => $project) {
if (! $this->projectPermission->isUserAllowed($project['id'], $this->userSession->getId())) {
unset($projects[$key]);
}
}
}
return $projects;
/**
* Get all project ids
*
* @access public
* @return array
*/
public function getAllIds()
{
return $this->db->table(self::TABLE)->asc('name')->findAllByColumn('id');
}
/**