'.
@@ -443,6 +447,7 @@ imscp_v1p1.xsd http://www.imsglobal.org/
if ($newpostsflag) {
$discussion .= '&previous='.$prevread;
}
+ $discussion .= &group_args($group);
$discussion .= '">'.&mt('Show all posts').' '.&mt('to display').' '.
$numhidden.' ';
if ($showunmark) {
@@ -457,39 +462,39 @@ imscp_v1p1.xsd http://www.imsglobal.org/
# Choose sort mechanism
my @showposts = ();
if ($sortposts eq 'descdate') {
- @showposts = (sort { $b <=> $a } keys %alldiscussion);
+ @showposts = (sort { $b <=> $a } keys(%alldiscussion));
} elsif ($sortposts eq 'thread') {
- @showposts = (sort { $a <=> $b } keys %alldiscussion);
+ @showposts = (sort { $a <=> $b } keys(%alldiscussion));
} elsif ($sortposts eq 'subject') {
- foreach (sort keys %subjectsort) {
- push @showposts, @{$subjectsort{$_}};
+ foreach my $key (sort(keys(%subjectsort))) {
+ push(@showposts, @{$subjectsort{$key}});
}
} elsif ($sortposts eq 'username') {
- foreach my $domain (sort keys %usernamesort) {
- foreach (sort keys %{$usernamesort{$domain}}) {
- push @showposts, @{$usernamesort{$domain}{$_}};
+ foreach my $domain (sort(keys(%usernamesort))) {
+ foreach my $key (sort(keys(%{$usernamesort{$domain}}))) {
+ push(@showposts, @{$usernamesort{$domain}{$key}});
}
}
} elsif ($sortposts eq 'lastfirst') {
- foreach my $last (sort keys %namesort) {
- foreach (sort keys %{$namesort{$last}}) {
- push @showposts, @{$namesort{$last}{$_}};
+ foreach my $last (sort(keys(%namesort))) {
+ foreach my $key (sort(keys(%{$namesort{$last}}))) {
+ push(@showposts, @{$namesort{$last}{$key}});
}
}
} else {
- @showposts = (sort { $a <=> $b } keys %alldiscussion);
+ @showposts = (sort { $a <=> $b } keys(%alldiscussion));
}
my $currdepth = 0;
my $firstidx = $alldiscussion{$showposts[0]};
- foreach (@showposts) {
+ foreach my $post (@showposts) {
unless (($sortposts eq 'thread') || (($sortposts eq '') && ($env{'environment.threadeddiscussion'})) || ($outputtarget eq 'export')) {
- $alldiscussion{$_} = $_;
+ $alldiscussion{$post} = $post;
}
- unless ( ($notshown{$alldiscussion{$_}} eq '1') || ($shown{$alldiscussion{$_}} == 0) ) {
+ unless ( ($notshown{$alldiscussion{$post}} eq '1') || ($shown{$alldiscussion{$post}} == 0) ) {
if ($outputtarget ne 'tex' && $outputtarget ne 'export') {
$discussion.="\n |