diff options
author | Byron Jones <glob@mozilla.com> | 2015-07-21 11:00:20 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-07-21 11:00:20 +0200 |
commit | c53d646eec8907a4e9cb027c34bb93801f3c9fdc (patch) | |
tree | 4470c035fc133dcfc678c9008b963a75166d68fe | |
parent | 19cfefee5bd177bff80095db9d4006293e70301c (diff) | |
download | bugzilla-c53d646eec8907a4e9cb027c34bb93801f3c9fdc.tar.gz bugzilla-c53d646eec8907a4e9cb027c34bb93801f3c9fdc.tar.xz |
Bug 1180572 - create attachment_storage parameter
-rw-r--r-- | Bugzilla/Attachment.pm | 2 | ||||
-rwxr-xr-x | attachment.cgi | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 07fafb11e..c3e48b899 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -822,7 +822,7 @@ sub remove_from_db { $dbh->do('UPDATE attachments SET mimetype = ?, ispatch = ?, isobsolete = ?, attach_size = ? WHERE attach_id = ?', undef, ('text/plain', 0, 1, 0, $self->id)); $dbh->bz_commit_transaction(); - current_storage->remove($self->id); + current_storage()->remove($self->id); # As we don't call SUPER->remove_from_db we need to manually clear # memcached here. diff --git a/attachment.cgi b/attachment.cgi index f1a8042a3..02dc7efcb 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -833,10 +833,7 @@ sub delete_attachment { # Paste the reason provided by the admin into a comment. $bug->add_comment($msg); - # If the attachment is stored locally, remove it. - if (-e $attachment->_get_local_filename) { - unlink $attachment->_get_local_filename; - } + # Remove attachment. $attachment->remove_from_db(); # Now delete the token. |