diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-09-01 12:14:06 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-09-01 12:14:06 +0000 |
commit | bdc8df4e735666ab286ce3e14f7baf0dada68d11 (patch) | |
tree | 83595ae23e13bbe8958ffa613e4d67f57b54c716 /views/default/object | |
parent | a07057fc6d3f68c20f8f15c3573e74d2514ba8b6 (diff) | |
download | elgg-bdc8df4e735666ab286ce3e14f7baf0dada68d11.tar.gz elgg-bdc8df4e735666ab286ce3e14f7baf0dada68d11.tar.bz2 |
adjusting download links
Diffstat (limited to 'views/default/object')
-rw-r--r-- | views/default/object/image.php | 5 |
1 files changed, 4 insertions, 1 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}&view=inline\" title=\"{$title}\"><img id=\"tidypics_image\" src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$image_guid}&size=large\" alt=\"{$title}\" /></a>"; + $ts = time(); + $token = generate_action_token($ts); + $download_url = $vars['url'] . "action/tidypics/download?file_guid=" . $image_guid . "&view=inline&__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}&size=large\" alt=\"{$title}\" /></a>"; } else { echo "<img id=\"tidypics_image\" src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$image_guid}&size=large\" alt=\"{$title}\" />"; } |