diff --git a/3.0/modules/dynamic/controllers/dynamic.php b/3.0/modules/dynamic/controllers/dynamic.php index 6d7e3062..7229b70d 100644 --- a/3.0/modules/dynamic/controllers/dynamic.php +++ b/3.0/modules/dynamic/controllers/dynamic.php @@ -30,12 +30,14 @@ class Dynamic_Controller extends Controller { $page = Input::instance()->get("page", "1"); $album_defn = unserialize(module::get_var("dynamic", $album)); - $children_count = $album_defn->limit; - if (empty($children_count)) { + $display_limit = $album_defn->limit; + if (empty($display_limit)) { $children_count = ORM::factory("item") ->viewable() ->where("type", "!=", "album") ->count_all(); + } else { + $children_count = $display_limit; } $offset = ($page-1) * $page_size; diff --git a/3.1/modules/dynamic/controllers/dynamic.php b/3.1/modules/dynamic/controllers/dynamic.php index 6d7e3062..7229b70d 100644 --- a/3.1/modules/dynamic/controllers/dynamic.php +++ b/3.1/modules/dynamic/controllers/dynamic.php @@ -30,12 +30,14 @@ class Dynamic_Controller extends Controller { $page = Input::instance()->get("page", "1"); $album_defn = unserialize(module::get_var("dynamic", $album)); - $children_count = $album_defn->limit; - if (empty($children_count)) { + $display_limit = $album_defn->limit; + if (empty($display_limit)) { $children_count = ORM::factory("item") ->viewable() ->where("type", "!=", "album") ->count_all(); + } else { + $children_count = $display_limit; } $offset = ($page-1) * $page_size;