diff options
Diffstat (limited to 'Bugzilla/Whine')
-rw-r--r-- | Bugzilla/Whine/Query.pm | 20 | ||||
-rw-r--r-- | Bugzilla/Whine/Schedule.pm | 76 |
2 files changed, 49 insertions, 47 deletions
diff --git a/Bugzilla/Whine/Query.pm b/Bugzilla/Whine/Query.pm index 6ea91cc51..29e1e0b51 100644 --- a/Bugzilla/Whine/Query.pm +++ b/Bugzilla/Whine/Query.pm @@ -23,12 +23,12 @@ use Bugzilla::Search::Saved; use constant DB_TABLE => 'whine_queries'; use constant DB_COLUMNS => qw( - id - eventid - query_name - sortkey - onemailperbug - title + id + eventid + query_name + sortkey + onemailperbug + title ); use constant NAME_FIELD => 'id'; @@ -37,11 +37,11 @@ use constant LIST_ORDER => 'sortkey'; #################### # Simple Accessors # #################### -sub eventid { return $_[0]->{'eventid'}; } -sub sortkey { return $_[0]->{'sortkey'}; } +sub eventid { return $_[0]->{'eventid'}; } +sub sortkey { return $_[0]->{'sortkey'}; } sub one_email_per_bug { return $_[0]->{'onemailperbug'}; } -sub title { return $_[0]->{'title'}; } -sub name { return $_[0]->{'query_name'}; } +sub title { return $_[0]->{'title'}; } +sub name { return $_[0]->{'query_name'}; } 1; diff --git a/Bugzilla/Whine/Schedule.pm b/Bugzilla/Whine/Schedule.pm index 017b744e5..e6e8e67d9 100644 --- a/Bugzilla/Whine/Schedule.pm +++ b/Bugzilla/Whine/Schedule.pm @@ -22,22 +22,22 @@ use Bugzilla::Constants; use constant DB_TABLE => 'whine_schedules'; use constant DB_COLUMNS => qw( - id - eventid - run_day - run_time - run_next - mailto - mailto_type + id + eventid + run_day + run_time + run_next + mailto + mailto_type ); use constant UPDATE_COLUMNS => qw( - eventid - run_day - run_time - run_next - mailto - mailto_type + eventid + run_day + run_time + run_next + mailto + mailto_type ); use constant NAME_FIELD => 'id'; use constant LIST_ORDER => 'id'; @@ -45,36 +45,38 @@ use constant LIST_ORDER => 'id'; #################### # Simple Accessors # #################### -sub eventid { return $_[0]->{'eventid'}; } -sub run_day { return $_[0]->{'run_day'}; } -sub run_time { return $_[0]->{'run_time'}; } +sub eventid { return $_[0]->{'eventid'}; } +sub run_day { return $_[0]->{'run_day'}; } +sub run_time { return $_[0]->{'run_time'}; } sub mailto_is_group { return $_[0]->{'mailto_type'}; } sub mailto { - my $self = shift; - - return $self->{mailto_object} if exists $self->{mailto_object}; - my $id = $self->{'mailto'}; - - if ($self->mailto_is_group) { - $self->{mailto_object} = Bugzilla::Group->new($id); - } else { - $self->{mailto_object} = Bugzilla::User->new($id); - } - return $self->{mailto_object}; + my $self = shift; + + return $self->{mailto_object} if exists $self->{mailto_object}; + my $id = $self->{'mailto'}; + + if ($self->mailto_is_group) { + $self->{mailto_object} = Bugzilla::Group->new($id); + } + else { + $self->{mailto_object} = Bugzilla::User->new($id); + } + return $self->{mailto_object}; } sub mailto_users { - my $self = shift; - return $self->{mailto_users} if exists $self->{mailto_users}; - my $object = $self->mailto; - - if ($self->mailto_is_group) { - $self->{mailto_users} = $object->members_non_inherited if $object->is_active; - } else { - $self->{mailto_users} = $object; - } - return $self->{mailto_users}; + my $self = shift; + return $self->{mailto_users} if exists $self->{mailto_users}; + my $object = $self->mailto; + + if ($self->mailto_is_group) { + $self->{mailto_users} = $object->members_non_inherited if $object->is_active; + } + else { + $self->{mailto_users} = $object; + } + return $self->{mailto_users}; } 1; |