summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorIsrael Madueme <purelogiq@gmail.com>2018-03-21 22:00:33 +0100
committerGitHub <noreply@github.com>2018-03-21 22:00:33 +0100
commit9356ed8882760e0b724db963a0dff8f8d1943450 (patch)
tree05fe383b3acae5e3d7f9ffcd6e380c8691726195 /Bugzilla
parent24eeb9e547d9a49838dea6c796ede1ce2bcbd5f3 (diff)
downloadbugzilla-9356ed8882760e0b724db963a0dff8f8d1943450.tar.gz
bugzilla-9356ed8882760e0b724db963a0dff8f8d1943450.tar.xz
Bug 1447669 - Add localconfig parameter for changing shadowdb user and pass
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB.pm9
-rw-r--r--Bugzilla/Install/Localconfig.pm8
2 files changed, 15 insertions, 2 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index ff75aa2cf..0dfa47c23 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -111,8 +111,13 @@ sub connect_shadow {
my $connect_params = dclone(Bugzilla->localconfig);
$connect_params->{db_host} = Bugzilla->get_param_with_override('shadowdbhost');
$connect_params->{db_name} = Bugzilla->get_param_with_override('shadowdb');
- $connect_params->{db_port} = Bugzilla->get_param_with_override('shadowport');
- $connect_params->{db_sock} = Bugzilla->get_param_with_override('shadowsock');
+ $connect_params->{db_port} = Bugzilla->get_param_with_override('shadowdbport');
+ $connect_params->{db_sock} = Bugzilla->get_param_with_override('shadowdbsock');
+
+ if ( Bugzilla->localconfig->{'shadowdb_user'} && Bugzilla->localconfig->{'shadowdb_pass'} ) {
+ $connect_params->{db_user} = Bugzilla->localconfig->{'shadowdb_user'};
+ $connect_params->{db_pass} = Bugzilla->localconfig->{'shadowdb_pass'};
+ }
return _connect($connect_params);
}
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm
index de2219f16..7a913358c 100644
--- a/Bugzilla/Install/Localconfig.pm
+++ b/Bugzilla/Install/Localconfig.pm
@@ -175,6 +175,14 @@ use constant LOCALCONFIG_VARS => (
name => 'inbound_proxies',
default => _migrate_param( 'inbound_proxies', '' ),
},
+ {
+ name => 'shadowdb_user',
+ default => '',
+ },
+ {
+ name => 'shadowdb_pass',
+ default => '',
+ }
);