Browse files

Merge pull request #457 from shadlaws/fixes_20130711_4

Fix use of item display context in Controller_G2 and Controller_ImageBlock.
  • Loading branch information...
2 parents 19838b5 + 1a15290 commit 4d6f0d124aa841745cbd3fcf0c4d964a13faf0cd @shadlaws shadlaws committed Jul 11, 2013
View
7 modules/g2_import/classes/G2Import/Controller/G2.php
@@ -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 = "";
}
View
2 modules/image_block/classes/ImageBlock/Controller/ImageBlock.php
@@ -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 4d6f0d1

Please sign in to comment.