summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/movies.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-08-27 20:56:03 -0700
committerBharat Mediratta <bharat@menalto.com>2011-08-27 20:56:03 -0700
commit084c2717c0ddff6c5caa79c62abb3cdb9b4aea31 (patch)
treeaf0fc03f042d11715cbbb3d137390d7df706ec3c /modules/gallery/controllers/movies.php
parentdc21cf36b606048dc24532407d39bc8f5b4211fa (diff)
parent246f5b59cb0e525a5ff6eaffce6b13e9af7e70b2 (diff)
Merge branch 'master' into bharat_dev
Diffstat (limited to 'modules/gallery/controllers/movies.php')
-rw-r--r--modules/gallery/controllers/movies.php24
1 files changed, 4 insertions, 20 deletions
diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php
index 8e81c594..76263dc0 100644
--- a/modules/gallery/controllers/movies.php
+++ b/modules/gallery/controllers/movies.php
@@ -27,27 +27,11 @@ class Movies_Controller extends Items_Controller {
access::required("view", $movie);
- $where = array(array("type", "!=", "album"));
- $position = item::get_position($movie, $where);
- if ($position > 1) {
- list ($previous_item, $ignore, $next_item) =
- $movie->parent()->viewable()->children(3, $position - 2, $where);
- } else {
- $previous_item = null;
- list ($next_item) = $movie->parent()->viewable()->children(1, $position, $where);
- }
-
$template = new Theme_View("page.html", "item", "movie");
- $template->set_global(
- array("item" => $movie,
- "children" => array(),
- "children_count" => 0,
- "parents" => $movie->parents()->as_array(),
- "next_item" => $next_item,
- "previous_item" => $previous_item,
- "sibling_count" => $movie->parent()->viewable()->children_count($where),
- "position" => $position));
-
+ $template->set_global(array("item" => $movie,
+ "children" => array(),
+ "children_count" => 0));
+ $template->set_global(item::get_display_context($movie));
$template->content = new View("movie.html");
$movie->increment_view_count();