From 7ff7db331d6af256a28d64f9e8a3bf995adfed99 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Tue, 13 Nov 2007 20:28:16 +0000 Subject: [PATCH] (NamespaceRcLines): Use StripRollbacks. --- modules/namespaces.pl | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/modules/namespaces.pl b/modules/namespaces.pl index e98c0161..932ef689 100644 --- a/modules/namespaces.pl +++ b/modules/namespaces.pl @@ -39,7 +39,7 @@ be changed using the C<$NamespacesSelf> option. =cut -$ModulesDescription .= '

$Id: namespaces.pl,v 1.35 2007/11/07 17:02:07 as Exp $

'; +$ModulesDescription .= '

$Id: namespaces.pl,v 1.36 2007/11/13 20:28:16 as Exp $

'; use vars qw($NamespacesMain $NamespacesSelf $NamespaceCurrent $NamespaceRoot $NamespaceSlashing); @@ -243,23 +243,8 @@ sub NamespaceRcLines { ($ts, $pagename, $minor, $summary, $host, $username, $rest) = split(/$FS/, $line); } - if (GetParam('all', 0) or GetParam('rollback', 0)) { # include rollbacks - # just strip the marker left by DoRollback() - for (my $i = @result; $i; $i--) { - my ($ts, $pagename) = split(/$FS/, $result[$i]); - splice(@result, $i, 1) if $pagename eq '[[rollback]]'; - } - } else { - my ($target, $end); - for (my $i = @result; $i; $i--) { - my ($ts, $pagename, $rest) = split(/$FS/, $result[$i]); - splice(@result, $i + 1, $end - $i), $target = 0 if $ts <= $target; - $target = $rest, $end = $i - if $pagename eq ($ns ? ($ns . ':') : '') . '[[rollback]]' - and (not $target or $rest < $target); # marker - } - } - return ($first, @result); + my $rollbacks = (GetParam('all', 0) or GetParam('rollback', 0)); + return ($first, StripRollbacks($rollbacks, @result)); } =head2 Encoding pagenames