Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
cc06a324
Commit
cc06a324
authored
Mar 06, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2nd part of bug 731559: fix get_attachments_by_bug() everywhere
a=LpSolit
parent
272f3803
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
PatchReader.pm
Bugzilla/Attachment/PatchReader.pm
+1
-1
attachment.cgi
attachment.cgi
+2
-3
No files found.
Bugzilla/Attachment/PatchReader.pm
View file @
cc06a324
...
...
@@ -37,7 +37,7 @@ sub process_diff {
if
(
$lc
->
{
interdiffbin
}
&&
$lc
->
{
diffpath
})
{
# Get the list of attachments that the user can view in this bug.
my
@attachments
=
@
{
Bugzilla::
Attachment
->
get_attachments_by_bug
(
$attachment
->
bug
_id
)};
@
{
Bugzilla::
Attachment
->
get_attachments_by_bug
(
$attachment
->
bug
)};
# Extract patches only.
@attachments
=
grep
{
$_
->
ispatch
==
1
}
@attachments
;
# We want them sorted from newer to older.
...
...
attachment.cgi
View file @
cc06a324
...
...
@@ -427,9 +427,8 @@ sub diff {
sub
viewall
{
# Retrieve and validate parameters
my
$bug
=
Bugzilla::
Bug
->
check
(
scalar
$cgi
->
param
(
'bugid'
));
my
$bugid
=
$bug
->
id
;
my
$attachments
=
Bugzilla::
Attachment
->
get_attachments_by_bug
(
$bug
id
);
my
$attachments
=
Bugzilla::
Attachment
->
get_attachments_by_bug
(
$bug
);
# Ignore deleted attachments.
@$attachments
=
grep
{
$_
->
datasize
}
@$attachments
;
...
...
@@ -605,7 +604,7 @@ sub edit {
my
$attachment
=
validateID
();
my
$bugattachments
=
Bugzilla::
Attachment
->
get_attachments_by_bug
(
$attachment
->
bug
_id
);
Bugzilla::
Attachment
->
get_attachments_by_bug
(
$attachment
->
bug
);
# We only want attachment IDs.
@$bugattachments
=
map
{
$_
->
id
}
@$bugattachments
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment