diff options
author | mkanat%bugzilla.org <> | 2006-09-05 01:21:47 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-09-05 01:21:47 +0200 |
commit | 7d677ece7d55266f63924bc64cf2190df7c785a0 (patch) | |
tree | 7b666d17b8e5de6a8d1cd86c8a33030073acb9ef /template/en/default | |
parent | b63fd277afedfb5d101ce4700058609e81199855 (diff) | |
download | bugzilla-7d677ece7d55266f63924bc64cf2190df7c785a0.tar.gz bugzilla-7d677ece7d55266f63924bc64cf2190df7c785a0.tar.xz |
Bug 283582: Remove UserInGroup in favor of Bugzilla->user->in_group
Patch By victory(_RSZ_) <bmo2007@rsz.jp> r=mkanat, a=myk
Diffstat (limited to 'template/en/default')
18 files changed, 39 insertions, 38 deletions
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 @@ <input type="hidden" name="action" value="new"> </form> -<p><b>Name</b> 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.</p> +<p><b>Name</b> is what is used with the B<!-- blah -->ugzilla->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.</p> <p><b>Description</b> 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 @@ <p><a href="editgroups.cgi?action=add">Add Group</a></p> <p> - <b>Name</b> 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. + <b>Name</b> is what is used with the B<!-- blah -->ugzilla->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. </p> <p> 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")))) %] <input type="checkbox" id="[% attachment.id %]" name="obsolete" value="[% attachment.id %]"> <a href="attachment.cgi?id=[% attachment.id %]&action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br> @@ -91,7 +91,7 @@ %] </td> </tr> - [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] + [% IF (Param("insidergroup") && user.in_group(Param("insidergroup"))) %] <tr> <th>Privacy:</th> <td> 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 @@ <input type="checkbox" id="isobsolete" name="isobsolete" value="1" [% 'checked="checked"' IF attachment.isobsolete %]> <label for="isobsolete">obsolete</label><br> - [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] + [% IF (Param("insidergroup") && user.in_group(Param("insidergroup"))) %] <input type="checkbox" name="isprivate" value="1" [% " checked" IF attachment.isprivate %]> private<br><br> [% ELSE %]<br> 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 %] <th bgcolor="#cccccc" align="left">Actions</th> </tr> - [% 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 @@ <label for="isprivate-[% count %]">Private</label> </i> [% END %] - [% IF UserInGroup(Param('timetrackinggroup')) && + [% IF user.in_group(Param('timetrackinggroup')) && (comment.work_time > 0 || comment.work_time < 0) %] <br> 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) { <td> </td> [%# 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) %] <td rowspan="[% num_rows FILTER html %]" valign="top"> @@ -323,7 +323,7 @@ function handleWantsAttachment(wants_attachment) { <td colspan="2"></td> </tr> -[% IF UserInGroup(Param('timetrackinggroup')) %] +[% IF user.in_group(Param('timetrackinggroup')) %] <tr> <td align="right"><strong>Estimated Hours:</strong></td> <td colspan="2"> @@ -400,7 +400,7 @@ function handleWantsAttachment(wants_attachment) { </td> </tr> - [% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] + [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] <tr> <td></td> <td colspan="3"> @@ -450,7 +450,7 @@ function handleWantsAttachment(wants_attachment) { </td> </tr> - [% IF UserInGroup('editbugs') %] + [% IF user.in_group('editbugs') %] [% IF use_keywords %] <tr> <td align="right" valign="top"> 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 @@ </tr> </table> - [% IF UserInGroup(Param('timetrackinggroup')) %] + [% IF user.in_group(Param('timetrackinggroup')) %] <br> <table cellspacing="0" cellpadding="4" border="1"> <tr> @@ -561,7 +561,7 @@ <br> <label for="comment" accesskey="c"><b>Additional <u>C</u>omments</b></label>: - [% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] + [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] <input type="checkbox" name="commentprivacy" value="1" id="newcommentprivacy" onClick="updateCommentTagControl(this, form)"> 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")) %] <tr> <th>Time tracking:</th> <td colspan="3"> 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")) %] <long_desc isprivate="[% c.isprivate FILTER xml %]"> <who>[% c.email FILTER xml %]</who> <bug_when>[% c.time FILTER time FILTER xml %]</bug_when> - [% IF UserInGroup(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %] + [% IF user.in_group(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %] <work_time>[% PROCESS formattimeunit time_unit = c.work_time FILTER xml %]</work_time> [% END %] <thetext>[% c.body FILTER xml %]</thetext> @@ -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")) %] <attachment isobsolete="[% a.isobsolete FILTER xml %]" ispatch="[% a.ispatch FILTER xml %]" diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 76823cdbc..c696989f2 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -907,8 +907,8 @@ 'components.html' => 'Creating a component'} %] Sorry, the product <em>[% product FILTER html %]</em> has to have at least one component in order for you to - enter [% terms.abug %] into it.<p> - [% IF UserInGroup("editcomponents") %] + enter [% terms.abug %] into it.<br> + [% IF user.in_group("editcomponents") %] <a href="editcomponents.cgi?action=add&product=[% product FILTER url_quote %]">Create a new component</a>. [% ELSE %] @@ -980,7 +980,7 @@ Sorry, the product <em>[% product FILTER html %]</em> has to have at least one version in order for you to enter [% terms.abug %] into it.<p> - [% IF UserInGroup("editcomponents") %] + [% IF user.in_group("editcomponents") %] <a href="editversions.cgi?action=add&product=[% product FILTER url_quote %]">Create a new version</a>. [% 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 %] </tr> - [% IF UserInGroup(Param("timetrackinggroup")) %] + [% IF user.in_group(Param("timetrackinggroup")) %] <tr> <th><label for="estimated_time">Estimated Hours:</label></th> <td> 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 @@ <input type="submit" value="XML" id="xml"> </form> - [% IF UserInGroup(Param('timetrackinggroup')) %] + [% IF user.in_group(Param('timetrackinggroup')) %] <form method="post" action="summarize_time.cgi"> <input type="hidden" name="id" value="[% buglist_joined FILTER html %]"> <input type="submit" id="timesummary" value="Time Summary"> 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') %] <h2> Existing quips: </h2> @@ -156,7 +156,7 @@ <p> Those who like their wisdom in large doses can <a href="quips.cgi?action=show">view - [% IF UserInGroup('admin') %] + [% IF user.in_group('admin') %] and edit [% END %] the whole quip list</a>. 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() { </td> <td align="center"> - [% IF user.id == series.creator OR UserInGroup("admin") %] + [% IF user.id == series.creator OR user.in_group("admin") %] <a href="chart.cgi?action=edit&series_id= [% series.series_id %]">Edit</a> | [% END %] @@ -260,7 +260,7 @@ function subcatSelected() { [% END %] </form> -[% IF UserInGroup('editbugs') %] +[% IF user.in_group('editbugs') %] <h3><a href="query.cgi?format=create-series">Create New Data Set</a></h3> [% 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. </li> - [% IF UserInGroup(Param("chartgroup")) %] + [% IF user.in_group(Param("chartgroup")) %] <li> <strong><a href="chart.cgi">New Charts</a></strong> - 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 @@ <span style="font-weight: bold;"> day(s)</span><br> [%# 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') %] <input type="checkbox" name="public" [% "checked='checked'" IF default.public.0 %]> <span style="font-weight: bold;">Visible to all<br> 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")) %] <tr> <th align="right"> <label for="deadlinefrom" accesskey="l">Dead<u>l</u>ine</label>: |