Permalink
Browse files

Support additional where tuples in ORM_MPTT::parents. Fixes #1980.

  • Loading branch information...
1 parent fc82f56 commit 71cf911649811666919d040e2fc319f485b99966 @bharat bharat committed Jan 31, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 modules/gallery/libraries/ORM_MPTT.php
View
3 modules/gallery/libraries/ORM_MPTT.php
@@ -152,8 +152,9 @@ function parent() {
*
* @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)

0 comments on commit 71cf911

Please sign in to comment.