diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/libraries/ORM_MPTT.php | 2 | ||||
-rw-r--r-- | modules/gallery/models/item.php | 2 | ||||
-rw-r--r-- | modules/gallery/tests/ORM_MPTT_Test.php | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index 949ca48c..0ea519c9 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -201,7 +201,7 @@ class ORM_MPTT_Core extends ORM { * @param array order_by * @return object ORM_Iterator */ - function descendants($limit=null, $offset=0, $where=null, $order_by=array("id" => "ASC")) { + function descendants($limit=null, $offset=null, $where=null, $order_by=array("id" => "ASC")) { if ($where) { $this->merge_where($where); } diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index e2208b73..e3d27b6d 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -634,7 +634,7 @@ class Item_Model extends ORM_MPTT { * @param array additional where clauses * @return object ORM_Iterator */ - function descendants($limit=null, $offset=0, $where=array(), $order_by=null) { + function descendants($limit=null, $offset=null, $where=array(), $order_by=null) { if (empty($order_by)) { $order_by = array($this->sort_column => $this->sort_order); // Use id as a tie breaker diff --git a/modules/gallery/tests/ORM_MPTT_Test.php b/modules/gallery/tests/ORM_MPTT_Test.php index 36a81d2c..69b6bea9 100644 --- a/modules/gallery/tests/ORM_MPTT_Test.php +++ b/modules/gallery/tests/ORM_MPTT_Test.php @@ -190,8 +190,8 @@ class ORM_MPTT_Test extends Unit_Test_Case { $parent->reload(); $this->assert_equal(3, $parent->descendants()->count()); - $this->assert_equal(2, $parent->descendants(null, 0, array("type" => "photo"))->count()); - $this->assert_equal(1, $parent->descendants(null, 0, array("type" => "album"))->count()); + $this->assert_equal(2, $parent->descendants(null, null, array(array("type", "=", "photo")))->count()); + $this->assert_equal(1, $parent->descendants(null, null, array(array("type", "=", "album")))->count()); } public function descendant_limit_test() { |