388f4fadf4
FossilOrigin-Name: 8b23951e351627eddbb3a4520c4fe43015955ec4b32621416b6e144d6086a1e4
37 lines
742 B
Perl
37 lines
742 B
Perl
package account;
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Exporter 'import';
|
|
|
|
our @EXPORT = qw( account content_statuses );
|
|
|
|
use template_helpers 'to_template';
|
|
|
|
sub generate_account
|
|
{
|
|
my ($ssn, $data, $acct, $relationship, $content) = @_;
|
|
|
|
my %vars = (
|
|
prefix => '',
|
|
ssn => $ssn,
|
|
relationship => $relationship,
|
|
content => $content,
|
|
acct => $acct,
|
|
);
|
|
|
|
to_template(\%vars, \$data->{'account.tt'});
|
|
}
|
|
|
|
sub content_statuses
|
|
{
|
|
my ($ssn, $data, $acct, $relationship, $statuses) = @_;
|
|
|
|
my %vars = (
|
|
prefix => '',
|
|
ssn => $ssn,
|
|
acct => $acct,
|
|
);
|
|
|
|
generate_account($ssn, $data, $acct, $relationship, to_template(\%vars, \$data->{'account_statuses.tt'}));
|
|
}
|