ShadowDB.pm 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # -*- Mode: perl; indent-tabs-mode: nil -*-
  2. #
  3. # The contents of this file are subject to the Mozilla Public
  4. # License Version 1.1 (the "License"); you may not use this file
  5. # except in compliance with the License. You may obtain a copy of
  6. # the License at http://www.mozilla.org/MPL/
  7. #
  8. # Software distributed under the License is distributed on an "AS
  9. # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  10. # implied. See the License for the specific language governing
  11. # rights and limitations under the License.
  12. #
  13. # The Original Code is the Bugzilla Bug Tracking System.
  14. #
  15. # The Initial Developer of the Original Code is Netscape Communications
  16. # Corporation. Portions created by Netscape are
  17. # Copyright (C) 1998 Netscape Communications Corporation. All
  18. # Rights Reserved.
  19. #
  20. # Contributor(s): Terry Weissman <terry@mozilla.org>
  21. # Dawn Endico <endico@mozilla.org>
  22. # Dan Mosedale <dmose@mozilla.org>
  23. # Joe Robins <jmrobins@tgix.com>
  24. # Jacob Steenhagen <jake@bugzilla.org>
  25. # J. Paul Reed <preed@sigkill.com>
  26. # Bradley Baetz <bbaetz@student.usyd.edu.au>
  27. # Joseph Heenan <joseph@heenan.me.uk>
  28. # Erik Stambaugh <erik@dasbistro.com>
  29. # Frédéric Buclin <LpSolit@gmail.com>
  30. #
  31. package Bugzilla::Config::ShadowDB;
  32. use strict;
  33. use Bugzilla::Config::Common;
  34. $Bugzilla::Config::ShadowDB::sortkey = "13";
  35. sub get_param_list {
  36. my $class = shift;
  37. my @param_list = (
  38. {
  39. name => 'shadowdbhost',
  40. type => 't',
  41. default => '',
  42. },
  43. {
  44. name => 'shadowdbport',
  45. type => 't',
  46. default => '3306',
  47. checker => \&check_numeric,
  48. },
  49. {
  50. name => 'shadowdbsock',
  51. type => 't',
  52. default => '',
  53. },
  54. # This entry must be _after_ the shadowdb{host,port,sock} settings so that
  55. # they can be used in the validation here
  56. {
  57. name => 'shadowdb',
  58. type => 't',
  59. default => '',
  60. checker => \&check_shadowdb
  61. } );
  62. return @param_list;
  63. }
  64. 1;