aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/object/image.php5
-rw-r--r--views/default/tidypics/image_menu.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/views/default/object/image.php b/views/default/object/image.php
index 2d560f8bb..a97916b7a 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -147,7 +147,10 @@
<div id="tidypics_image_wrapper">
<?php
if (get_plugin_setting('download_link', 'tidypics') != "disabled") {
- echo "<a href=\"{$vars['url']}action/tidypics/download?file_guid={$image_guid}&amp;view=inline\" title=\"{$title}\"><img id=\"tidypics_image\" src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$image_guid}&amp;size=large\" alt=\"{$title}\" /></a>";
+ $ts = time();
+ $token = generate_action_token($ts);
+ $download_url = $vars['url'] . "action/tidypics/download?file_guid=" . $image_guid . "&amp;view=inline&amp;__elgg_token={$token}&__elgg_ts={$ts}";
+ echo "<a href=\"{$download_url}\" title=\"{$title}\"><img id=\"tidypics_image\" src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$image_guid}&amp;size=large\" alt=\"{$title}\" /></a>";
} else {
echo "<img id=\"tidypics_image\" src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$image_guid}&amp;size=large\" alt=\"{$title}\" />";
}
diff --git a/views/default/tidypics/image_menu.php b/views/default/tidypics/image_menu.php
index b804c8491..cb004395e 100644
--- a/views/default/tidypics/image_menu.php
+++ b/views/default/tidypics/image_menu.php
@@ -46,7 +46,7 @@
$ts = time();
$token = generate_action_token($ts);
- $download_url = $vars['url'] . "action/tidypics/download?file_guid=" . $image_guid . "&amp;__elgg_token=$token&__elgg_ts=$ts";
+ $download_url = $vars['url'] . "action/tidypics/download?file_guid=" . $image_guid . "&amp;__elgg_token={$token}&__elgg_ts={$ts}";
?>
<li id="download_image"><a href="<?php echo $download_url; ?>"><?php echo elgg_echo("image:download"); ?></a></li>
<?php