From 1afb5b3bb0ac579fdd1616f701b27038feb5a375 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 4 Apr 2007 20:52:41 +0000 Subject: Bug 376497: validateID() should return an attachment object - Patch by Frédéric Buclin a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/attachment/created.html.tmpl | 22 ++++++++++------------ .../en/default/attachment/delete_reason.txt.tmpl | 4 ++-- template/en/default/attachment/updated.html.tmpl | 9 ++++----- template/en/default/filterexceptions.pl | 9 +++------ 4 files changed, 19 insertions(+), 25 deletions(-) (limited to 'template/en') diff --git a/template/en/default/attachment/created.html.tmpl b/template/en/default/attachment/created.html.tmpl index e6037bcba..515463989 100644 --- a/template/en/default/attachment/created.html.tmpl +++ b/template/en/default/attachment/created.html.tmpl @@ -20,10 +20,7 @@ #%] [%# INTERFACE: - # bugid: integer. ID of the bug we just attached an attachment to. - # attachid: integer. ID of the attachment just created. - # description: string. Description of the attachment just created. - # contenttype: string. The Content Type we attached it as. + # attachment: object of the attachment just created. # contenttypemethod: string. How we got the content type of the attachment. # Possible values: autodetect, list, manual. #%] @@ -36,11 +33,12 @@
- Attachment #[% attachid %] - to [% "$terms.bug $bugid" FILTER bug_link(bugid) %] created + Attachment #[% attachment.id %] + to [% "$terms.bug $attachment.bug_id" FILTER bug_link(attachment.bug_id) FILTER none %] created
- [% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = bugid %] + [% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = attachment.bug_id %] [% IF convertedbmp %]

Note: [% terms.Bugzilla %] automatically converted your BMP image file to a @@ -50,9 +48,9 @@ [% IF contenttypemethod == 'autodetect' %]

Note: [% terms.Bugzilla %] automatically detected the content type - [% contenttype %] for this attachment. If this is - incorrect, correct the value by - editing the attachment's details. + [% attachment.contenttype FILTER html %] for this attachment. If this is + incorrect, correct the value by editing the attachment's + details.

[% END %] @@ -62,8 +60,8 @@

-Create - Another Attachment to [% terms.Bug %] #[% bugid %] +Create + Another Attachment to [% terms.Bug %] #[% attachment.bug_id %]

[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/attachment/delete_reason.txt.tmpl b/template/en/default/attachment/delete_reason.txt.tmpl index 45879f6ca..0d66fcfc5 100644 --- a/template/en/default/attachment/delete_reason.txt.tmpl +++ b/template/en/default/attachment/delete_reason.txt.tmpl @@ -15,12 +15,12 @@ #%] [%# INTERFACE: - # attachid: ID of the attachment the user wants to delete. + # attachment: object of the attachment the user wants to delete. # reason: string; The reason provided by the user. # date: the date when the request to delete the attachment was made. #%] -The content of attachment [% attachid %] has been deleted by +The content of attachment [% attachment.id %] has been deleted by [%+ user.identity %] [% IF reason %] who provided the following reason: diff --git a/template/en/default/attachment/updated.html.tmpl b/template/en/default/attachment/updated.html.tmpl index a66b74e17..fac376fdc 100644 --- a/template/en/default/attachment/updated.html.tmpl +++ b/template/en/default/attachment/updated.html.tmpl @@ -21,8 +21,7 @@ #%] [%# INTERFACE: - # bugid: integer. ID of the bug we are updating. - # attachid: integer. ID of the attachment we just attached. + # attachment: object of the attachment we just attached. #%] [% PROCESS global/variables.none.tmpl %] @@ -33,11 +32,11 @@
Changes to - attachment [% attachid %] - of [% "$terms.bug $bugid" FILTER bug_link(bugid) %] submitted + attachment [% attachment.id %] + of [% "$terms.bug $attachment.bug_id" FILTER bug_link(attachment.bug_id) FILTER none %] submitted
- [% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = bugid %] + [% PROCESS "bug/process/bugmail.html.tmpl" mailing_bugid = attachment.bug_id %] [%# Links to more information about the changed bug. %] [% Hook.process("links") %]
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 0df0a0363..231ad98f5 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -414,10 +414,8 @@ ], 'attachment/created.html.tmpl' => [ - 'attachid', - 'bugid', - 'contenttype', - '"$terms.bug $bugid" FILTER bug_link(bugid)', + 'attachment.id', + 'attachment.bug_id', ], 'attachment/edit.html.tmpl' => [ @@ -439,8 +437,7 @@ ], 'attachment/updated.html.tmpl' => [ - 'attachid', - '"$terms.bug $bugid" FILTER bug_link(bugid)', + 'attachment.id', ], 'attachment/diff-header.html.tmpl' => [ -- cgit v1.2.3-24-g4f1b