Content deleted Content added
Updating published sources: TemplateUnsubstifier: * Add some sanity checks to avoid trying to unsubstify redirects. Although there's no way that should be happening in the first place... |
Updating published sources: General: * Update for the addition of 'rvslots'. DatedCategoryDeleterTest: * Disable. It's clear that task won't be needed. BrokenRedirectDeleter: * Handle pages with newlines before the <code>#REDIRECT</code>. |
||
(One intermediate revision by the same user not shown) | |||
Line 87:
prop => 'revisions',
rvprop => 'ids|timestamp|content',
rvslots => 'main',
rvlimit => 1,
);
Line 103 ⟶ 104:
return $t if $t > 0;
}
my $txt = $res->{'slots'}{'main'}{'*'};
$txt = $api->strip_nowiki($txt);
$txt =~ s/_/ /g;
Line 153 ⟶ 154:
prop => 'revisions',
rvprop => 'ids|content',
rvslots => 'main',
rvlimit => 1,
);
Line 162 ⟶ 164:
my $pageid = $res->{'pageid'};
my $revid = $res->{'revisions'}[0]{'revid'};
my $intxt = $res->{'revisions'}[0]{'slots'}{'main'}{'*'};
(my $name = $title) =~ s/^Template://;
my $outtxt = undef;
Line 259 ⟶ 261:
my $params = shift;
$name =~ s!<includeonly>safesubst:</includeonly>!!;
$name =~ s!\{\{\{\|safesubst:\}\}\}!!;
return undef unless $name =~ /^\s*[iI]fsubst\s*$/;
foreach ($api->process_paramlist(@$params)) {
Line 287 ⟶ 289:
$name =~ s!^<includeonly>(?:safe)?subst:</includeonly>!!i;
$name =~ s!^\{\{\{\|(?:safe)?subst:\}\}\}!!i;
$name =~ s!^(?:safe)?subst:!!i;
return undef unless $name =~ /^\s*[uU]nsubst\s*$/;
|