diff options
author | Byron Jones <glob@mozilla.com> | 2015-02-03 09:07:11 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-02-03 09:07:11 +0100 |
commit | 5426a2b6d124b4d4a763db5bed7f5ba445d79c85 (patch) | |
tree | 578c4248b36f2bf2c382bae260b519ce854f86da /Bugzilla.pm | |
parent | 205a5d3c16f45c54eac12a84bb6bc0065ff49240 (diff) | |
download | bugzilla-5426a2b6d124b4d4a763db5bed7f5ba445d79c85.tar.gz bugzilla-5426a2b6d124b4d4a763db5bed7f5ba445d79c85.tar.xz |
Bug 1128832: don't create api_tokens when pointing to the shadow_db
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index 52a44e375..cd6cc7a37 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -574,6 +574,11 @@ sub switch_to_main_db { return $class->dbh_main; } +sub is_shadow_db { + my $class = shift; + return $class->request_cache->{dbh} != $class->dbh_main; +} + sub fields { my ($class, $criteria) = @_; $criteria ||= {}; |