From: lpsolit%gmail.com <> Date: Tue, 31 Oct 2006 07:51:53 +0000 (+0000) Subject: Bug 357374: Can't locate object method "use_for" via package "Bugzilla::Group" -... X-Git-Tag: bugzilla-2.22.2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f392cecea5799a4611d92ad5c76afd600ac7175;p=thirdparty%2Fbugzilla.git Bug 357374: Can't locate object method "use_for" via package "Bugzilla::Group" - Patch by Frédéric Buclin r=kiko a=myk --- diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm index 32c4696db8..b2a5fd5c65 100644 --- a/Bugzilla/Group.pm +++ b/Bugzilla/Group.pm @@ -104,6 +104,15 @@ sub last_changed { return $_[0]->{'last_changed'}; } sub user_regexp { return $_[0]->{'userregexp'}; } sub is_active { return $_[0]->{'isactive'}; } +############################### +#### Methods #### +############################### + +sub is_active_bug_group { + my $self = shift; + return $self->is_active && $self->is_bug_group; +} + ################################ ##### Module Subroutines ### ################################ @@ -161,6 +170,7 @@ Bugzilla::Group - Bugzilla group class. my $last_changed = $group->last_changed; my $user_reg_exp = $group->user_reg_exp; my $is_active = $group->is_active; + my $is_active_bug_group = $group->is_active_bug_group; my $group_id = Bugzilla::Group::ValidateGroupName('admin', @users); my @groups = Bugzilla::get_all_groups(); diff --git a/template/en/default/admin/groups/list.html.tmpl b/template/en/default/admin/groups/list.html.tmpl index e6d96b142d..82bd592fd5 100644 --- a/template/en/default/admin/groups/list.html.tmpl +++ b/template/en/default/admin/groups/list.html.tmpl @@ -52,7 +52,7 @@ {name => 'userregexp' heading => 'User RegExp' } - {name => 'use_for' + {name => 'is_active_bug_group' heading => "Use For $terms.Bugs" align => 'center' } @@ -66,15 +66,15 @@ ] %] -[% overrides.use_for = [ { +[% overrides.is_active_bug_group = [ { match_value => "0" - match_field => 'use_for' + match_field => 'is_active_bug_group' override_content => 1 content => " " }, { match_value => "1" - match_field => 'use_for' + match_field => 'is_active_bug_group' override_content => 1 content => "X" }] @@ -124,10 +124,6 @@ }] %] -[% FOREACH group = groups %] - [% group.use_for = (group.isactive != 0) && (group.isbuggroup) %] -[% END %] - [% PROCESS admin/table.html.tmpl columns = columns data = groups