summaryrefslogtreecommitdiff
path: root/app/Model/Project.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-27 00:00:43 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-27 00:00:43 -0400
commit1823430d13508fec5de39264bb4fe1224716def2 (patch)
treef911a412f1b8be2471bcb66c7fed8adf675c8d4a /app/Model/Project.php
parent7a22f4c6d47a3e5d447ebeeef094092a4a4b0ad2 (diff)
PicoDb update
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();
}
/**