diff --git a/docs/CHANGES b/docs/CHANGES
index 8543f2e..7d10d2b 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -2,6 +2,7 @@
v3.0.0-git
----------
+[jan] Fix downloading of attachments.
[jan] Add more tests to filter out bounces and auto-replies in the mail parser.
[jan] Hide topbar and sidebar when displaying attachments.
[jan] Fix displaying of multiple owners (Bug #12051).
diff --git a/lib/Application.php b/lib/Application.php
index 5b04dcf..d9cfe1f 100644
--- a/lib/Application.php
+++ b/lib/Application.php
@@ -167,15 +167,15 @@ public function download(Horde_Variables $vars)
switch ($vars->actionID) {
case 'download_file':
// Get the ticket details first.
- if (empty($vars->id)) {
+ if (empty($vars->ticket)) {
exit;
}
- $details = $whups_driver->getTicketDetails($vars->id);
+ $details = $whups_driver->getTicketDetails($vars->ticket);
// Check permissions on this ticket.
- if (!count(Whups::permissionsFilter($whups_driver->getHistory($vars->id), 'comment', Horde_Perms::READ))) {
- throw new Whups_Exception(sprintf(_("You are not allowed to view ticket %d."), $vars->id));
+ if (!count(Whups::permissionsFilter($whups_driver->getHistory($vars->ticket), 'comment', Horde_Perms::READ))) {
+ throw new Whups_Exception(sprintf(_("You are not allowed to view ticket %d."), $vars->ticket));
}
try {
@@ -186,7 +186,7 @@ public function download(Horde_Variables $vars)
try {
return array(
- 'data' => $vfs->read(Whups::VFS_ATTACH_PATH . '/' . $vars->id, $vars->file),
+ 'data' => $vfs->read(Whups::VFS_ATTACH_PATH . '/' . $vars->ticket, $vars->file),
'name' => $vars->file
);
} catch (Horde_Vfs_Exception $e) {
diff --git a/package.xml b/package.xml
index f4a2d47..37c3a16 100644
--- a/package.xml
+++ b/package.xml
@@ -28,6 +28,7 @@
BSD-2-Clause
+* [jan] Fix downloading of attachments.
* [jan] Add more tests to filter out bounces and auto-replies in the mail parser.
* [jan] Hide topbar and sidebar when displaying attachments.
* [jan] Fix displaying of multiple owners (Bug #12051).
@@ -1009,6 +1010,7 @@
2013-06-19
BSD-2-Clause
+* [jan] Fix downloading of attachments.
* [jan] Add more tests to filter out bounces and auto-replies in the mail parser.
* [jan] Hide topbar and sidebar when displaying attachments.
* [jan] Fix displaying of multiple owners (Bug #12051).