diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-23 06:06:33 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-23 06:06:33 -0700 |
commit | 8f443cef3e304c12f9e3555332880395051e7e3d (patch) | |
tree | 5e47e11035aff9edf02fc8a6599d1b34f5f5f588 /modules/digibug/helpers | |
parent | 3824f2b52fed7bbbd3e1c91eafff9df21be6c765 (diff) |
This change implements the print_proxy method. This method allows a 1 time
security bypass for the remote print processor to retrieve the fullsize image.
Diffstat (limited to 'modules/digibug/helpers')
-rw-r--r-- | modules/digibug/helpers/digibug_theme.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/modules/digibug/helpers/digibug_theme.php b/modules/digibug/helpers/digibug_theme.php index 2e44b115..0fe2ce2e 100644 --- a/modules/digibug/helpers/digibug_theme.php +++ b/modules/digibug/helpers/digibug_theme.php @@ -32,16 +32,11 @@ class digibug_theme_Core { static function thumb_bottom($theme, $child) { if ($theme->page_type() == "album" && $child->type == "photo") { - $csrf = access::csrf_token(); - $return = "album/{$child->parent()->id}"; - $href = url::site("digibug/print_photo/$child->id?csrf={$csrf}&return=$return"); - $title = t("Print photo with Digibug"); - return "<div class=\"gDigibugPrintButton\"> - <a class=\"gButtonLink ui-corner-all ui-state-default ui-icon-left\" href=\"$href\" - title=\"$title\"> - <span class=\"ui-icon ui-icon-print\">$title</span> - </a> - </div>"; + $v = new View("digibug_album.html"); + $v->id = $child->id; + $v->return = "album/{$child->parent()->id}"; + $v->title = t("Print photo with Digibug"); + return $v->render(); } return ""; } |