diff options
author | ivan <ivan> | 2010-07-23 09:32:59 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-07-23 09:32:59 +0000 |
commit | abdb0f8539d8604b3e1ba6218e36a8717e96f88d (patch) | |
tree | 0e54fe4e00898d11b9e13ef75a93ba8efb31e009 /FS | |
parent | 75a2e8dbba40070ced5503457696baf5d538b953 (diff) |
consolidate four CGP timezone arrays, RT#7083
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/svc_CGPRule_Mixin.pm | 2 | ||||
-rw-r--r-- | FS/FS/svc_CGP_Mixin.pm | 110 | ||||
-rw-r--r-- | FS/FS/svc_acct.pm | 71 | ||||
-rw-r--r-- | FS/FS/svc_domain.pm | 71 | ||||
-rw-r--r-- | FS/MANIFEST | 2 |
5 files changed, 123 insertions, 133 deletions
diff --git a/FS/FS/svc_CGPRule_Mixin.pm b/FS/FS/svc_CGPRule_Mixin.pm index 45015806c..cf2eca76c 100644 --- a/FS/FS/svc_CGPRule_Mixin.pm +++ b/FS/FS/svc_CGPRule_Mixin.pm @@ -22,7 +22,7 @@ This is a mixin class for svc_ classes that can have Communigate Pro rules =over 4 -=item +=item cgp_rule Returns the rules associated with this service, as FS::cgp_rule objects. diff --git a/FS/FS/svc_CGP_Mixin.pm b/FS/FS/svc_CGP_Mixin.pm new file mode 100644 index 000000000..adde61fe2 --- /dev/null +++ b/FS/FS/svc_CGP_Mixin.pm @@ -0,0 +1,110 @@ +package FS::svc_CGP_Mixin; + +use strict; + +=head1 NAME + +FS::svc_CGP_Mixin - Mixin class for svc_classes which can be related to cgp_rule + +=head1 SYNOPSIS + +package FS::svc_table; +use base qw( FS::svc_CGP_Mixin FS::svc_Common ); + +=head1 DESCRIPTION + +This is a mixin class for svc_ classes that are exported to Communigate Pro. + +It currently contains timezone data for domains and accounts. + +=head1 METHODS + +=over 4 + +=item cgp_timezone + +Returns an arrayref of Communigate time zones. + +=cut + +#http://www.communigate.com/pub/client/TimeZones.data +#http://www.communigate.com/cgatepro/WebMail.html#Settings + +sub cgp_timezone { + #my $self = shift; #i'm used as a class and object method but just return data + + [ '', + 'HostOS', + '(+0100) Algeria/Congo', + '(+0200) Egypt/South Africa', + '(+0300) Saudi Arabia', + '(+0400) Oman', + '(+0500) Pakistan', + '(+0600) Bangladesh', + '(+0700) Thailand/Vietnam', + '(+0800) China/Malaysia', + '(+0900) Japan/Korea', + '(+1000) Queensland', + '(+1100) Micronesia', + '(+1200) Fiji', + '(+1300) Tonga/Kiribati', + '(+1400) Christmas Islands', + '(-0100) Azores/Cape Verde', + '(-0200) Fernando de Noronha', + '(-0300) Argentina/Uruguay', + '(-0400) Venezuela/Guyana', + '(-0500) Haiti/Peru', + '(-0600) Central America', + '(-0700) Arisona', #Arizona? + '(-0800) Adamstown', + '(-0900) Marquesas Islands', + '(-1000) Hawaii/Tahiti', + '(-1100) Samoa', + 'Asia/Afghanistan', + 'Asia/India', + 'Asia/Iran', + 'Asia/Iraq', + 'Asia/Israel', + 'Asia/Jordan', + 'Asia/Lebanon', + 'Asia/Syria', + 'Australia/Adelaide', + 'Australia/East', + 'Australia/NorthernTerritory', + 'Europe/Central', + 'Europe/Eastern', + 'Europe/Moscow', + 'Europe/Western', + 'GMT (+0000)', + 'Newfoundland', + 'NewZealand/Auckland', + 'NorthAmerica/Alaska', + 'NorthAmerica/Atlantic', + 'NorthAmerica/Central', + 'NorthAmerica/Eastern', + 'NorthAmerica/Mountain', + 'NorthAmerica/Pacific', + 'Russia/Ekaterinburg', + 'Russia/Irkutsk', + 'Russia/Kamchatka', + 'Russia/Krasnoyarsk', + 'Russia/Magadan', + 'Russia/Novosibirsk', + 'Russia/Vladivostok', + 'Russia/Yakutsk', + 'SouthAmerica/Brasil', + 'SouthAmerica/Chile', + 'SouthAmerica/Paraguay', + ]; + +} + +=back + +=head1 BUGS + +=head1 SEE ALSO + +=cut + +1; diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 022a6c731..6aede58e8 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1,7 +1,8 @@ package FS::svc_acct; use strict; -use base qw( FS::svc_Domain_Mixin FS::svc_CGPRule_Mixin FS::svc_Common ); +use base qw( FS::svc_Domain_Mixin FS::svc_CGP_Mixin FS::svc_CGPRule_Mixin + FS::svc_Common ); use vars qw( $DEBUG $me $conf $skip_fuzzyfiles $dir_prefix @shells $usernamemin $usernamemax $passwordmin $passwordmax @@ -463,71 +464,9 @@ sub table_info { disable_select => 1, }, 'cgp_timezone' => { - label => 'Communigate time zone', - type => 'select', - select_list => [ '', - 'HostOS', - '(+0100) Algeria/Congo', - '(+0200) Egypt/South Africa', - '(+0300) Saudi Arabia', - '(+0400) Oman', - '(+0500) Pakistan', - '(+0600) Bangladesh', - '(+0700) Thailand/Vietnam', - '(+0800) China/Malaysia', - '(+0900) Japan/Korea', - '(+1000) Queensland', - '(+1100) Micronesia', - '(+1200) Fiji', - '(+1300) Tonga/Kiribati', - '(+1400) Christmas Islands', - '(-0100) Azores/Cape Verde', - '(-0200) Fernando de Noronha', - '(-0300) Argentina/Uruguay', - '(-0400) Venezuela/Guyana', - '(-0500) Haiti/Peru', - '(-0600) Central America', - '(-0700) Arisona', - '(-0800) Adamstown', - '(-0900) Marquesas Islands', - '(-1000) Hawaii/Tahiti', - '(-1100) Samoa', - 'Asia/Afghanistan', - 'Asia/India', - 'Asia/Iran', - 'Asia/Iraq', - 'Asia/Israel', - 'Asia/Jordan', - 'Asia/Lebanon', - 'Asia/Syria', - 'Australia/Adelaide', - 'Australia/East', - 'Australia/NorthernTerritory', - 'Europe/Central', - 'Europe/Eastern', - 'Europe/Moscow', - 'Europe/Western', - 'GMT (+0000)', - 'Newfoundland', - 'NewZealand/Auckland', - 'NorthAmerica/Alaska', - 'NorthAmerica/Atlantic', - 'NorthAmerica/Central', - 'NorthAmerica/Eastern', - 'NorthAmerica/Mountain', - 'NorthAmerica/Pacific', - 'Russia/Ekaterinburg', - 'Russia/Irkutsk', - 'Russia/Kamchatka', - 'Russia/Krasnoyarsk', - 'Russia/Magadan', - 'Russia/Novosibirsk', - 'Russia/Vladivostok', - 'Russia/Yakutsk', - 'SouthAmerica/Brasil', - 'SouthAmerica/Chile', - 'SouthAmerica/Paraguay', - ], + label => 'Communigate time zone', + type => 'select', + select_list => __PACKAGE__->cgp_timezone, disable_inventory => 1, disable_select => 1, }, diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index 8823c7741..8215380bb 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -1,7 +1,8 @@ package FS::svc_domain; use strict; -use base qw( FS::svc_Parent_Mixin FS::svc_CGPRule_Mixin FS::svc_Common ); +use base qw( FS::svc_Parent_Mixin FS::svc_CGP_Mixin FS::svc_CGPRule_Mixin + FS::svc_Common ); use vars qw( $whois_hack $conf @defaultrecords $soadefaultttl $soaemail $soaexpire $soamachine $soarefresh $soaretry @@ -219,71 +220,9 @@ sub table_info { disable_select => 1, }, 'acct_def_cgp_timezone' => { - label => 'Acct. default time zone', - type => 'select', - select_list => [ '', - 'HostOS', - '(+0100) Algeria/Congo', - '(+0200) Egypt/South Africa', - '(+0300) Saudi Arabia', - '(+0400) Oman', - '(+0500) Pakistan', - '(+0600) Bangladesh', - '(+0700) Thailand/Vietnam', - '(+0800) China/Malaysia', - '(+0900) Japan/Korea', - '(+1000) Queensland', - '(+1100) Micronesia', - '(+1200) Fiji', - '(+1300) Tonga/Kiribati', - '(+1400) Christmas Islands', - '(-0100) Azores/Cape Verde', - '(-0200) Fernando de Noronha', - '(-0300) Argentina/Uruguay', - '(-0400) Venezuela/Guyana', - '(-0500) Haiti/Peru', - '(-0600) Central America', - '(-0700) Arisona', - '(-0800) Adamstown', - '(-0900) Marquesas Islands', - '(-1000) Hawaii/Tahiti', - '(-1100) Samoa', - 'Asia/Afghanistan', - 'Asia/India', - 'Asia/Iran', - 'Asia/Iraq', - 'Asia/Israel', - 'Asia/Jordan', - 'Asia/Lebanon', - 'Asia/Syria', - 'Australia/Adelaide', - 'Australia/East', - 'Australia/NorthernTerritory', - 'Europe/Central', - 'Europe/Eastern', - 'Europe/Moscow', - 'Europe/Western', - 'GMT (+0000)', - 'Newfoundland', - 'NewZealand/Auckland', - 'NorthAmerica/Alaska', - 'NorthAmerica/Atlantic', - 'NorthAmerica/Central', - 'NorthAmerica/Eastern', - 'NorthAmerica/Mountain', - 'NorthAmerica/Pacific', - 'Russia/Ekaterinburg', - 'Russia/Irkutsk', - 'Russia/Kamchatka', - 'Russia/Krasnoyarsk', - 'Russia/Magadan', - 'Russia/Novosibirsk', - 'Russia/Vladivostok', - 'Russia/Yakutsk', - 'SouthAmerica/Brasil', - 'SouthAmerica/Chile', - 'SouthAmerica/Paraguay', - ], + label => 'Acct. default time zone', + type => 'select', + select_list => __PACKAGE__->cgp_timezone, disable_inventory => 1, disable_select => 1, }, diff --git a/FS/MANIFEST b/FS/MANIFEST index 7685f85f9..1b2e08df8 100644 --- a/FS/MANIFEST +++ b/FS/MANIFEST @@ -526,3 +526,5 @@ FS/cust_tag.pm t/cust_tag.t FS/part_tag.pm t/part_tag.t +FS/svc_CGP_Mixin.pm +FS/svc_CGPRule_Mixin.pm |