summaryrefslogtreecommitdiff
path: root/app/Model/Project.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/Project.php')
-rw-r--r--app/Model/Project.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Model/Project.php b/app/Model/Project.php
index ef7340ee..3c864e5d 100644
--- a/app/Model/Project.php
+++ b/app/Model/Project.php
@@ -111,7 +111,7 @@ class Project extends Base
*/
public function isPrivate($project_id)
{
- return (bool) $this->db->table(self::TABLE)->eq('id', $project_id)->eq('is_private', 1)->count();
+ return $this->db->table(self::TABLE)->eq('id', $project_id)->eq('is_private', 1)->exists();
}
/**
@@ -305,7 +305,7 @@ class Project extends Base
return false;
}
- $project_id = $this->db->getConnection()->getLastId();
+ $project_id = $this->db->getLastId();
if (! $this->board->create($project_id, $this->board->getUserColumns())) {
$this->db->cancelTransaction();
@@ -391,7 +391,7 @@ class Project extends Base
*/
public function exists($project_id)
{
- return $this->db->table(self::TABLE)->eq('id', $project_id)->count() === 1;
+ return $this->db->table(self::TABLE)->eq('id', $project_id)->exists();
}
/**