Permalink
Browse files

Fix use of item display context in Controller_G2 and Controller_Image…

…Block.
  • Loading branch information...
1 parent 19838b5 commit 1a1529069a98312c6325391dbeaa4cc49188c1b7 @shadlaws shadlaws committed Jul 11, 2013
@@ -50,9 +50,14 @@ public function action_map() {
$this->redirect($tag->abs_url(), 301);
}
- Item::set_display_context("Controller_Tags::get_display_context", $tag->id);
// We want to show the item as part of the tag virtual album. Most of this code is below; we'll
// change $path and $view to let it fall through
+ // @see Controller_Tags::action_show()
+ Item::set_display_context(
+ array("Controller_Tags::get_tag_query", array($tag)),
+ array("Controller_Tags::get_breadcrumbs", array($tag)),
+ array());
+
$view = "";
$path = "";
}
@@ -22,7 +22,7 @@ public function action_random() {
$item_id = $this->request->arg(0, "digit");
$item = ORM::factory("Item", $item_id);
Access::required("view", $item);
- Item::set_display_context("Controller_Items::get_display_context");
+ Item::clear_display_context(); // defaults to album context, which is what we want.
$this->redirect($item->abs_url());
}
}

0 comments on commit 1a15290

Please sign in to comment.