Commit 1be3bcb6 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Additional removal of code to kill VOOT support.

parent 9826bd0d
[%#
- The types 'intern_error', 'user_error', 'authorization_reject' are no longer
supported. Use delivery_status_notification.tt2.
- The type 'plugin' is no longer supported. Use user_notification.tt2.
- The type 'plugin' was deprecated.
~%]
Subject: [% FILTER qencode %][%|loc%]Message distribution[%END%][%END%]
......
......@@ -72,15 +72,6 @@ Subject: [% request.action %]
[%|loc%]No action is needed on your side.[%END%]
[% ELSIF type == 'plugin' -%]
[%- TRY -%][%- INCLUDE $entry -%]
[%- CATCH -%]
Subject: [%FILTER qencode%][%|loc%]report message error on plugin[%END%][%END%]
ENTRY=[% entry %]
ERROR=[% error %]
[% END -%]
[% ELSE -%]
Subject: [% FILTER qencode %][%list.name%] / [%type%][%END%]
......
......@@ -103,12 +103,10 @@ my %options;
 
my $sympa_conf_file = Sympa::Constants::CONFIG;
 
# Used via the Sympa::Plugin interface
our $list;
our $param = {};
our $robot_id;
our $session;
our $plugins;
 
my $robot;
my $cookie_domain;
......@@ -133,11 +131,6 @@ $log->{level} = $Conf::Conf{'log_level'};
$log->openlog($Conf::Conf{'log_facility'} || $Conf::Conf{'syslog'},
$Conf::Conf{'log_socket_type'});
 
## Start plugins
if (eval "require Sympa::Plugin::Manager") {
$plugins = Sympa::Plugin::Manager->new(application => 'website');
}
Sympa::Alarm->instance->{use_bulk} = 1;
 
# hash of all the description files already loaded
......@@ -1021,10 +1014,6 @@ $language->set_lang($Conf::Conf{'lang'}, 'en');
#FIXME: Is it really required?
Sympa::DatabaseManager->instance;
 
# Now, load all components which are implemented as plugins. Those will
# add fields to above configuration and may do database upgrades.
$plugins->start if $plugins;
## Check that the data structure is uptodate
## If not, set the web interface to maintenance mode
my $maintenance_mode;
......@@ -1277,12 +1266,6 @@ while ($query = CGI::Fast->new) {
$session = Sympa::WWW::Session->new($robot, {});
}
 
