Skip to content

Commit f130a48

Browse files
authored
Merge branch 'master' into have-extension
2 parents a6cd1ba + 22f3a48 commit f130a48

File tree

28 files changed

+47
-36
lines changed

28 files changed

+47
-36
lines changed

Bugzilla/Install/DB.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4227,7 +4227,7 @@ sub _migrate_group_owners {
42274227
my $dbh = Bugzilla->dbh;
42284228
return if $dbh->bz_column_info('groups', 'owner_user_id');
42294229
$dbh->bz_add_column('groups', 'owner_user_id', {TYPE => 'INT3'});
4230-
my $nobody = Bugzilla::User->check('[email protected]');
4230+
my $nobody = Bugzilla::User->check(Bugzilla->localconfig->nobody_user);
42314231
$dbh->do('UPDATE groups SET owner_user_id = ?', undef, $nobody->id);
42324232
}
42334233

Bugzilla/Install/Localconfig.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ use constant LOCALCONFIG_VARS => (
9797
{name => 'memcached_namespace', default => "bugzilla:",},
9898
{name => 'urlbase', default => '',},
9999
{name => 'canonical_urlbase', lazy => 1},
100+
{name => 'nobody_user', default => '[email protected]'},
100101
{name => 'attachment_base', default => '',},
101102
{name => 'ses_username', default => '',},
102103
{name => 'ses_password', default => '',},

Bugzilla/Test/MockParams.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ sub import {
5454
$answers{user_info_class} //= 'GitHubAuth,CGI';
5555
$answers{user_verify_class} //= 'GitHubAuth,DB';
5656

57-
if ($first_time++) {
57+
if ($first_time++ == 0) {
5858
capture_merged {
5959
Bugzilla::Config::update_params();
6060
};
6161
}
6262
else {
6363
Bugzilla::Config::SetParam($_, $answers{$_}) for keys %answers;
64+
Bugzilla::Config::write_params();
6465
}
6566
}
6667

extensions/BMO/Extension.pm

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,8 @@ sub object_end_of_create {
972972
# Add default searches to new user's footer
973973
my $dbh = Bugzilla->dbh;
974974

975-
my $sharer = Bugzilla::User->new({name => '[email protected]'}) or return;
975+
my $sharer = Bugzilla::User->new({name => Bugzilla->localconfig->nobody_user})
976+
or return;
976977
my $group = Bugzilla::Group->new({name => 'everyone'}) or return;
977978

978979
foreach my $definition (@default_named_queries) {
@@ -1012,7 +1013,7 @@ sub _bug_reporters_hw_os {
10121013
sub _bug_is_unassigned {
10131014
my ($self) = @_;
10141015
my $assignee = $self->assigned_to->login;
1015-
return $assignee eq '[email protected]' || $assignee =~ /@(?!invalid).+\.bugs$/;
1016+
return $assignee eq Bugzilla->localconfig->nobody_user || $assignee =~ /@(?!invalid).+\.bugs$/;
10161017
}
10171018

10181019
sub _bug_has_current_patch {
@@ -1192,7 +1193,7 @@ sub object_start_of_update {
11921193

11931194
# and the assignee isn't a real person
11941195
return
1195-
unless $new_bug->assigned_to->login eq '[email protected]'
1196+
unless $new_bug->assigned_to->login eq Bugzilla->localconfig->nobody_user
11961197
|| $new_bug->assigned_to->login =~ /@(?!invalid).+\.bugs$/;
11971198

11981199
# and the user can set the status to NEW
@@ -1927,7 +1928,8 @@ sub _post_employee_incident_bug {
19271928
my ($investigate_bug, $ssh_key_bug);
19281929
my $old_user = Bugzilla->user;
19291930
eval {
1930-
Bugzilla->set_user(Bugzilla::User->new({name => '[email protected]'}));
1931+
Bugzilla->set_user(Bugzilla::User->new(
1932+
{name => Bugzilla->localconfig->nobody_user}));
19311933
my $new_user = Bugzilla->user;
19321934

19331935
# HACK: User needs to be in the editbugs and primary bug's group to allow

extensions/BMO/bin/bug_1093952.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
print "Press <Ctrl-C> to stop or <Enter> to continue...\n";
5656
getc();
5757

58-
my $nobody = Bugzilla::User->check({name => '[email protected]'});
58+
my $nobody = Bugzilla::User->check({name => Bugzilla->localconfig->nobody_user});
5959
my $field = Bugzilla::Field->check({name => 'status_whiteboard'});
6060
my $when = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
6161

extensions/BMO/bin/migrate-github-pull-requests.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use Bugzilla::Util qw(trim);
2424

2525
my $dbh = Bugzilla->dbh;
26-
my $nobody = Bugzilla::User->check({name => '[email protected]'});
26+
my $nobody = Bugzilla::User->check({name => Bugzilla->localconfig->nobody_user});
2727
my $field = Bugzilla::Field->check({name => 'attachments.mimetype'});
2828

2929
# grab list of suitable attachments

extensions/BMO/template/en/default/pages/group_admins.html.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
[% group.name FILTER html %]</span>
4242
</td>
4343
<td nowrap>
44-
[% IF group.owner.login == '[email protected]' %]
44+
[% IF group.owner.login == Bugzilla.localconfig.nobody_user %]
4545
&ndash;
4646
[% ELSE %]
4747
[% INCLUDE global/user.html.tmpl who = group.owner %]

extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# these are used in a few places
2121
is_cced = bug.cc.contains(user.login);
22-
unassigned = (bug.assigned_to.login == "[email protected]")
22+
unassigned = (bug.assigned_to.login == Bugzilla.localconfig.nobody_user)
2323
|| (bug.assigned_to.login.search('@(?!invalid).+\.bugs$'));
2424

2525
# custom fields that have custom rendering, or should not be rendered

extensions/ComponentWatching/Extension.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use Bugzilla::Util qw(detaint_natural trim);
2323
our $VERSION = '2';
2424

2525
use constant REQUIRE_WATCH_USER => 1;
26-
use constant DEFAULT_ASSIGNEE => '[email protected]';
2726

2827
use constant REL_COMPONENT_WATCHER => 15;
2928

@@ -100,7 +99,7 @@ sub template_before_create {
10099
sub template_before_process {
101100
my ($self, $args) = @_;
102101
return unless $args->{file} eq 'admin/components/create.html.tmpl';
103-
$args->{vars}{comp}{default_assignee}{login} = DEFAULT_ASSIGNEE;
102+
$args->{vars}{comp}{default_assignee}{login} = Bugzilla->localconfig->nobody_user;
104103
}
105104

106105
#

extensions/PhabBugz/lib/Util.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ sub get_bug_role_phids {
129129
}
130130

131131
sub is_bug_assigned {
132-
return $_[0]->assigned_to->email ne '[email protected]';
132+
return $_[0]->assigned_to->email ne Bugzilla->localconfig->nobody_user;
133133
}
134134

135135
sub is_attachment_phab_revision {

0 commit comments

Comments
 (0)