summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-08-05 11:01:48 -0700
committerBharat Mediratta <bharat@menalto.com>2009-08-05 11:01:48 -0700
commitb394b0b2c67d680fad61880a01885e8b2c750ce5 (patch)
tree7d2ef621e465c32646b0edc23a7f6cf562f289de
parente8c57290a2e98e3cbb7cf47875e6e5dae2e41fa2 (diff)
Fix the default $orderby to be an associative array in descendants() and children(), thanks Tim!
-rw-r--r--modules/gallery/libraries/ORM_MPTT.php4
1 files changed, 2 insertions, 2 deletions
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)