Bug 40933 - Some garbage fixes
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1340 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
9f54993575
commit
05313a263e
|
@ -1,3 +1,4 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
|
|
|
@ -77,6 +77,7 @@ sub extension_include
|
|||
trick_taint($_) for @$new;
|
||||
}
|
||||
my $old = setter('inc', $name, $new);
|
||||
return $old if !$new;
|
||||
# update @INC
|
||||
my $oh = { map { $_ => 1 } @$old };
|
||||
for (my $i = $#INC; $i >= 0; $i--)
|
||||
|
|
|
@ -327,18 +327,18 @@ sub _get_extension_requirements
|
|||
if ($function eq 'REQUIRED_MODULES' || $function eq 'OPTIONAL_MODULES')
|
||||
{
|
||||
no strict 'refs';
|
||||
$function = "Bugzilla::Extension::".lc($function);
|
||||
$function = 'Bugzilla::Extension::'.lc($function);
|
||||
foreach (Bugzilla::Extension::loaded())
|
||||
{
|
||||
if (my $em = &$function($_))
|
||||
{
|
||||
ref $_->{feature} or $_->{feature} = [ $_->{feature} ];
|
||||
ref $_->{feature} or $_->{feature} = [ $_->{feature} ] for @$em;
|
||||
push @$modules, @$em;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $modules;
|
||||
};
|
||||
}
|
||||
|
||||
sub check_requirements {
|
||||
my ($output) = @_;
|
||||
|
|
|
@ -288,6 +288,8 @@ sub template_include_path
|
|||
# with perl by default.
|
||||
sub vers_cmp {
|
||||
my ($a, $b) = @_;
|
||||
$a = '' if !defined $a;
|
||||
$b = '' if !defined $b;
|
||||
|
||||
# Remove leading zeroes - Bug 344661
|
||||
$a =~ s/^0*(\d.+)/$1/;
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $modules = Bugzilla->hook_args->{modules};
|
||||
if (exists $modules->{Example}) {
|
||||
$modules->{Example} = 'extensions/example/lib/AuthLogin.pm';
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $modules = Bugzilla->hook_args->{modules};
|
||||
if (exists $modules->{Example}) {
|
||||
$modules->{Example} = 'extensions/example/lib/AuthVerify.pm';
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Elliotte Martin <elliotte_martin@yahoo.com>
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
|
||||
my $columns = Bugzilla->hook_args->{'columns'};
|
||||
push (@$columns, "delta_ts AS example")
|
|
@ -1,35 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is ITA Software
|
||||
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
# Bradley Baetz <bbaetz@acm.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
|
||||
# This code doesn't actually *do* anything, it's just here to show you
|
||||
# how to use this hook.
|
||||
my $args = Bugzilla->hook_args;
|
||||
my $bug = $args->{'bug'};
|
||||
my $timestamp = $args->{'timestamp'};
|
||||
|
||||
my $bug_id = $bug->id;
|
||||
# Uncomment this line to see a line in your webserver's error log whenever
|
||||
# you file a bug.
|
||||
# warn "Bug $bug_id has been filed!";
|
|
@ -1,56 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Everything Solved, Inc.
|
||||
# Portions created by Everything Solved are Copyright (C) 2008
|
||||
# Everything Solved, Inc. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
use Bugzilla::Status;
|
||||
|
||||
# This code doesn't actually *do* anything, it's just here to show you
|
||||
# how to use this hook.
|
||||
my $args = Bugzilla->hook_args;
|
||||
my $bug = $args->{'bug'};
|
||||
my $timestamp = $args->{'timestamp'};
|
||||
my $changes = $args->{'changes'};
|
||||
|
||||
foreach my $field (keys %$changes) {
|
||||
my $used_to_be = $changes->{$field}->[0];
|
||||
my $now_it_is = $changes->{$field}->[1];
|
||||
}
|
||||
|
||||
my $status_message;
|
||||
if (my $status_change = $changes->{'bug_status'}) {
|
||||
my $old_status = new Bugzilla::Status({ name => $status_change->[0] });
|
||||
my $new_status = new Bugzilla::Status({ name => $status_change->[1] });
|
||||
if ($new_status->is_open && !$old_status->is_open) {
|
||||
$status_message = "Bug re-opened!";
|
||||
}
|
||||
if (!$new_status->is_open && $old_status->is_open) {
|
||||
$status_message = "Bug closed!";
|
||||
}
|
||||
}
|
||||
|
||||
my $bug_id = $bug->id;
|
||||
my $num_changes = scalar keys %$changes;
|
||||
my $result = "There were $num_changes changes to fields on bug $bug_id"
|
||||
. " at $timestamp.";
|
||||
# Uncomment this line to see $result in your webserver's error log whenever
|
||||
# you update a bug.
|
||||
# warn $result;
|
|
@ -1,27 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Elliotte Martin <elliotte_martin@yahoo.com>
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
|
||||
my $fields = Bugzilla->hook_args->{'fields'};
|
||||
push (@$fields, "example")
|
|
@ -1,26 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
## The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Elliotte Martin <elliotte_martin@yahoo.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
|
||||
my $columns = Bugzilla->hook_args->{'columns'};
|
||||
$columns->{'example'} = { 'name' => 'bugs.delta_ts' , 'title' => 'Example' };
|
|
@ -1,27 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Elliotte Martin <elliotte_martin@yahoo.com>
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
|
||||
my $columns = Bugzilla->hook_args->{'columns'};
|
||||
push (@$columns, "example")
|
|
@ -1,25 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Bradley Baetz <bbaetz@acm.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $modules = Bugzilla->hook_args->{panel_modules};
|
||||
$modules->{Example} = "extensions::example::lib::ConfigExample";
|
|
@ -1,32 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $panels = Bugzilla->hook_args->{panels};
|
||||
|
||||
# Add the "Example" auth methods.
|
||||
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');
|
|
@ -1,26 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
# Bradley Baetz <bbaetz@acm.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $config = Bugzilla->hook_args->{config};
|
||||
$config->{Example} = "extensions::example::lib::ConfigExample";
|
|
@ -1,42 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Everything Solved, Inc.
|
||||
# Portions created by Everything Solved are Copyright (C) 2008
|
||||
# Everything Solved, Inc. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
use Bugzilla::Util qw(diff_arrays);
|
||||
|
||||
# This code doesn't actually *do* anything, it's just here to show you
|
||||
# how to use this hook.
|
||||
my $args = Bugzilla->hook_args;
|
||||
my ($bug, $timestamp, $old_flags, $new_flags) =
|
||||
@$args{qw(bug timestamp old_flags new_flags)};
|
||||
my ($removed, $added) = diff_arrays($old_flags, $new_flags);
|
||||
my ($granted, $denied) = (0, 0);
|
||||
foreach my $new_flag (@$added) {
|
||||
$granted++ if $new_flag =~ /\+$/;
|
||||
$denied++ if $new_flag =~ /-$/;
|
||||
}
|
||||
my $bug_id = $bug->id;
|
||||
my $result = "$granted flags were granted and $denied flags were denied"
|
||||
. " on bug $bug_id at $timestamp.";
|
||||
# Uncomment this line to see $result in your webserver's error log whenever
|
||||
# you update flags.
|
||||
# warn $result;
|
|
@ -1,28 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Elliotte Martin <elliotte_martin@yahoo.com>
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
|
||||
my $silent = Bugzilla->hook_args->{'silent'};
|
||||
|
||||
print "Install-before_final_checks hook\n" unless $silent;
|
|
@ -1,28 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Everything Solved, Inc.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2008
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $email = Bugzilla->hook_args->{email};
|
||||
# If you add a header to an email, it's best to start it with
|
||||
# 'X-Bugzilla-<Extension>' so that you don't conflict with
|
||||
# other extensions.
|
||||
$email->header_set('X-Bugzilla-Example-Header', 'Example');
|
|
@ -1,33 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2009
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
|
||||
my %args = %{ Bugzilla->hook_args };
|
||||
my ($vars, $page) = @args{qw(vars page_id)};
|
||||
|
||||
# You can see this hook in action by loading page.cgi?id=example.html
|
||||
if ($page eq 'example.html') {
|
||||
$vars->{cgi_variables} = { Bugzilla->cgi->Vars };
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/perl -w
|
||||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Testopia System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Greg Hendricks.
|
||||
# Portions created by Greg Hendricks are Copyright (C) 2008
|
||||
# Novell. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
|
||||
|
||||
use strict;
|
||||
|
||||
my $vars = Bugzilla->hook_args->{vars};
|
||||
|
||||
$vars->{'example'} = 1
|
|
@ -1,25 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Bug Tracking System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Everything Solved, Inc.
|
||||
# Portions created by Everything Solved, Inc. are Copyright (C) 2008
|
||||
# Everything Solved, Inc. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $error_map = Bugzilla->hook_args->{error_map};
|
||||
$error_map->{'example_my_error'} = 10001;
|
|
@ -1,25 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Bug Tracking System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Everything Solved, Inc.
|
||||
# Portions created by Everything Solved, Inc. are Copyright (C) 2007
|
||||
# Everything Solved, Inc. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Bugzilla;
|
||||
my $dispatch = Bugzilla->hook_args->{dispatch};
|
||||
$dispatch->{Example} = "extensions::example::lib::WSExample";
|
|
@ -1,41 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example WebService Plugin
|
||||
#
|
||||
# The Initial Developer of the Original Code is Everything Solved, Inc.
|
||||
# Portions created by Everything Solved, Inc. are Copyright (C) 2007
|
||||
# Everything Solved, Inc. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
# Colin Ogilvie <colin.ogilvie@gmail.com>
|
||||
|
||||
# This script does some code to return a hash about the Extension.
|
||||
# You are required to return a hash containing the Extension version
|
||||
# You can optionaally add any other values to the hash too, as long as
|
||||
# they begin with an x_
|
||||
#
|
||||
# Eg:
|
||||
# {
|
||||
# 'version' => '0.1', # required
|
||||
# 'x_name' => 'Example Extension'
|
||||
# }
|
||||
|
||||
use strict;
|
||||
no warnings qw(void); # Avoid "useless use of a constant in void context"
|
||||
use Bugzilla::Constants;
|
||||
|
||||
{
|
||||
'version' => BUGZILLA_VERSION,
|
||||
'x_blah' => 'Hello....',
|
||||
|
||||
};
|
|
@ -1,32 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical are Copyright (C) 2008 Canonical Ltd.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
package extensions::example::lib::AuthLogin;
|
||||
use strict;
|
||||
use base qw(Bugzilla::Auth::Login);
|
||||
use constant user_can_create_account => 0;
|
||||
use Bugzilla::Constants;
|
||||
|
||||
# Always returns no data.
|
||||
sub get_login_info {
|
||||
return { failure => AUTH_NODATA };
|
||||
}
|
||||
|
||||
1;
|
|
@ -1,31 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical are Copyright (C) 2008 Canonical Ltd.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
package extensions::example::lib::AuthVerify;
|
||||
use strict;
|
||||
use base qw(Bugzilla::Auth::Verify);
|
||||
use Bugzilla::Constants;
|
||||
|
||||
# A verifier that always fails.
|
||||
sub check_credentials {
|
||||
return { failure => AUTH_NO_SUCH_USER };
|
||||
}
|
||||
|
||||
1;
|
|
@ -1,41 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
# Bradley Baetz <bbaetz@acm.org>
|
||||
|
||||
package extensions::example::lib::ConfigExample;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Bugzilla::Config::Common;
|
||||
|
||||
sub get_param_list {
|
||||
my ($class) = @_;
|
||||
|
||||
my @param_list = (
|
||||
{
|
||||
name => 'example_string',
|
||||
type => 't',
|
||||
default => 'EXAMPLE',
|
||||
},
|
||||
);
|
||||
return @param_list;
|
||||
}
|
||||
|
||||
1;
|
|
@ -1,32 +0,0 @@
|
|||
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Bug Tracking System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Everything Solved, Inc.
|
||||
# Portions created by Everything Solved, Inc. are Copyright (C) 2007
|
||||
# Everything Solved, Inc. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
|
||||
|
||||
package extensions::example::lib::WSExample;
|
||||
use strict;
|
||||
use warnings;
|
||||
use base qw(Bugzilla::WebService);
|
||||
use Bugzilla::Error;
|
||||
|
||||
# This can be called as Example.hello() from XML-RPC.
|
||||
sub hello { return 'Hello!'; }
|
||||
|
||||
sub throw_an_error { ThrowUserError('example_my_error') }
|
||||
|
||||
1;
|
|
@ -1,28 +0,0 @@
|
|||
[%#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Example Plugin.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Canonical Ltd.
|
||||
# Portions created by Canonical Ltd. are Copyright (C) 2008
|
||||
# Canonical Ltd. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Bradley Baetz <bbaetz@acm.org>
|
||||
#%]
|
||||
[%
|
||||
title = "Example Extension"
|
||||
desc = "Configure example extension"
|
||||
%]
|
||||
|
||||
[% param_descs = {
|
||||
example_string => "Example string",
|
||||
}
|
||||
%]
|
|
@ -1,12 +0,0 @@
|
|||
[%# Note that error messages should generally be indented four spaces, like
|
||||
# below, because when Bugzilla translates an error message into plain
|
||||
# text, it takes four spaces off the beginning of the lines.
|
||||
#
|
||||
# Note also that I prefixed my error name with "example", the name of my
|
||||
# extension, so that I wouldn't conflict with other error names in
|
||||
# Bugzilla or other extensions.
|
||||
#%]
|
||||
[% IF error == "example_my_error" %]
|
||||
[% title = "Example Error Title" %]
|
||||
This is the error message! It contains <em>some html</em>.
|
||||
[% END %]
|
|
@ -43,11 +43,6 @@ my $OPTIONAL_MODULES = [
|
|||
version => '1.06',
|
||||
feature => 'CSV Importing of test cases'
|
||||
},
|
||||
{
|
||||
package => 'GD-Graph3d',
|
||||
module => 'GD::Graph3d',
|
||||
version => '0.63'
|
||||
},
|
||||
{
|
||||
package => 'XML Schema Validator',
|
||||
module => 'XML::Validator::Schema',
|
||||
|
|
|
@ -1,22 +1,6 @@
|
|||
[%# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Bug Tracking System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape Communications
|
||||
# Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
|
||||
# Akamai Technologies <bugzilla-dev@akamai.com>
|
||||
[%# Edit incoming address field mapping for email_in.pl
|
||||
# License: Dual-license GPL 3.0+ or MPL 1.1+
|
||||
# Contributor(s): Vitaliy Filippov <vitalif@mail.ru>
|
||||
#%]
|
||||
|
||||
[% PROCESS global/header.html.tmpl
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[%# License: Dual-license GPL 3.0+ or MPL 1.1+
|
||||
# Contributor(s): Vitaliy Filippov <vitalif@mail.ru> %]
|
||||
[%# Parameter descriptions for Integration config section
|
||||
# License: Dual-license GPL 3.0+ or MPL 1.1+
|
||||
# Contributor(s): Stas Fomin <stas-fomin@yandex.ru>, Vitaliy Filippov <vitalif@mail.ru> %]
|
||||
|
||||
[%
|
||||
title = "Integration config"
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
[%# 1.0@bugzilla.org %]
|
||||
[%# List "mail groups" (VERY specific to CustIS usage)
|
||||
# License: Dual-license GPL 3.0+ or MPL 1.1+
|
||||
# Contributor(s): Stas Fomin <stas-fomin@yandex.ru>, Vitaliy Filippov <vitalif@mail.ru>
|
||||
# %]
|
||||
|
||||
[%# INTERFACE:
|
||||
# users: list of user information (id, login_name, realname, disabledtext).
|
||||
|
@ -21,7 +24,6 @@
|
|||
Список этих групп и входящих в них пользователей представлен ниже:
|
||||
</p>
|
||||
|
||||
|
||||
[% columns =
|
||||
[{name => 'login_name'
|
||||
heading => 'Группа'
|
||||
|
|
Loading…
Reference in New Issue