Skip to content

Commit

Permalink
Normalize the attachment path when using the SOAP API
Browse files Browse the repository at this point in the history
Fixes: #12540: mc_issue_attachment_get does not use the path for the
file

Signed-off-by: Robert Munteanu <robert.munteanu@gmail.com>
  • Loading branch information
Stéphane Veyret authored and rombert committed Nov 25, 2010
1 parent 8126ee6 commit 6f7d05e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/soap/mc_file_api.php
Expand Up @@ -175,9 +175,10 @@ function mci_file_get( $p_file_id, $p_type, $p_user_id ) {
$t_project_id = $row['project_id'];
} else if ( $p_type == 'bug' ) {
$t_bug_id = $row['bug_id'];
$t_project_id = bug_get_field( $t_bug_id, 'project_id' );
}

$t_diskfile = $row['diskfile'];
$t_diskfile = file_normalize_attachment_path( $row['diskfile'], $t_project_id );
$t_content = $row['content'];

# Check access rights
Expand Down

0 comments on commit 6f7d05e

Please sign in to comment.