summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2013-01-30 21:38:32 -0500
committerBharat Mediratta <bharat@menalto.com>2013-01-30 21:38:32 -0500
commit71cf911649811666919d040e2fc319f485b99966 (patch)
tree65a258c8575de1d13ebf6ebed41d10216fe9ad79 /modules/gallery
parentfc82f56f4b3c91ac1ceee426f477b256918636f8 (diff)
Support additional where tuples in ORM_MPTT::parents. Fixes #1980.
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/libraries/ORM_MPTT.php3
1 files changed, 2 insertions, 1 deletions
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)