# Retreive oauth_token from session if it exists and if we have a (newly)
# identified user
my $oauth_token = $session->{'oauth_token'} || '';
$in{'oauth_token'} = delete $session->{'oauth_token'}
if $oauth_token ne '' && $session->{'email'} ne 'nobody';
# Generate session-specific CSRF token
if (not defined($session->{'csrftoken'})) {
$session->{'csrftoken'} =
......@@ -1667,12 +1650,6 @@ while ($query = CGI::Fast->new) {
return 1;
};
 
# Store oauth_token in session if present and no user so that it
# will not be lost during login process
my $oauth_token = $in{'oauth_token'} || '';
$session->{'oauth_token'} = $oauth_token
if $oauth_token ne '' && $session->{'email'} eq 'nobody';
## store in session table this session contexte
$session->store();
 
......@@ -1777,7 +1754,6 @@ while ($query = CGI::Fast->new) {
 
my $template = Sympa::Template->new(
$list || $robot,
plugins => $plugins,
subdir => 'web_tt2',
lang => $param->{'lang'},
include_path => [@other_include_path]
......@@ -1827,7 +1803,6 @@ while ($query = CGI::Fast->new) {
 
my $template = Sympa::Template->new(
$list || $robot,
plugins => $plugins,
subdir => 'web_tt2',
lang => $param->{'lang'},
include_path => [@other_include_path]
......@@ -2466,15 +2441,10 @@ sub send_html {
}
}
 
## Available plugins, to switch on template fragments
$param_copy->{plugins} =
$plugins ? sub { $plugins->tt2Fragments(@_) } : sub { () };
# Now include locale paths (lang parameter).
my $template = Sympa::Template->new(
$list || $robot,
allow_absolute => $allow_absolute_path,
plugins => $plugins,
subdir => 'web_tt2',
lang => $param->{'lang'},
include_path => [@other_include_path]
......
......@@ -5773,20 +5773,7 @@ sub _load_list_members_from_include {
# If we can't synchronize, we make an array with excluded sources.
my $included;
if (my $plugin = $self->isPlugin($type)) {
my $source = $plugin->listSource;
if ($source->isAllowedToSync || $source_is_new) {
$log->syslog(debug => "syncing members from $type");
$included = $source->getListMembers(
users => \%users,
settings => $incl,
user_defaults => $self->get_default_user_options
);
defined $included
or push @errors,
{type => $type, name => $incl->{name}};
}
} elsif ($type eq 'include_sql_query') {
if ($type eq 'include_sql_query') {
my $db = Sympa::Database->new(
$incl->{'db_type'},
%$incl,
......@@ -6045,16 +6032,7 @@ sub _load_list_admin_from_include {
# get the list of admin users
# does it need to define a 'default_admin_user_option'?
my $included;
if (my $plugin = $self->isPlugin($type)) {
my $source = $plugin->listSource;
$log->syslog(debug => "syncing admins from $type");
$included = $source->getListMembers(
users => \%admin_users,
settings => $incl,
user_defaults => \%option,
admin_only => 1
);
} elsif ($type eq 'include_sql_query') {
if ($type eq 'include_sql_query') {
my $db = Sympa::Database->new(
$incl->{'db_type'},
%$incl,
......@@ -6623,11 +6601,6 @@ sub sync_include {
$errors_occurred = 1;
Sympa::send_notify_to_listmaster($self, 'sync_include_failed',
{'errors' => \@errors});
foreach my $e (@errors) {
my $plugin = $self->isPlugin($e->{type}) or next;
my $source = $plugin->listSource;
$source->reportListError($self, $e->{name});
}
return undef;
}
......@@ -9513,51 +9486,6 @@ sub _load_edit_list_conf {
return $conf;
}
=head2 Pluggin data-sources
=head3 $obj->includes(DATASOURCE, [NEW])
More abstract accessor for $list->include_DATASOURCE. It will return
a LIST of the data. You may pass a NEW single or ARRAY of values.
NOTE: As on this version accessor methods have not been implemented yet,
so $list->{'admin'}->{"include_DATASOURCE"}->(...) is used instead.
=cut
sub includes($;$) {
my $self = shift;
my $source = 'include_' . shift;
if (@_) {
my $data = ref $_[0] ? shift : [shift];
return $self->{'admin'}->{$source}->($data);
}
@{$self->{'admin'}{$source} || []};
}
=head3 $class->registerPlugin(CLASS)
CLASS must extend L<Sympa::Plugin::ListSource>
=cut
# We have own plugin administration, not using the Sympa::Plugin::Manager
# until all 'include_' labels are abstracted out into objects.
my %plugins;
sub registerPlugin($$) {
my ($class, $impl) = @_;
my $source = 'include_' . $impl->listSourceName;
push @sources_providing_listmembers, $source;
$plugins{$source} = $impl;
}
=head3 $obj->isPlugin(DATASOURCE)
=cut
sub isPlugin($) { $plugins{$_[1]} }
###### END of the List package ######
1;
......
......@@ -381,9 +381,6 @@ sub parse {
my %options = @_;
my @include_path;
if ($self->{plugins}) {
push @include_path, @{$self->{plugins}->tt2Paths || []};
}
if (defined $self->{context}) {
push @include_path,
@{Sympa::get_search_path($self->{context}, %$self) || []};
......@@ -558,10 +555,6 @@ Reference to array containing additional template search paths.
I<Read only>.
Error occurred at the last execution of parse, or C<undef>.
=item {plugins}
TBD.
=item {subdir}, {lang}, {lang_only}
TBD.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment