From 7d677ece7d55266f63924bc64cf2190df7c785a0 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 4 Sep 2006 23:21:47 +0000 Subject: Bug 283582: Remove UserInGroup in favor of Bugzilla->user->in_group Patch By victory(_RSZ_) r=mkanat, a=myk --- template/en/default/admin/groups/create.html.tmpl | 9 +++++---- template/en/default/admin/groups/list.html.tmpl | 8 ++++---- template/en/default/attachment/create.html.tmpl | 4 ++-- template/en/default/attachment/edit.html.tmpl | 2 +- template/en/default/attachment/list.html.tmpl | 2 +- template/en/default/bug/comments.html.tmpl | 4 ++-- template/en/default/bug/create/create.html.tmpl | 8 ++++---- template/en/default/bug/edit.html.tmpl | 8 ++++---- template/en/default/bug/show-multiple.html.tmpl | 2 +- template/en/default/bug/show.xml.tmpl | 6 +++--- template/en/default/global/user-error.html.tmpl | 6 +++--- template/en/default/list/edit-multiple.html.tmpl | 2 +- template/en/default/list/list.html.tmpl | 2 +- template/en/default/list/quips.html.tmpl | 4 ++-- template/en/default/reports/create-chart.html.tmpl | 4 ++-- template/en/default/reports/menu.html.tmpl | 2 +- template/en/default/reports/series.html.tmpl | 2 +- template/en/default/search/form.html.tmpl | 2 +- 18 files changed, 39 insertions(+), 38 deletions(-) (limited to 'template/en') diff --git a/template/en/default/admin/groups/create.html.tmpl b/template/en/default/admin/groups/create.html.tmpl index a82acf6ce..2b50d73a2 100644 --- a/template/en/default/admin/groups/create.html.tmpl +++ b/template/en/default/admin/groups/create.html.tmpl @@ -51,10 +51,11 @@ -

Name is what is used with the UserInGroup() function in any -customized cgi files you write that use a given group. It can also be used -by people submitting [% terms.bugs %] by email to limit [% terms.abug %] to -a certain set of groups. It may not contain any spaces.

+

Name is what is used with the Bugzilla->user->in_group() +function in any customized cgi files you write that use a given group. +It can also be used by people submitting [% terms.bugs %] by email to +limit [% terms.abug %] to a certain set of groups. It may not contain +any spaces.

Description is what will be shown in the [% terms.bug %] reports to members of the group where they can choose whether diff --git a/template/en/default/admin/groups/list.html.tmpl b/template/en/default/admin/groups/list.html.tmpl index 64e30f9e4..fe32bc53d 100644 --- a/template/en/default/admin/groups/list.html.tmpl +++ b/template/en/default/admin/groups/list.html.tmpl @@ -136,10 +136,10 @@

Add Group

- Name is what is used with the UserInGroup() function in any -customized cgi files you write that use a given group. It can also be used -by people submitting [% terms.bugs %] by email to limit [% terms.abug %] -to a certain set of groups. + Name is what is used with the Bugzilla->user->in_group() +function in any customized cgi files you write that use a given group. +It can also be used by people submitting [% terms.bugs %] by email to +limit [% terms.abug %] to a certain set of groups.

diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index 043e1226a..3547f6d2e 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -54,7 +54,7 @@ [% IF attachments.size %] [% FOREACH attachment = attachments %] [% IF ((attachment.isprivate == 0) || (Param("insidergroup") - && UserInGroup(Param("insidergroup")))) %] + && user.in_group(Param("insidergroup")))) %] [% attachment.id %]: [% attachment.description FILTER html %]
@@ -91,7 +91,7 @@ %] - [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] + [% IF (Param("insidergroup") && user.in_group(Param("insidergroup"))) %] Privacy: diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index 51b941ca5..b7d03a8b9 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -247,7 +247,7 @@
- [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] + [% IF (Param("insidergroup") && user.in_group(Param("insidergroup"))) %] private

[% ELSE %]
diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 34f646985..adb927e1a 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -32,7 +32,7 @@ [% END %] Actions - [% canseeprivate = !Param("insidergroup") || UserInGroup(Param("insidergroup")) %] + [% canseeprivate = !Param("insidergroup") || user.in_group(Param("insidergroup")) %] [% count = 0 %] [% FOREACH attachment = attachments %] [% count = count + 1 %] diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 55a84819f..a4671d89d 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -38,7 +38,7 @@ [% DEFAULT start_at = 0 mode = "show" %] -[% isinsider = Param("insidergroup") && UserInGroup(Param("insidergroup")) %] +[% isinsider = Param("insidergroup") && user.in_group(Param("insidergroup")) %] [% sort_order = user.settings.comment_sort_order.value %] [%# NOTE: (start_at > 0) means we came here from a midair collision, @@ -134,7 +134,7 @@ [% END %] - [% IF UserInGroup(Param('timetrackinggroup')) && + [% IF user.in_group(Param('timetrackinggroup')) && (comment.work_time > 0 || comment.work_time < 0) %]
Additional hours worked: diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 33e8b8090..26e95523b 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -258,7 +258,7 @@ function handleWantsAttachment(wants_attachment) {   [%# Calculate the number of rows we can use for flags %] [% num_rows = 6 + (Param("useqacontact") ? 1 : 0) + - (UserInGroup(Param('timetrackinggroup')) ? 3 : 0) + + (user.in_group(Param('timetrackinggroup')) ? 3 : 0) + (Param("usebugaliases") ? 1 : 0) %] @@ -323,7 +323,7 @@ function handleWantsAttachment(wants_attachment) { -[% IF UserInGroup(Param('timetrackinggroup')) %] +[% IF user.in_group(Param('timetrackinggroup')) %] Estimated Hours: @@ -400,7 +400,7 @@ function handleWantsAttachment(wants_attachment) { - [% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] + [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] @@ -450,7 +450,7 @@ function handleWantsAttachment(wants_attachment) { - [% IF UserInGroup('editbugs') %] + [% IF user.in_group('editbugs') %] [% IF use_keywords %] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 4cadc2114..c93d08c2b 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -57,7 +57,7 @@ replytext = "(In reply to comment #" + id + ")\n" + replytext + "\n"; - [% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] + [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] if (document.getElementById('isprivate-'+id).checked) { document.getElementById('newcommentprivacy').checked = 'checked'; } @@ -97,7 +97,7 @@ return text; } -[% IF UserInGroup(Param('timetrackinggroup')) %] +[% IF user.in_group(Param('timetrackinggroup')) %] var fRemainingTime = [% bug.remaining_time %]; // holds the original value function adjustRemainingTime() { // subtracts time spent from remaining time @@ -435,7 +435,7 @@ - [% IF UserInGroup(Param('timetrackinggroup')) %] + [% IF user.in_group(Param('timetrackinggroup')) %]
@@ -561,7 +561,7 @@
: - [% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] + [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 35df0abb1..2ebb3a21a 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -183,7 +183,7 @@ [% PROCESS dependencies name = "blocked" %] [% END %] - [% IF UserInGroup(Param("timetrackinggroup")) %] + [% IF user.in_group(Param("timetrackinggroup")) %] - [% IF UserInGroup(Param("timetrackinggroup")) %] + [% IF user.in_group(Param("timetrackinggroup")) %]
Time tracking: diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl index a941ebc62..a54202675 100644 --- a/template/en/default/bug/show.xml.tmpl +++ b/template/en/default/bug/show.xml.tmpl @@ -67,11 +67,11 @@ [% END %] [% IF displayfields.long_desc %] [% FOREACH c = bug.longdescs %] - [% NEXT IF c.isprivate && !UserInGroup(Param("insidergroup")) %] + [% NEXT IF c.isprivate && !user.in_group(Param("insidergroup")) %] [% c.email FILTER xml %] [% c.time FILTER time FILTER xml %] - [% IF UserInGroup(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %] + [% IF user.in_group(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %] [% PROCESS formattimeunit time_unit = c.work_time FILTER xml %] [% END %] [% c.body FILTER xml %] @@ -81,7 +81,7 @@ [% IF displayfields.attachment %] [% FOREACH a = bug.attachments %] - [% NEXT IF a.isprivate && !UserInGroup(Param("insidergroup")) %] + [% NEXT IF a.isprivate && !user.in_group(Param("insidergroup")) %] 'Creating a component'} %] Sorry, the product [% product FILTER html %] has to have at least one component in order for you to - enter [% terms.abug %] into it.

- [% IF UserInGroup("editcomponents") %] + enter [% terms.abug %] into it.
+ [% IF user.in_group("editcomponents") %] Create a new component. [% ELSE %] @@ -980,7 +980,7 @@ Sorry, the product [% product FILTER html %] has to have at least one version in order for you to enter [% terms.abug %] into it.

- [% IF UserInGroup("editcomponents") %] + [% IF user.in_group("editcomponents") %] Create a new version. [% ELSE %] diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index 958a95cf8..95198dbef 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -131,7 +131,7 @@ [% END %]

diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index cf7215ea3..644cc5ac4 100644 --- a/template/en/default/list/list.html.tmpl +++ b/template/en/default/list/list.html.tmpl @@ -154,7 +154,7 @@ - [% IF UserInGroup(Param('timetrackinggroup')) %] + [% IF user.in_group(Param('timetrackinggroup')) %]
diff --git a/template/en/default/list/quips.html.tmpl b/template/en/default/list/quips.html.tmpl index 5bbbaecc3..a752dce5f 100644 --- a/template/en/default/list/quips.html.tmpl +++ b/template/en/default/list/quips.html.tmpl @@ -85,7 +85,7 @@ [% END %] [% IF show_quips %] - [% IF !UserInGroup('admin') %] + [% IF !user.in_group('admin') %]

Existing quips:

@@ -156,7 +156,7 @@

Those who like their wisdom in large doses can view - [% IF UserInGroup('admin') %] + [% IF user.in_group('admin') %] and edit [% END %] the whole quip list. diff --git a/template/en/default/reports/create-chart.html.tmpl b/template/en/default/reports/create-chart.html.tmpl index f2daeb06a..ee446b1c9 100644 --- a/template/en/default/reports/create-chart.html.tmpl +++ b/template/en/default/reports/create-chart.html.tmpl @@ -188,7 +188,7 @@ function subcatSelected() {

- [% IF user.id == series.creator OR UserInGroup("admin") %] + [% IF user.id == series.creator OR user.in_group("admin") %] Edit | [% END %] @@ -260,7 +260,7 @@ function subcatSelected() { [% END %] -[% IF UserInGroup('editbugs') %] +[% IF user.in_group('editbugs') %]

Create New Data Set

[% END %] diff --git a/template/en/default/reports/menu.html.tmpl b/template/en/default/reports/menu.html.tmpl index 5ac1516d5..f5c18bee2 100644 --- a/template/en/default/reports/menu.html.tmpl +++ b/template/en/default/reports/menu.html.tmpl @@ -64,7 +64,7 @@ plot the status and/or resolution of [% terms.bugs %] against time, for each product in your database. - [% IF UserInGroup(Param("chartgroup")) %] + [% IF user.in_group(Param("chartgroup")) %]
  • New Charts - plot any arbitrary search against time. Far more powerful. diff --git a/template/en/default/reports/series.html.tmpl b/template/en/default/reports/series.html.tmpl index 1d1caf5d4..966c499ff 100644 --- a/template/en/default/reports/series.html.tmpl +++ b/template/en/default/reports/series.html.tmpl @@ -68,7 +68,7 @@  day(s)
    [%# Change 'admin' here and in Series.pm, or remove the check completely, if you want to change who can make series public. %] - [% IF UserInGroup('admin') %] + [% IF user.in_group('admin') %] Visible to all
    diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index c6a8f65da..d7b7715fd 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -316,7 +316,7 @@ function doOnSelectProduct(selectmode) { [% END %] [%# Deadline %] - [% IF UserInGroup(Param("timetrackinggroup")) %] + [% IF user.in_group(Param("timetrackinggroup")) %]
  • : -- cgit v1.2.1