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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: RedirectBypasser: * More skiplist entries.
AnomieBOT (talk | contribs)
Updating published sources: RedirectBypasser: * Bug 5382 strikes again! Purge to update links tables to avoid false positives.
Line 194:
}
} else {
$api->warn("Cannot# findPurge, redirectsthanks into $p->{title}\n");bug 5382
$res=$api->query(action=>'purge', titles=>$p->{'title'}, forcelinkupdate=>1);
$self->{'err'}{$p->{'title'}}="cannot find redirects; they are probably template-generated or oddly formatted";
if($res->{'code'} ne 'success'){
$self->{'noerr'}=1;
next;
}
# Now check links again
$res=$api->query(titles=>$p->{'title'}, prop=>'links', pllimit=>'max', pltitles=>$iter->iterval);
$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";
}
next;
}