ORM_MPTT::parents() should not include the node itself.

This commit is contained in:
Bharat Mediratta
2008-11-05 07:47:19 +00:00
parent d21f3437e6
commit e44ff9bb60
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -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();
}