diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-26 18:47:40 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-26 18:47:40 -0800 |
commit | 54be15191b983e72b4643f3559303b35b7c48795 (patch) | |
tree | a1ab0586a500b751967ffdacca2952384d305035 /modules/gallery/libraries/ORM_MPTT.php | |
parent | f77b26e988048bfd31d1e59695fe7ca015696a24 (diff) |
Overload Database_Builder to add merge_where() which takes predefined
where clauses and adds them to the existing query. Update all
existing queries that take an additional where clause to use it.
Diffstat (limited to 'modules/gallery/libraries/ORM_MPTT.php')
-rw-r--r-- | modules/gallery/libraries/ORM_MPTT.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index 01b2d7b7..90b9d38a 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -152,7 +152,7 @@ class ORM_MPTT_Core extends ORM { */ function children($limit=null, $offset=0, $where=null, $order_by=array("id" => "ASC")) { if ($where) { - $this->where($where); + $this->merge_where($where); } return $this @@ -170,7 +170,7 @@ class ORM_MPTT_Core extends ORM { */ function children_count($where=null) { if ($where) { - $this->where($where); + $this->merge_where($where); } return $this @@ -189,7 +189,7 @@ class ORM_MPTT_Core extends ORM { */ function descendants($limit=null, $offset=0, $where=null, $order_by=array("id" => "ASC")) { if ($where) { - $this->where($where); + $this->merge_where($where); } return $this @@ -207,7 +207,7 @@ class ORM_MPTT_Core extends ORM { */ function descendants_count($where=null) { if ($where) { - $this->where($where); + $this->merge_where($where); } return $this |