Skip to content

Commit

Permalink
Fix parameter name.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jul 8, 2013
1 parent 0eba179 commit c513dc3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/CHANGES
Expand Up @@ -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).
Expand Down
10 changes: 5 additions & 5 deletions lib/Application.php
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Expand Up @@ -28,6 +28,7 @@
</stability>
<license uri="http://www.horde.org/licenses/bsdl.php">BSD-2-Clause</license>
<notes>
* [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).
Expand Down Expand Up @@ -1009,6 +1010,7 @@
<date>2013-06-19</date>
<license uri="http://www.horde.org/licenses/bsdl.php">BSD-2-Clause</license>
<notes>
* [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).
Expand Down

0 comments on commit c513dc3

Please sign in to comment.