[bugzilla-gnome-org-extensions] developers: Fix whitespace issues
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-extensions] developers: Fix whitespace issues
- Date: Thu, 20 Nov 2014 22:04:04 +0000 (UTC)
commit 6cef94533635485565280c29abc76ad761449634
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sat Nov 8 13:50:11 2014 +0100
developers: Fix whitespace issues
Developers/Extension.pm | 29 +++++++------------
Developers/lib/Util.pm | 5 +--
.../en/default/hook/global/user-end.html.tmpl | 2 +-
3 files changed, 14 insertions(+), 22 deletions(-)
---
diff --git a/Developers/Extension.pm b/Developers/Extension.pm
index ef2cdf2..ac1c085 100644
--- a/Developers/Extension.pm
+++ b/Developers/Extension.pm
@@ -34,7 +34,7 @@ BEGIN {
*Bugzilla::User::is_developer = \&is_developer;
}
-# See the documentation of Bugzilla::Hook ("perldoc Bugzilla::Hook"
+# See the documentation of Bugzilla::Hook ("perldoc Bugzilla::Hook"
# in the bugzilla directory) for a list of all available hooks.
sub install_update_db {
my ($self, $args) = @_;
@@ -61,8 +61,7 @@ sub _migrate_gnome_developers {
sub object_end_of_create {
my ($self, $args) = @_;
-
- my $class = $args->{'class'};
+ my $class = $args->{'class'};
my $object = $args->{'object'};
if ($class->isa('Bugzilla::Product')) {
@@ -73,8 +72,8 @@ sub object_end_of_create {
sub _create_developer {
my $product = shift;
- # For every product in Bugzilla, create a group named like
- # "<product_name>_developers".
+ # For every product in Bugzilla, create a group named like
+ # "<product_name>_developers".
# Every developer in the product should be made a member of this group.
my $new_group = Bugzilla::Group->create({
name => $product->{'name'} . '_developers',
@@ -82,11 +81,11 @@ sub _create_developer {
isactive => 1,
isbuggroup => 1,
});
-
+
# The "<product name>_developers" group should be set to
# "MemberControl: Shown, OtherControl: Shown" in the product's group controls.
#
- # The "<product name>_developers" group should also be given editcomponents
+ # The "<product name>_developers" group should also be given editcomponents
# for the product.
my $dbh = Bugzilla->dbh;
$dbh->do('INSERT INTO group_control_map
@@ -124,26 +123,23 @@ sub _create_developer {
(group_id, product_id, entry, membercontrol,
othercontrol, canedit, editcomponents)
VALUES (?, ?, 0, ?, ?, 0, 0)',
- undef, ($dev_group->id, $product->id, CONTROLMAPSHOWN,
+ undef, ($dev_group->id, $product->id, CONTROLMAPSHOWN,
CONTROLMAPSHOWN));
}
-
sub object_before_delete {
my ($self, $args) = @_;
-
my $object = $args->{'object'};
# Note that this is a made-up class, for this example.
if ($object->isa('Bugzilla::Product')) {
my $id = $object->id;
_delete_developer($object);
- }
+ }
}
sub _delete_developer {
my $product = shift;
-
my $dbh = Bugzilla->dbh;
# Delete this product's developer group and its members
@@ -151,7 +147,7 @@ sub _delete_developer {
if ($group) {
$dbh->do('DELETE FROM user_group_map WHERE group_id = ?',
undef, $group->id);
- $dbh->do('DELETE FROM group_group_map
+ $dbh->do('DELETE FROM group_group_map
WHERE grantor_id = ? OR member_id = ?',
undef, ($group->id, $group->id));
$dbh->do('DELETE FROM bug_group_map WHERE group_id = ?',
@@ -165,7 +161,6 @@ sub _delete_developer {
sub object_end_of_update {
my ($self, $args) = @_;
-
my ($object, $old_object, $changes) =
@$args{qw(object old_object changes)};
@@ -180,11 +175,11 @@ sub object_end_of_update {
sub _rename_developer {
my ($product, $old_product, $changes) = @_;
-
my $developer_group = new Bugzilla::Group(
{ name => $old_product->name . "_developers" });
my $new_group = new Bugzilla::Group(
{ name => $product->name . '_developers' });
+
if ($developer_group && !$new_group) {
$developer_group->set_name($product->name . "_developers");
$developer_group->set_description($product->name . " Developers");
@@ -192,7 +187,6 @@ sub _rename_developer {
}
}
-
sub developers {
my ($self) = @_;
@@ -206,7 +200,6 @@ sub developers {
return $self->{'developers'};
}
-
sub is_developer {
my ($self, $product) = @_;
@@ -221,7 +214,7 @@ sub is_developer {
return $self->in_group("developers") ? 1 : 0;
}
- return 0;
+ return 0;
}
__PACKAGE__->NAME;
diff --git a/Developers/lib/Util.pm b/Developers/lib/Util.pm
index 77e879d..9e2d8df 100644
--- a/Developers/lib/Util.pm
+++ b/Developers/lib/Util.pm
@@ -23,12 +23,11 @@ package Bugzilla::Extension::Developers::Util;
use strict;
use base qw(Exporter);
our @EXPORT = qw(
-
);
-# This file can be loaded by your extension via
+# This file can be loaded by your extension via
# "use Bugzilla::Extension::Developers::Util". You can put functions
# used by your extension in here. (Make sure you also list them in
# @EXPORT.)
-1;
\ No newline at end of file
+1;
diff --git a/Developers/template/en/default/hook/global/user-end.html.tmpl
b/Developers/template/en/default/hook/global/user-end.html.tmpl
index cefe88d..15da04e 100644
--- a/Developers/template/en/default/hook/global/user-end.html.tmpl
+++ b/Developers/template/en/default/hook/global/user-end.html.tmpl
@@ -14,7 +14,7 @@
# Portions created by the Initial Developer are Copyright (C) 2010
# the Initial Developer. All Rights Reserved.
#
- # Contributor(s):
+ # Contributor(s):
# Max Kanat-Alexander <mkanat bugzilla org>
#%]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]