Add kiosk mode, public board access with read-only and auto-refresh

This commit is contained in:
Frédéric Guillot
2014-02-22 16:30:03 -05:00
parent a1923d3d7f
commit 2f4651411b
12 changed files with 121 additions and 19 deletions

View File

@@ -16,6 +16,11 @@ class Project extends Base
return $this->db->table(self::TABLE)->eq('id', $project_id)->findOne();
}
public function getByToken($token)
{
return $this->db->table(self::TABLE)->eq('token', $token)->findOne();
}
public function getFirst()
{
return $this->db->table(self::TABLE)->findOne();
@@ -92,12 +97,12 @@ class Project extends Base
{
$this->db->startTransaction();
$values['token'] = self::generateToken();
$this->db->table(self::TABLE)->save($values);
$project_id = $this->db->getConnection()->getLastId();
$boardModel = new \Model\Board;
$boardModel->create($project_id, array(
t('Backlog'),
t('Ready'),