diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 00:25:23 +0200 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 00:25:23 +0200 |
commit | 57584dc4744fea59833ef355f7513690d246c70f (patch) | |
tree | 805f2b2941eca17eaf97263165d11d9e676ad9d1 /extensions/Example | |
parent | 785580c6c290b93fe25868cfbb5d4e300749de62 (diff) | |
download | bugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.gz bugzilla-57584dc4744fea59833ef355f7513690d246c70f.tar.xz |
more porting work
Diffstat (limited to 'extensions/Example')
-rw-r--r-- | extensions/Example/Extension.pm | 36 | ||||
-rw-r--r-- | extensions/Example/lib/Config.pm | 2 |
2 files changed, 7 insertions, 31 deletions
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index 4498d2b22..ef20a28f0 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -211,12 +211,15 @@ sub search_operator_field_override { sub _component_nonchanged { my $original = shift; - my ($invocant, $args) = @_; + my $invocant = shift; + + my %func_args = @_; + $invocant->$original(%func_args); - $invocant->$original($args); # Actually, it does not change anything in the result, # just an example. - $args->{term} = $args->{term} . " OR 1=2"; + my ($term) = @func_args{qw(term)}; + $$term = $$term . " OR 1=2"; } sub bugmail_recipients { @@ -261,14 +264,9 @@ sub config_modify_panels { my $auth_params = $panels->{'auth'}->{params}; my ($info_class) = grep($_->{name} eq 'user_info_class', @$auth_params); my ($verify_class) = grep($_->{name} eq 'user_verify_class', @$auth_params); - + push(@{ $info_class->{choices} }, 'CGI,Example'); push(@{ $verify_class->{choices} }, 'Example'); - - push(@$auth_params, { name => 'param_example', - type => 't', - default => 0, - checker => \&check_numeric }); } sub db_schema_abstract_schema { @@ -456,26 +454,6 @@ sub install_update_db { # $dbh->bz_add_index('example', 'example_new_column_idx', [qw(value)]); } -sub install_update_db_fielddefs { - my $dbh = Bugzilla->dbh; -# $dbh->bz_add_column('fielddefs', 'example_column', -# {TYPE => 'MEDIUMTEXT', NOTNULL => 1, DEFAULT => ''}); -} - -sub job_map { - my ($self, $args) = @_; - - my $job_map = $args->{job_map}; - - # This adds the named class (an instance of TheSchwartz::Worker) as a - # handler for when a job is added with the name "some_task". - $job_map->{'some_task'} = 'Bugzilla::Extension::Example::Job::SomeClass'; - - # Schedule a job like this: - # my $queue = Bugzilla->job_queue(); - # $queue->insert('some_task', { some_parameter => $some_variable }); -} - sub mailer_before_send { my ($self, $args) = @_; diff --git a/extensions/Example/lib/Config.pm b/extensions/Example/lib/Config.pm index 75db22957..a126e82df 100644 --- a/extensions/Example/lib/Config.pm +++ b/extensions/Example/lib/Config.pm @@ -25,8 +25,6 @@ use warnings; use Bugzilla::Config::Common; -our $sortkey = 5000; - sub get_param_list { my ($class) = @_; |