From e44ff9bb6054f83d266a28f4e5418ff9b98a5b80 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 5 Nov 2008 07:47:19 +0000 Subject: ORM_MPTT::parents() should not include the node itself. --- core/libraries/ORM_MPTT.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/libraries') diff --git a/core/libraries/ORM_MPTT.php b/core/libraries/ORM_MPTT.php index c8dd613b..3ce5e3e4 100644 --- a/core/libraries/ORM_MPTT.php +++ b/core/libraries/ORM_MPTT.php @@ -87,11 +87,11 @@ class ORM_MPTT_Core extends ORM { * @return array ORM */ function parents() { - $id = (int)$this->id; if (!isset($this->parents)) { $this->parents = $this ->where("`left` <= {$this->left}") ->where("`right` >= {$this->right}") + ->where("id <> {$this->id}") ->orderby("left", "ASC") ->find_all(); } -- cgit v1.2.3