Content deleted Content added
Updating published sources: General: * BREAKING CHANGE: $api->edittoken() now takes named parameters for parameters other than $page. * $api->edittoken() has two new options, to disable the shutoff or {{tl|bots}} checking. SourceUploader: * Add two m |
Updating published sources: General: * BREAKING CHANGE: And it's a big one: ** Data store changed from (binary) Storable to (readable) JSON. update-db.pl will change an existing database. This may affect the exact values storable in the permanent sto |
||
Line 101:
my $res;
$api->task('AutoAssessor2', 0, 10, qw/d::Util/);
# List of templates to assess in this task
Line 116 ⟶ 114:
);
if($res->{'code'} ne 'success'){
$
return 60;
}
Line 153 ⟶ 151:
$res=$api->query(%q1);
if($res->{'code'} ne 'success'){
$
return 60;
}
Line 173 ⟶ 171:
my $pageid=$page->{'pageid'};
my $title=$page->{'title'};
my $ns=$page->{'ns'};
Line 181 ⟶ 178:
if(($ns&1)==1){
# Talk page, ignore it.
$api->store
next;
}
Line 198 ⟶ 195:
}
$
# Ok, check the page
my $tok=$api->edittoken($talk, EditRedir => 1);
if($tok->{'code'} eq 'shutoff'){
$
return 300;
}
if($tok->{'code'} ne 'success'){
$
next;
}
Line 214 ⟶ 211:
# Get page text
my $intxt=$tok->{'revisions'}[0]{'*'};
my ($outtxt,$nowiki)=$
my $any=0;
my @found=();
$outtxt=$
my $name=shift;
my @params=@{shift()};
Line 275 ⟶ 272:
return "{{$oname|".join("|",@params)."}}";
});
$outtxt=$
# Need to edit?
Line 281 ⟶ 278:
$found[-1]='and '.$found[-1] if @found>1;
my $summary="Assessing ".join((@found>2)?', ':' ', @found)." per $req";
$
my $r=$api->edit($tok, $outtxt, $summary, 1, 1);
if($r->{'code'} ne 'success'){
$
next;
}
} else {
$
}
# Save checked revision
$api->store
# If we've been at it long enough, let another task have a
|