projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FS RT #30363 - Hide Account usage template output in an HTML comment when $hide_usage...
[freeside.git]
/
FS
/
bin
/
freeside-fetch
diff --git
a/FS/bin/freeside-fetch
b/FS/bin/freeside-fetch
index
89a4f29
..
c1ab783
100755
(executable)
--- a/
FS/bin/freeside-fetch
+++ b/
FS/bin/freeside-fetch
@@
-1,4
+1,4
@@
-#!/usr/bin/perl -
T
w
+#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use strict;
use LWP::UserAgent;
@@
-35,14
+35,18
@@
foreach my $employee (@employees) {
};
my $ua = new LWP::UserAgent;
};
my $ua = new LWP::UserAgent;
+ $ua->timeout(1800); #30m, some reports can take a while
$ua->agent("FreesideFetcher/0.1 " . $ua->agent);
my $req = new HTTP::Request GET => $url;
my $res = $ua->request($req);
$ua->agent("FreesideFetcher/0.1 " . $ua->agent);
my $req = new HTTP::Request GET => $url;
my $res = $ua->request($req);
+ my $conf = new FS::Conf;
+ my $subject = $conf->config('email_report-subject') || 'Freeside report';
+
my %options = ( 'from' => $email_address,
'to' => $email_address,
my %options = ( 'from' => $email_address,
'to' => $email_address,
- 'subject' =>
'subject'
,
+ 'subject' =>
$subject
,
'body' => $res->content,
);
'body' => $res->content,
);
@@
-75,7
+79,7
@@
freeside-fetch - Send a freeside page to a list of employees.
Fetches a web page specified by url as if employee and emails it to
employee. Useful when run out of cron to send freeside web pages.
Fetches a web page specified by url as if employee and emails it to
employee. Useful when run out of cron to send freeside web pages.
- user: Fr
om the mapsecrets file - a user with access to the freeside database
+ user: Fr
eeside user
employee: the username of an employee to receive the emailed page. May be a comma separated list
employee: the username of an employee to receive the emailed page. May be a comma separated list