From b394b0b2c67d680fad61880a01885e8b2c750ce5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 5 Aug 2009 11:01:48 -0700 Subject: Fix the default $orderby to be an associative array in descendants() and children(), thanks Tim! --- modules/gallery/libraries/ORM_MPTT.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index 9d716d8b..a7defba9 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -150,7 +150,7 @@ class ORM_MPTT_Core extends ORM { * @param array orderby * @return array ORM */ - function children($limit=null, $offset=0, $where=array(), $orderby=array("id", "ASC")) { + function children($limit=null, $offset=0, $where=array(), $orderby=array("id" => "ASC")) { return $this ->where("parent_id", $this->id) ->where($where) @@ -181,7 +181,7 @@ class ORM_MPTT_Core extends ORM { * @param array orderby * @return object ORM_Iterator */ - function descendants($limit=null, $offset=0, $where=array(), $orderby=array("id", "ASC")) { + function descendants($limit=null, $offset=0, $where=array(), $orderby=array("id" => "ASC")) { return $this ->where("left_ptr >", $this->left_ptr) ->where("right_ptr <=", $this->right_ptr) -- cgit v1.2.3