User:AnomieBOT/source/tasks/RedirectBypasser.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: RedirectBypasser: * Bug 5382 strikes again! Purge to update links tables to avoid false positives.
AnomieBOT (talk | contribs)
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>.
 
(3 intermediate revisions by the same user not shown)
Line 83:
 
sub approved {
return -1;
}
 
Line 170:
}
 
my $intxt=$tok->{'revisions'}[0]{'slots'}{'main'}{'*'};
my ($outtxt,$nowiki)=$api->strip_nowiki($intxt);
 
Line 202:
# Now check links again
$res=$api->query(titles=>$p->{'title'}, prop=>'links', pllimit=>'max', pltitles=>$iter->iterval);
if($res->{'code'} ne 'success'){
# Problem resolved!$self->{'noerr'}=1;
} else { next;
}
$res=(values %{$res->{'query'}{'pages'}})[0]{'links'} // [];
if(grep $_->{'title'} eq $iter->iterval, @$res){
# Problem resolved!
} else {
$api->warn("Cannot find redirects in $p->{title}\n");
$self->{'err'}{$p->{'title'}}="cannot find redirects; they are probably template-generated or oddly formatted";
} else {
# Problem resolved!
}
next;