mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
ORM::find_all() now uses null as the default value for offset.
This commit is contained in:
@@ -150,7 +150,7 @@ class ORM_MPTT_Core extends ORM {
|
||||
* @param array order_by
|
||||
* @return array ORM
|
||||
*/
|
||||
function children($limit=null, $offset=0, $where=null, $order_by=array("id" => "ASC")) {
|
||||
function children($limit=null, $offset=null, $where=null, $order_by=array("id" => "ASC")) {
|
||||
if ($where) {
|
||||
$this->merge_where($where);
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ class Item_Model extends ORM_MPTT {
|
||||
* @param array order_by
|
||||
* @return array ORM
|
||||
*/
|
||||
function children($limit=null, $offset=0, $where=array(), $order_by=null) {
|
||||
function children($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
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<?= html::clean($album->title) ?>
|
||||
</span>
|
||||
<ul>
|
||||
<? foreach ($album->children(null, 0, array(array("type", "=", "album"))) as $child): ?>
|
||||
<? foreach ($album->children(null, null, array(array("type", "=", "album"))) as $child): ?>
|
||||
<? if ($selected && $child->contains($selected)): ?>
|
||||
<?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?>
|
||||
<? else: ?>
|
||||
|
||||
Reference in New Issue
Block a user