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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: SourceUploader: * Complain if the edit notices for the shutoff pages are not set up correctly.
AnomieBOT (talk | contribs)
Updating published sources: SourceUploader: * Change to use AnomieBOT::API::Iterator, due to gerrit:8407.
Line 295:
 
if($self->{'loadexisting'}){
my %q$iter=$api->iterator(
list => 'allpages',
apprefix => $api->user.'/source',
Line 303:
 
my ($k,$v,$k2,$v2,@x);
my while($res;_=$iter->next){
do if(!$_->{'_ok_'}){
$res= $api->querywarn(%q"Failed to retrieve source tree: ".$_->{'error'}."\n");
if($res->{'code'} ne 'success'){
$api->warn("Failed to retrieve source tree: ".$res->{'error'}."\n");
return 300;
}
if(exists$v2=substr($res_->{'query-continuetitle'}, length($src)){;
if(!exists($q{'apfrom'}=$resself->{'query-continuepages'}{'allpages'$v2})){'apfrom'};
if( $resself->{'codepages'} ne {$v2}='success'){;
push @keys, $v2;
}
}
foreach (@{$res->{'query'}{'allpages'}}){
$v2=substr($_->{'title'}, length($src));
if(!exists($self->{'pages'}{$v2})){
$self->{'pages'}{$v2}='';
push @keys, $v2;
}
}
} while(exists($res->{'query-continue'}));
 
$self->{'loadexisting'}=0;