Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
f6b4261e
Unverified
Commit
f6b4261e
authored
Dec 18, 2018
by
IKEDA Soji
Committed by
GitHub
Dec 18, 2018
Browse files
Merge pull request #504 from ikedas/unused_info_in_home by ikedas
WWSympa: Loading home page takes long time
parents
9f7e4d8a
934c9636
Changes
2
Hide whitespace changes
Inline
Side-by-side
default/Makefile.am
View file @
f6b4261e
...
...
@@ -314,7 +314,6 @@ nobase_default_DATA = \
web_tt2/modindex.tt2
\
web_tt2/my.tt2
\
web_tt2/nav.tt2
\
web_tt2/news.tt2
\
web_tt2/notice.tt2
\
web_tt2/picture_upload.tt2
\
web_tt2/pref.tt2
\
...
...
src/cgi/wwsympa.fcgi.in
View file @
f6b4261e
...
...
@@ -9946,77 +9946,6 @@ sub do_create_list_request {
sub do_home {
wwslog('info', '');
unless ($session->is_anonymous()) {
my @which_owner =
Sympa::List::get_which($param->{'user'}{'email'}, $robot,
'owner');
my @which_editor = Sympa::List::get_which($param->{'user'}{'email'},
$robot, 'editor');
my @which_member = Sympa::List::get_which($param->{'user'}{'email'},
$robot, 'member');
## Build the admin_summary variable that tells foreach list
## how many messages/subscriptions are awaiting moderation
foreach my $one_list (@which_owner, @which_editor) {
# skip already treated ones
next
if $param->{'admin_summary'}{$one_list->{'name'}};
my $mod_message =
Sympa::Spool::Moderation->new(context => $one_list)->size;
$param->{'admin_summary'}{$one_list->{'name'}}{'mod_message'} =
$mod_message
if $mod_message;
my $mod_subscription = Sympa::Spool::Auth->new(
context => $one_list,
action => 'add'
)->size;
$param->{'admin_summary'}{$one_list->{'name'}}{'mod_subscription'}
= $mod_subscription
if $mod_subscription;
my $mod_signoff = Sympa::Spool::Auth->new(
context => $one_list,
action => 'del'
)->size;
$param->{'admin_summary'}{$one_list->{'name'}}{'mod_signoff'} =
$mod_signoff
if $mod_signoff;
my $shared_doc = Sympa::WWW::SharedDocument->new($one_list);
my $mod_shared_total = $shared_doc->count_moderated_descendants;
$param->{'admin_summary'}{$one_list->{'name'}}{'mod_shared_total'}
= $mod_shared_total
if $mod_shared_total;
}
## Build the errors_summary variable, tells for a suscriber
## how many sending messages are in errors
foreach my $the_list (@which_member) {
# review all the lists
next if $param->{'errors_summary'}{$the_list->{'name'}};
my $user = $the_list->get_list_member($param->{'user'}{'email'});
$the_list->parse_list_member_bounce($user);
# if there is bounces put it in errors_summary
if ($user->{bounce_count}) {
$param->{'errors_summary'}{$the_list->{'name'}} = {
count => $user->{bounce_count},
first => $language->gettext_strftime(
"%d %b %Y", localtime($user->{first_bounce})
),
last => $language->gettext_strftime(
"%d %b %Y", localtime($user->{last_bounce})
),
type => $user->{bounce_class},
};
}
}
}
return 1;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment