summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-09 23:00:23 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-09 23:00:23 -0400
commit4641d4cf77aac54b1c5688a10e78642b8cda2e87 (patch)
treeaefae03b076e4ed437482418171583c15d852c55 /app/Model
parent1176a489ab6f3dbe46bc5acea1afca9ecd6de448 (diff)
Improve Link::getOppositeLinkId()
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Link.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/Model/Link.php b/app/Model/Link.php
index 87ba49c4..42b8382c 100644
--- a/app/Model/Link.php
+++ b/app/Model/Link.php
@@ -55,8 +55,7 @@ class Link extends Base
*/
public function getOppositeLinkId($link_id)
{
- $link = $this->getById($link_id);
- return $link['opposite_id'] ?: $link_id;
+ return $this->db->table(self::TABLE)->eq('id', $link_id)->findOneColumn('opposite_id') ?: $link_id;
}
/**