From 71cf911649811666919d040e2fc319f485b99966 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 30 Jan 2013 21:38:32 -0500 Subject: Support additional where tuples in ORM_MPTT::parents. Fixes #1980. --- modules/gallery/libraries/ORM_MPTT.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index c75aa0b2..0ad81331 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -152,8 +152,9 @@ class ORM_MPTT_Core extends ORM { * * @return array ORM */ - function parents() { + function parents($where=null) { return $this + ->merge_where($where) ->where("left_ptr", "<=", $this->left_ptr) ->where("right_ptr", ">=", $this->right_ptr) ->where("id", "<>", $this->id) -- cgit v1.2.3