diff options
author | ivan <ivan> | 2009-09-24 19:59:58 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-09-24 19:59:58 +0000 |
commit | a6e423aa1070bde95bd2f55d656e9685e58de452 (patch) | |
tree | 3063bd0e6876f440d8ac77dac19912fc15192cf7 | |
parent | 25cf511573ebff303700ce71611450ad72debcbc (diff) |
get the ping username/pass from a config, good enough, RT#4610
-rw-r--r-- | FS/FS/Conf.pm | 14 | ||||
-rw-r--r-- | FS/FS/Cron/check.pm | 7 |
2 files changed, 18 insertions, 3 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index aa6a13321..09545720c 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -3004,6 +3004,20 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'sg-ping_username', + 'section' => '', + 'description' => "Don't use this.", + 'type' => 'text', + }, + + { + 'key' => 'sg-ping_password', + 'section' => '', + 'description' => "Don't use this.", + 'type' => 'text', + }, + + { 'key' => 'disable-cust-pkg_class', 'section' => 'UI', 'description' => 'Disable the two-step dropdown for selecting package class and package, and return to the classic single dropdown.', diff --git a/FS/FS/Cron/check.pm b/FS/FS/Cron/check.pm index b331014ab..b50140ca1 100644 --- a/FS/FS/Cron/check.pm +++ b/FS/FS/Cron/check.pm @@ -47,14 +47,14 @@ sub check_selfservice { sub check_sg { my $conf = new FS::Conf; + #different trigger if they ever stop using multicustomer_hack ? return 1 unless $conf->exists('sg-multicustomer_hack'); my $ua = new LWP::UserAgent; $ua->agent("FreesideCronCheck/0.1 " . $ua->agent); - #XXX shiiiiit. - my $USER = ''; - my $PASS = ''; + my $USER = $conf->config('sg-ping_username'); + my $PASS = $conf->config('sg-ping_password'); my $req = new HTTP::Request GET=>"https://$USER:$PASS\@localhost/sg/ping.cgi"; my $res = $ua->request($req); @@ -68,6 +68,7 @@ sub check_sg { sub check_sgng { my $conf = new FS::Conf; + #different trigger if they ever stop using multicustomer_hack ? return 1 unless $conf->exists('sg-multicustomer_hack'); eval 'use RPC::XML; use RPC::XML::Client;'; |