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
0d8aa275
Commit
0d8aa275
authored
May 14, 2010
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 565880: Do not throw an error when obsoleting an already obsolete attachment
a=LpSolit
parent
1f1d6a5b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
Attachment.pm
Bugzilla/Attachment.pm
+5
-5
code-error.html.tmpl
template/en/default/global/code-error.html.tmpl
+0
-4
No files found.
Bugzilla/Attachment.pm
View file @
0d8aa275
...
@@ -734,7 +734,7 @@ sub validate_can_edit {
...
@@ -734,7 +734,7 @@ sub validate_can_edit {
&&
$user
->
in_group
(
'editbugs'
,
$product_id
)))
?
1
:
0
;
&&
$user
->
in_group
(
'editbugs'
,
$product_id
)))
?
1
:
0
;
}
}
=item C<validate_obsolete($bug)>
=item C<validate_obsolete($bug
, $attach_ids
)>
Description: validates if attachments the user wants to mark as obsolete
Description: validates if attachments the user wants to mark as obsolete
really belong to the given bug and are not already obsolete.
really belong to the given bug and are not already obsolete.
...
@@ -742,8 +742,10 @@ Description: validates if attachments the user wants to mark as obsolete
...
@@ -742,8 +742,10 @@ Description: validates if attachments the user wants to mark as obsolete
he cannot view it (due to restrictions on it).
he cannot view it (due to restrictions on it).
Params: $bug - The bug object obsolete attachments should belong to.
Params: $bug - The bug object obsolete attachments should belong to.
$attach_ids - The list of attachments to mark as obsolete.
Returns: 1 on success. Else an error is thrown.
Returns: The list of attachment objects to mark as obsolete.
Else an error is thrown.
=cut
=cut
...
@@ -777,9 +779,7 @@ sub validate_obsolete {
...
@@ -777,9 +779,7 @@ sub validate_obsolete {
ThrowCodeError
(
'mismatched_bug_ids_on_obsolete'
,
$vars
);
ThrowCodeError
(
'mismatched_bug_ids_on_obsolete'
,
$vars
);
}
}
if
(
$attachment
->
isobsolete
)
{
next
if
$attachment
->
isobsolete
;
ThrowCodeError
(
'attachment_already_obsolete'
,
$vars
);
}
push
(
@obsolete_attachments
,
$attachment
);
push
(
@obsolete_attachments
,
$attachment
);
}
}
...
...
template/en/default/global/code-error.html.tmpl
View file @
0d8aa275
...
@@ -43,10 +43,6 @@
...
@@ -43,10 +43,6 @@
I don't recognize the value (<em>[% action FILTER html %]</em>)
I don't recognize the value (<em>[% action FILTER html %]</em>)
of the <em>action</em> variable.
of the <em>action</em> variable.
[% ELSIF error == "attachment_already_obsolete" %]
Attachment #[% attach_id FILTER html %] ([% description FILTER html %])
is already obsolete.
[% ELSIF error == "attachment_local_storage_disabled" %]
[% ELSIF error == "attachment_local_storage_disabled" %]
[% title = "Local Storage Disabled" %]
[% title = "Local Storage Disabled" %]
You cannot store attachments locally. This feature is disabled.
You cannot store attachments locally. This feature is disabled.
...
...
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