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 | |
parent | a07057fc6d3f68c20f8f15c3573e74d2514ba8b6 (diff) | |
download | elgg-bdc8df4e735666ab286ce3e14f7baf0dada68d11.tar.gz elgg-bdc8df4e735666ab286ce3e14f7baf0dada68d11.tar.bz2 |
adjusting download links
-rw-r--r-- | views/default/object/image.php | 5 | ||||
-rw-r--r-- | views/default/tidypics/image_menu.php | 2 |
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}&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}\" />"; } 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 . "&__elgg_token=$token&__elgg_ts=$ts";
+ $download_url = $vars['url'] . "action/tidypics/download?file_guid=" . $image_guid . "&__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
|