From 8e808ffbf7b7b28a1cdfda3d188cc156a2e879d9 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Wed, 6 Sep 2006 02:18:26 +0000 Subject: Bug 351098: Make Bugzilla::Object able to update objects in the database, and make Bugzilla::Keyword use it Patch By Max Kanat-Alexander r=LpSolit, a=myk --- .../default/admin/keywords/confirm-delete.html.tmpl | 13 ++++++------- template/en/default/admin/keywords/edit.html.tmpl | 19 +++++++++---------- .../en/default/admin/keywords/rebuild-cache.html.tmpl | 5 +++-- template/en/default/filterexceptions.pl | 10 ---------- template/en/default/global/code-error.html.tmpl | 12 ++++++++++++ 5 files changed, 30 insertions(+), 29 deletions(-) (limited to 'template') diff --git a/template/en/default/admin/keywords/confirm-delete.html.tmpl b/template/en/default/admin/keywords/confirm-delete.html.tmpl index bb29437ef..89123e2bf 100755 --- a/template/en/default/admin/keywords/confirm-delete.html.tmpl +++ b/template/en/default/admin/keywords/confirm-delete.html.tmpl @@ -18,12 +18,11 @@ # # Contributor(s): Terry Weissman # Vlad Dascalu + # Max Kanat-Alexander #%] [%# INTERFACE: - # name: string. The name of the keyword. - # keyword_id: number. The ID of the keyword. - # bug_count: number. The number of bugs with the keyword. + # keyword: A Bugzilla::Keyword object. #%] [% PROCESS global/header.html.tmpl @@ -31,19 +30,19 @@ %]

- [% IF bug_count == 1 %] + [% IF keyword.bug_count == 1 %] There is one [% terms.bug %] with this keyword set. [% ELSE %] - There are [% bug_count %] [%+terms.bugs %] with + There are [% keyword.bug_count FILTER html %] [%+ terms.bugs %] with this keyword set. [% END %] Are you sure you want to delete - the [% name FILTER html %] keyword? + the [% keyword.name FILTER html %] keyword?

- + # Vlad Dascalu + # Max Kanat-Alexander #%] [%# INTERFACE: - # keyword_id: number. The ID of the keyword. - # name: string. The name of the keyword. - # description: string. The description of the keyword. - # bug_count: number. The number of bugs with the keyword. + # keyword: A Bugzilla::Keyword object. #%] [% PROCESS global/variables.none.tmpl %] @@ -37,7 +35,8 @@ - + @@ -47,16 +46,16 @@ minrows = 4 cols = 64 wrap = 'virtual' - defaultcontent = description + defaultcontent = keyword.description %]
Name:
Description:
[% terms.Bugs %]: - [% IF bug_count > 0 %] - - [% bug_count %] + [% IF keyword.bug_count > 0 %] + + [% keyword.bug_count FILTER html %] [% ELSE %] none [% END %] @@ -66,7 +65,7 @@ - +

Edit other keywords.

diff --git a/template/en/default/admin/keywords/rebuild-cache.html.tmpl b/template/en/default/admin/keywords/rebuild-cache.html.tmpl index 84b7a7efa..f9f6f31c0 100755 --- a/template/en/default/admin/keywords/rebuild-cache.html.tmpl +++ b/template/en/default/admin/keywords/rebuild-cache.html.tmpl @@ -18,11 +18,12 @@ # # Contributor(s): Terry Weissman # Vlad Dascalu + # Max Kanat-Alexander #%] [%# INTERFACE: # action: string; the current action (either "update" or "delete"). - # name: string; the name of the current keyword. + # keyword: A Bugzilla::Keyword object #%] [% IF action == "update" %] @@ -35,7 +36,7 @@ [% PROCESS global/header.html.tmpl %] -Keyword [% name FILTER html %] [%+status FILTER html %]. +Keyword [% keyword.name FILTER html %] [%+ status FILTER html %].

After you have finished deleting or modifying keywords, diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 2723b8dd9..9a7b3d50d 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -515,16 +515,6 @@ 'classification_text', ], -'admin/keywords/edit.html.tmpl' => [ - 'keyword_id', - 'bug_count', -], - -'admin/keywords/confirm-delete.html.tmpl' => [ - 'keyword_id', - 'bug_count', -], - 'admin/flag-type/confirm-delete.html.tmpl' => [ 'flag_type.flag_count', 'flag_type.id', diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index 27798491b..a66524355 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -296,6 +296,18 @@ a [% param FILTER html %] argument, and that argument was not set. + [% ELSIF error == "protection_violation" %] + The function [% function FILTER html %] was called + from + + [% IF caller %] + [%+ caller FILTER html %], which is + [% END %] + + outside the package. This function may only be called from + a subclass of [% superclass FILTER html %]. + + [% ELSIF error == "unknown_comparison_type" %] Specified comparison type is not supported. -- cgit v1.2.3-24-g4f1b