Commit ba87af0f authored by sikeda's avatar sikeda
Browse files

[dev] These functions were moved to new Sympa module:

- best_language
- compute_auth
- get_search_path
- get_supported_languages
- request_auth
- search_fullpath
- send_dsn
- send_file
- send_notify_to_listmaster

This change may help merger work with trunk.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12048 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 5d37e574
......@@ -10,6 +10,7 @@ use JSON qw/decode_json/;
use List::Util qw/first/;
# Sympa modules
use Sympa;
use tools;
use Sympa::Plugin::Util qw/:log reporter/;
use Sympa::VOOT::Consumer ();
......@@ -86,7 +87,7 @@ sub init($)
$args->{website} ||= 'Sympa::VOOT::Website';
$self->SUPER::init($args);
my $config = $args->{config} || tools::search_fullpath('*', 'voot.conf');
my $config = $args->{config} || Sympa::search_fullpath('*', 'voot.conf');
if(ref $config eq 'HASH')
{ $self->{SV_config} = $config;
......
......@@ -60,6 +60,7 @@ use Time::Local qw();
use Data::Dumper; # tentative
BEGIN { eval 'use Crypt::OpenSSL::X509'; }
 
use Sympa;
use Sympa::Admin;
use Sympa::Alarm;
use Sympa::Archive;
......@@ -1015,7 +1016,7 @@ while ($query = new_loop()) {
undef $session;
 
$log->{level} = $Conf::Conf{'log_level'};
$language->set_lang(tools::best_language('*'));
$language->set_lang(Sympa::best_language('*'));
 
## Empty cache of the List.pm module
Sympa::List::init_list_cache();
......@@ -1295,7 +1296,7 @@ while ($query = new_loop()) {
# affected to another anonymous session.
undef $ENV{'HTTP_COOKIE'};
unless (defined $session) {
tools::send_notify_to_listmaster($robot,
Sympa::send_notify_to_listmaster($robot,
'failed_to_create_web_session', {});
wwslog('info', 'Failed to create session');
$session = Sympa::Session->new($robot, {});
......@@ -1580,7 +1581,7 @@ while ($query = new_loop()) {
my $lang_context = (ref $list eq 'Sympa::List') ? $list : $robot;
$param->{'lang'} =
$language->set_lang($session->{'lang'}, $user_lang,
tools::best_language($lang_context));
Sympa::best_language($lang_context));
# compatibility concern: old-style locale.
$param->{'locale'} =
Sympa::Language::lang2oldlocale($param->{'lang'});
......@@ -1675,7 +1676,7 @@ while ($query = new_loop()) {
unless ($param->{'lang'}) {
my $user_lang = $param->{'user'}{'lang'} if $param->{'user'};
$param->{'lang'} =
$language->set_lang($user_lang, tools::best_language($robot));
$language->set_lang($user_lang, Sympa::best_language($robot));
# compatibility: 6.1.
$param->{'lang_tag'} = $param->{'lang'};
}
......@@ -1805,7 +1806,7 @@ while ($query = new_loop()) {
## Available languages
$param->{'languages'} = {};
$language->push_lang();
foreach my $lang (tools::get_supported_languages($robot)) {
foreach my $lang (Sympa::get_supported_languages($robot)) {
next unless $lang = $language->set_lang($lang);
$param->{'languages'}{$lang}{'complete'} = $language->native_name
|| $lang;
......@@ -1902,7 +1903,7 @@ while ($query = new_loop()) {
unless ($template->parse($param, 'rss.tt2', \*STDOUT)) {
my $error = $template->{last_error};
$param->{'tt2_error'} = $error;
tools::send_notify_to_listmaster($robot, 'web_tt2_error',
Sympa::send_notify_to_listmaster($robot, 'web_tt2_error',
[$error]);
}
} elsif ($ajax) {
......@@ -1929,7 +1930,7 @@ while ($query = new_loop()) {
unless ($template->parse($param, 'ajax.tt2', \*STDOUT)) {
my $error = $template->{last_error};
$param->{'tt2_error'} = $error;
tools::send_notify_to_listmaster($robot, 'web_tt2_error',
Sympa::send_notify_to_listmaster($robot, 'web_tt2_error',
[$error]);
}
# close FILE;
......@@ -2849,7 +2850,7 @@ sub send_html {
}
 
# per-locale CSS.
if (tools::search_fullpath(
if (Sympa::search_fullpath(
$list || $robot, 'css.tt2',
subdir => 'web_tt2',
lang => $param->{'lang'},
......@@ -2896,7 +2897,7 @@ sub send_html {
# "Not Found" response for random help page.
print "Status: 404 Not Found\n";
} else {
tools::send_notify_to_listmaster($robot, 'web_tt2_error',
Sympa::send_notify_to_listmaster($robot, 'web_tt2_error',
[$error]);
}
 
......@@ -3777,7 +3778,7 @@ sub do_login {
my $lang_context = (ref $list eq 'Sympa::List') ? $list : $robot;
$param->{'lang'} =
$language->set_lang($user->{'lang'},
tools::best_language($lang_context));
Sympa::best_language($lang_context));
$session->{'lang'} = $param->{'lang'};
}
# compatibility: old-style locale.
......@@ -4347,7 +4348,7 @@ sub is_ldap_user {
my $auth = shift; ## User email or UID
wwslog('debug2', '(%s)', $auth);
 
unless (tools::search_fullpath($robot, 'auth.conf')) {
unless (Sympa::search_fullpath($robot, 'auth.conf')) {
return undef;
}
 
......@@ -4651,7 +4652,7 @@ sub sendssopasswd {
if ($param->{'user'}{'password'} =~ /^init/);
 
#FIXME: check error
tools::send_file($robot, 'sendssopasswd', $email, $param);
Sympa::send_file($robot, 'sendssopasswd', $email, $param);
 
$param->{'email'} = $email;
web_db_log(
......@@ -4766,7 +4767,7 @@ sub do_requestpasswd {
}
if ($param->{'one_time_ticket'}) {
$param->{'login_error'} = 'ticket_sent';
unless (tools::send_file($robot, 'sendpasswd', $in{'email'}, $param))
unless (Sympa::send_file($robot, 'sendpasswd', $in{'email'}, $param))
{
wwslog('notice', 'Unable to send template "sendpasswd" to %s',
$in{'email'});
......@@ -6019,7 +6020,7 @@ sub do_subscribe {
$list->send_notify_to_owner(
'subrequest',
{ 'who' => $param->{'user'}{'email'},
'keyauth' => tools::compute_auth(
'keyauth' => Sympa::compute_auth(
$list, $param->{'user'}{'email'}, 'add'
),
'replyto' => Conf::get_robot_conf($robot, 'sympa'),
......@@ -6358,7 +6359,7 @@ sub do_subrequest {
$param->{'newuser'}{'escaped_email'} =
tools::escape_chars($param->{'newuser'}{'email'});
}
unless (tools::send_file($robot, 'sendpasswd', $in{'email'}, $param))
unless (Sympa::send_file($robot, 'sendpasswd', $in{'email'}, $param))
{
wwslog('notice', 'Unable to send template "sendpasswd" to %s',
$in{'email'});
......@@ -6428,7 +6429,7 @@ sub do_auto_signoff {
'ip' => $ip,
};
unless (
tools::send_file(
Sympa::send_file(
$robot, 'user_notification', $in{'email'}, $tt2_param
)
) {
......@@ -6466,7 +6467,7 @@ sub do_family_signoff_request {
'ip' => $ip,
};
unless (
tools::send_file(
Sympa::send_file(
$robot, 'user_notification', $in{'email'}, $tt2_param
)
) {
......@@ -6635,7 +6636,7 @@ sub unsubscribe {
$list->send_notify_to_owner(
'sigrequest',
{ 'who' => $param->{'user'}{'email'},
'keyauth' => tools::compute_auth(
'keyauth' => Sympa::compute_auth(
$list, $param->{'user'}{'email'}, 'del'
)
}
......@@ -6677,7 +6678,7 @@ sub unsubscribe {
}
 
unless (
tools::send_file($list, 'bye', $authenticated_email_address, {}))
Sympa::send_file($list, 'bye', $authenticated_email_address, {}))
{
wwslog('notice',
"Unable to send template 'bye' to $authenticated_email_address"
......@@ -6733,7 +6734,7 @@ sub do_sigrequest {
'email' => $in{'email'}
};
unless (
tools::send_file(
Sympa::send_file(
$robot, 'user_notification', $in{'email'}, $tt2_param
)
) {
......@@ -7441,7 +7442,7 @@ sub do_manage_template {
'reject_' . $escaped_template_path . '.tt2',
'', $list);
}
my $default_file = tools::search_fullpath($list || $robot,
my $default_file = Sympa::search_fullpath($list || $robot,
'reject.tt2', subdir => 'mail_tt2');
 
if ($in{'subaction'} eq 'save') {
......@@ -7551,7 +7552,7 @@ sub do_manage_template {
return undef;
}
 
my $default_file = tools::search_fullpath($list || $robot,
my $default_file = Sympa::search_fullpath($list || $robot,
'reject.tt2', subdir => 'mail_tt2');
 
unless (open(DEFAULT, $default_file)) {
......@@ -7922,7 +7923,7 @@ sub do_skinsedit {
unless ($css_template->parse($param, 'css.tt2', \*CSS)) {
my $error = $css_template->{last_error};
$param->{'tt2_error'} = $error;
tools::send_notify_to_listmaster($robot, 'web_tt2_error',
Sympa::send_notify_to_listmaster($robot, 'web_tt2_error',
[$error]);
wwslog('info', 'Error while installing %s', $css_file);
}
......@@ -8288,7 +8289,7 @@ sub do_del {
$email, $param->{'list'});
 
unless ($in{'quiet'}) {
unless (tools::send_file($list, 'removed', $email, {})) {
unless (Sympa::send_file($list, 'removed', $email, {})) {
wwslog('notice', 'Unable to send template "removed" to %s',
$email);
}
......@@ -8725,7 +8726,7 @@ sub do_d_install_shared {
 
my $sender = $desc_hash{'email'};
unless (
tools::send_file(
Sympa::send_file(
$list, 'd_install_shared', $sender, \%context
)
) {
......@@ -8775,7 +8776,7 @@ sub do_d_reject_shared {
$sender = $desc_hash{'email'};
 
unless (
tools::send_file(
Sympa::send_file(
$list, 'd_reject_shared', $sender, \%context
)
) {
......@@ -8899,7 +8900,7 @@ sub do_reject {
$context{'rejected_by'} = $param->{'user'}{'email'};
$context{'template_used'} = $in{'message_template'};
unless (
tools::send_file(
Sympa::send_file(
$list, $in{'message_template'}, #FIXME
$rejected_sender, \%context
)
......@@ -9460,7 +9461,7 @@ sub do_editfile {
 
## Look for the template
$param->{'filepath'} =
tools::search_fullpath($list || $robot, $file, subdir => $subdir);
Sympa::search_fullpath($list || $robot, $file, subdir => $subdir);
 
## There might be no matching file if default template not provided
## with Sympa
......@@ -9501,7 +9502,7 @@ sub do_editfile {
## Default for 'homepage' is 'info'
if (($in{'file'} eq 'homepage')
&& !$param->{'filepath'}) {
$param->{'filepath'} = tools::search_fullpath($list || $robot,
$param->{'filepath'} = Sympa::search_fullpath($list || $robot,
'info', subdir => $subdir);
}
} else {
......@@ -9525,12 +9526,12 @@ sub do_editfile {
## Look for the template
if ($file eq 'list_aliases.tt2') {
$param->{'filepath'} =
tools::search_fullpath($list || $robot, $file);
Sympa::search_fullpath($list || $robot, $file);
} else {
#my $lang = Conf::get_robot_conf($robot, 'lang');
#$file =~ s/\.tpl$/\.$lang\.tpl/;
 
$param->{'filepath'} = tools::search_fullpath($list || $robot,
$param->{'filepath'} = Sympa::search_fullpath($list || $robot,
$file, subdir => $subdir);
}
}
......@@ -11086,12 +11087,12 @@ sub do_install_pending_list {
my @listmasters = split /\s*,\s*/,
Conf::get_robot_conf($robot, 'listmaster');
if ($in{'status'} eq 'open') {
unless (tools::send_file($list, 'list_created', \@listmasters, {})) {
unless (Sympa::send_file($list, 'list_created', \@listmasters, {})) {
wwslog('notice',
'Unable to send template "list_created" to listmaster');
}
} elsif ($in{'status'} eq 'closed') {
unless (tools::send_file($list, 'list_rejected', \@listmasters, {})) {
unless (Sympa::send_file($list, 'list_rejected', \@listmasters, {})) {
wwslog('notice',
'Unable to send template "list_rejected" to listmaster');
}
......@@ -11104,7 +11105,7 @@ sub do_install_pending_list {
next unless ($i->{'email'});
if ($in{'status'} eq 'open') {
unless (
tools::send_file(
Sympa::send_file(
$list, 'list_created', $i->{'email'}, {}
)
) {
......@@ -11114,7 +11115,7 @@ sub do_install_pending_list {
}
} elsif ($in{'status'} eq 'closed') {
unless (
tools::send_file(
Sympa::send_file(
$list, 'list_rejected', $i->{'email'}, {}
)
) {
......@@ -11366,7 +11367,7 @@ sub do_create_list {
if ($param->{'create_action'} =~ /notify/) {
wwslog('info', 'Notify listmaster');
 
tools::send_notify_to_listmaster($list, 'request_list_creation',
Sympa::send_notify_to_listmaster($list, 'request_list_creation',
{'email' => $param->{'user'}{'email'}});
}
 
......@@ -20782,7 +20783,7 @@ sub do_change_email_request {
'to' => $in{'new_email'},
};
unless (
tools::send_file(
Sympa::send_file(
$robot, 'user_notification', $in{'new_email'}, $tt2_param
)
) {
......@@ -20911,7 +20912,7 @@ sub do_change_email {
my $admin_user = $list->get_list_admin($role, $old_email);
if ($admin_user->{'included'}) {
## Notify listmaster
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$list,
'failed_to_change_included_admin',
{ 'current_email' => $old_email,
......@@ -20955,7 +20956,7 @@ sub do_change_email {
}
## Notify listmasters that list owners/moderators email have changed
if (keys %updated_lists) {
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$robot,
'listowner_email_changed',
{ 'list' => $list,
......@@ -23411,7 +23412,7 @@ sub do_css {
unless ($css_template->parse($param, 'css.tt2', \*STDOUT)) {
my $error = $css_template->{last_error};
$param->{'tt2_error'} = $error;
tools::send_notify_to_listmaster($robot, 'web_tt2_error', [$error]);
Sympa::send_notify_to_listmaster($robot, 'web_tt2_error', [$error]);
wwslog('info', '/%s: error', $in{'file'});
}
 
......@@ -23485,7 +23486,7 @@ sub do_wsdl {
wwslog('info', '');
 
my $sympawsdl;
unless ($sympawsdl = tools::search_fullpath($robot, 'sympa.wsdl')
unless ($sympawsdl = Sympa::search_fullpath($robot, 'sympa.wsdl')
and -r $sympawsdl) {
Sympa::Report::reject_report_web('intern', 'err_404', {},
$param->{'action'});
......@@ -23569,7 +23570,7 @@ sub _ca_get_file {
my $robot = shift;
my $list = shift;
 
my $file = tools::search_fullpath($list || $robot,
my $file = Sympa::search_fullpath($list || $robot,
$custom_action, subdir => 'custom_actions');
return undef unless ($file);
 
......@@ -24242,7 +24243,7 @@ sub do_automatic_lists_request {
wwslog('err',
'Failed to instantiate family %s. This family does not exist',
$in{'family'});
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$robot,
'automatic_list_creation_failed',
[ "Failed to instantiate family $in{'family'}. This family does not exist."
......@@ -24303,7 +24304,7 @@ sub do_automatic_lists {
$log->syslog('err',
"Failed to create the dynamic list $listname: family $family_name does not exist."
);
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$robot,
'automatic_list_creation_failed',
[ "Failed to create the dynamic list $listname: family $family_name does not exist."
......@@ -24322,7 +24323,7 @@ sub do_automatic_lists {
) {
$log->syslog('err', 'Failed to create the dynamic list %s',
$listname);
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$robot,
'automatic_list_creation_failed',
["Failed to create the dynamic list $listname."]
......
......@@ -31,6 +31,7 @@ use warnings;
use English qw(-no_match_vars);
use Storable;
use Sympa;
use Sympa::ConfDef;
use Sympa::Constants;
use Sympa::Language;
......@@ -805,7 +806,7 @@ sub checkfiles {
if (defined $Conf{'cafile'} && $Conf{'cafile'}) {
unless (-f $Conf{'cafile'} && -r $Conf{'cafile'}) {
$log->syslog('err', 'Cannot access cafile %s', $Conf{'cafile'});
tools::send_notify_to_listmaster('*', 'cannot_access_cafile',
Sympa::send_notify_to_listmaster('*', 'cannot_access_cafile',
[$Conf{'cafile'}]);
$config_err++;
}
......@@ -814,7 +815,7 @@ sub checkfiles {
if (defined $Conf{'capath'} && $Conf{'capath'}) {
unless (-d $Conf{'capath'} && -x $Conf{'capath'}) {
$log->syslog('err', 'Cannot access capath %s', $Conf{'capath'});
tools::send_notify_to_listmaster('*', 'cannot_access_capath',
Sympa::send_notify_to_listmaster('*', 'cannot_access_capath',
[$Conf{'capath'}]);
$config_err++;
}
......@@ -827,7 +828,7 @@ sub checkfiles {
'Error in config: queuebounce and bounce_path parameters pointing to the same directory (%s)',
$Conf{'queuebounce'}
);
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
'*',
'queuebounce_and_bounce_path_are_the_same',
[$Conf{'queuebounce'}]
......@@ -843,7 +844,7 @@ sub checkfiles {
'Error in config: queue and queueautomatic parameters pointing to the same directory (%s)',
$Conf{'queue'}
);
tools::send_notify_to_listmaster('*',
Sympa::send_notify_to_listmaster('*',
'queue_and_queueautomatic_are_the_same',
[$Conf{'queue'}]);
$config_err++;
......@@ -1231,7 +1232,7 @@ sub _load_auth {
sub load_charset {
my $charset = {};
my $config_file = tools::search_fullpath('*', 'charset.conf');
my $config_file = Sympa::search_fullpath('*', 'charset.conf');
return {} unless $config_file;
unless (open CONFIG, $config_file) {
......@@ -1263,7 +1264,7 @@ sub load_charset {
## load nrcpt file (limite receipient par domain
sub load_nrcpt_by_domain {
my $config_file = tools::search_fullpath('*', 'nrcpt_by_domain.conf');
my $config_file = Sympa::search_fullpath('*', 'nrcpt_by_domain.conf');
return unless $config_file;
my $line_num = 0;
......@@ -2171,7 +2172,7 @@ sub _load_single_robot_config {
$config_file);
unless (-r $config_file) {
$log->syslog('err', 'No read access on %s', $config_file);
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
'*',
'cannot_access_robot_conf',
[ "No read access on $config_file. you should change privileges on this file to activate this virtual host. "
......@@ -2462,7 +2463,7 @@ sub _store_source_file_name {
$param->{'config_hash'}{'source_file'} = $param->{'config_file'};
}
# FXIME:Use tools::search_fullpath().
# FXIME:Use Sympa::search_fullpath().
sub _get_config_file_name {
my $param = shift;
my $config_file;
......
......@@ -21,6 +21,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
nobase_modules_DATA = \
Sympa.pm \
Sympa/Admin.pm \
Sympa/Archive.pm \
Sympa/Auth.pm \
......@@ -90,6 +91,7 @@ nobase_modules_DATA = \
man3dir = $(mandir)/man3
man3ext = 3Sympa
MAN3PM = \
Sympa.pm \
Sympa/Alarm.pm \
Sympa/Bulk.pm \
Sympa/ConfDef.pm \
......
This diff is collapsed.
......@@ -42,6 +42,7 @@ use Encode qw();
use English qw(-no_match_vars);
use File::Copy qw();
use Sympa;
use Conf;
use Sympa::Constants;
use Sympa::Language;
......@@ -53,7 +54,6 @@ use Sympa::Robot;
use Sympa::Scenario;
use SDM;
use Sympa::Template;
use tools;
use Sympa::Tools::File;
use Sympa::User;
......@@ -222,7 +222,7 @@ sub create_list_old {
}
## Check the template supposed to be used exist.
my $template_file = tools::search_fullpath($robot, 'config.tt2',
my $template_file = Sympa::search_fullpath($robot, 'config.tt2',
subdir => 'create_list_templates/' . $list_tpl);
unless (defined $template_file) {
$log->syslog('err', 'No template %s found', $list_tpl);
......@@ -452,7 +452,7 @@ sub create_list {
}
## template file
my $template_file = tools::search_fullpath($family, 'config.tt2');
my $template_file = Sympa::search_fullpath($family, 'config.tt2');
unless (defined $template_file) {
$log->syslog('err', 'No config template from family %s@%s',
$family->{'name'}, $robot);
......@@ -543,7 +543,7 @@ sub create_list {
push @files_to_parse, $file;
}
for my $file (@files_to_parse) {
my $template_file = tools::search_fullpath($family, $file . ".tt2");
my $template_file = Sympa::search_fullpath($family, $file . ".tt2");
if (defined $template_file) {
my $file_content;
my $template =
......@@ -653,7 +653,7 @@ sub update_list {
}
## template file
my $template_file = tools::search_fullpath($family, 'config.tt2');
my $template_file = Sympa::search_fullpath($family, 'config.tt2');
unless (defined $template_file) {
$log->syslog('err', 'No config template from family %s@%s',
$family->{'name'}, $robot);
......@@ -719,7 +719,7 @@ sub update_list {
push @files_to_parse, $file;
}
for my $file (@files_to_parse) {
my $template_file = tools::search_fullpath($family, $file . ".tt2");
my $template_file = Sympa::search_fullpath($family, $file . ".tt2");
if (defined $template_file) {
my $file_content;
......@@ -906,7 +906,7 @@ sub rename_list {
# set list status to pending if creation list is moderated
if ($r_action =~ /listmaster/) {
$list->{'admin'}{'status'} = 'pending';
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$list,
'request_list_renaming',
{ 'new_listname' => $param{'new_listname'},
......@@ -1677,7 +1677,7 @@ sub change_user_email {
$list->get_list_admin($role, $in{'current_email'});
if ($admin_user->{'included'}) {
## Notify listmaster
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$list,
'failed_to_change_included_admin',
{ 'current_email' => $in{'current_email'},
......@@ -1714,7 +1714,7 @@ sub change_user_email {
}
## Notify listmasters that list owners/moderators email have changed
if (keys %updated_lists) {
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$robot_id,
'listowner_email_changed',
{ 'previous_email' => $in{'current_email'},
......
......@@ -31,10 +31,10 @@ use Digest::MD5 qw();
use Encode qw();
use HTML::Entities qw();
use Sympa;
use Conf;
use Sympa::Log;
use Sympa::Message;
use tools;
use Sympa::Tools::File;
my $log = Sympa::Log->instance;
......@@ -395,7 +395,7 @@ sub convert_single_message {
my $attachement_url = $opts{'attachement_url'};
my $mhonarc_ressources =
tools::search_fullpath($that, 'mhonarc-ressources.tt2');
Sympa::search_fullpath($that, 'mhonarc-ressources.tt2');
unless ($mhonarc_ressources) {
$log->syslog('notice', 'Cannot find any MhOnArc ressource file');
return undef;
......
......@@ -29,6 +29,7 @@ use warnings;
use Digest::MD5;
use POSIX qw();
use Sympa;
use Conf;
use Sympa::Database;
use Sympa::Log;
......@@ -211,7 +212,7 @@ sub ldap_authentication {
$log->syslog('debug2', '(%s, %s, %s)', $auth, '****', $whichfilter);
$log->syslog('debug3', 'Password used: %s', $pwd);
unless (tools::search_fullpath($robot, 'auth.conf')) {
unless (Sympa::search_fullpath($robot, 'auth.conf')) {
return undef;
}
......
......@@ -27,6 +27,7 @@ package Sympa::Commands;
use strict;
use warnings;
use Sympa;
use Sympa::Archive;
use Conf;
use Sympa::Language;
......@@ -193,7 +194,7 @@ sub help {
$data->{'subject'} = $language->gettext("User guide");
$data->{'auto_submitted'} = 'auto-replied';
unless (tools::send_file($robot, "helpfile", $sender, $data)) {
unless (Sympa::send_file($robot, "helpfile", $sender, $data)) {
$log->syslog('notice', 'Unable to send template "helpfile" to %s',
$sender);
Sympa::Report::reject_report_cmd('intern_quiet', '', {}, $cmd_line,
......@@ -247,7 +248,7 @@ sub lists {
unless (defined $action) {
my $error =
"Unable to evaluate scenario 'visibility' for list $l";
tools::send_notify_to_listmaster(
Sympa::send_notify_to_listmaster(
$list,
'intern_error',
{ 'error' => $error,
......@@ -269,7 +270,7 @@ sub lists {
$data->{'lists'} = $lists;
$data->{'auto_submitted'} = 'auto-replied';