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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: AccidentalLangLinkFixer: * Some people like to put {{tag|noinclude|c}} on the same line as the last categoriy on Village pump pages. Don't count that as "accidental".
AnomieBOT (talk | contribs)
Updating published sources: AccidentalLangLinkFixer: * Prepare for category rename.
Line 31:
@ISA=qw/AnomieBOT::Task/;
 
my @categories = (
my $category= 'Category:Pages automatically checked for accidental language links';,
'Category:Pages automatically checked for incorrect links',
);
my $frequency=600; # minutes
 
Line 73 ⟶ 76:
$self->{'iter'}=$api->iterator(
generator => 'categorymembers',
gcmtitle => $category[ @categories ],
gcmlimit => 500,
prop => 'langlinks|categories',
Line 82 ⟶ 85:
}
while(my $pg=$self->{'iter'}->next){
my $category = $self->{'iter'}->iterval;
if(!$pg->{'_ok_'}){
$api->warn("Failed to retrieve page list for $category: ".$pg->{'error'}."\n");