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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: SourceUploader: * BUGFIX: Forgot the "text" parameter in an ombox. * BUGFIX: ChangeLog processing was b0rken.
AnomieBOT (talk | contribs)
Updating published sources: General: * Change 'shutoff' to be checked whenever an edit token is requested, by piggybacking on the edittoken request. SourceUploader: * BUGFIX: Add a subst so the history template works right
Line 107:
$pages{$pp}.=$x."\n";
}
$pages{$pp}.="\x7b\x7bombox|type=notice|text=See the \x7b\x7bsubst:history|\x7b\x7bFULLPAGENAMEx7bsubst:FULLPAGENAME\x7d\x7d|page history|subst=subst:\x7d\x7d for further ChangeLog entries\x7d\x7d\n" if @x;
} elsif($page=~/\.([^.]+)$/ && exists($extensions{$1})){
if($extensions{$1} eq 'perl'){
Line 168:
$api->read_throttle(6);
$api->edit_throttle(10);
#return 300 if $self->check_shutoff($api, 'SourceUploader');
 
my $src='User:'.$api->user.'/source';
Line 208 ⟶ 207:
my $k=shift @keys;
my $tok=$api->edittoken($src.$k);
if($tok->{'code'} eq 'shutoff'){
$self->warn("Task disabled: ".$tok->{'content'}."\n");
return 300;
}
next if($tok->{'code'} ne 'success');
if(exists($tok->{'missing'}) ||