Content deleted Content added
Updating published sources: SourceUploader: * Fix bug that resulted in POD docs being prepended to their source pages. |
Updating published sources: General: * Add <code>use strict</code> where it was missing, and fix the bugs that exposes. * Move conf.ini documentation to conf.sample.ini. * Add section support to the ini parsi |
||
Line 33:
my %extensions=(
'pl' => 'perl',
'pm' => 'perl',
'ini' => 'ini',
);
Line 84 ⟶ 85:
$self->{'summary'}=~s/\s+/ /g;
$self->{'summary'}=~s/\s+$//;
$self->{'summary'}=
my %pages=();
Line 209 ⟶ 210:
my @keys=keys(%{$self->{'pages'}});
if(!@keys){
$self->warn("Terminating task\n");
return undef;
}
Line 232 ⟶ 233:
$res=$api->query(%q);
if($res->{'code'} ne 'success'){
$self->warn("Failed to retrieve source tree: ".$res->{'error'}."\n");
return 300;
}
Line 264 ⟶ 265:
$page=~s/\x02BOT\x03/$bot/go;
$page=~s/\s+$//o;
$tok->{'revisions'}[0]{'*'}=~s/\s+$//o if !exists($tok->{'missing'});
if(exists($tok->{'missing'}) ||
$tok->{'revisions'}[0]{'*'} ne $page){
my $r=$api->edit($tok, $page, $self->{'summary'}, 0, 1);
if($r->{'code'} ne 'success'){
$self->warn("Write error for $k: ".$r->{'error'}."\n");
next;
} else {
$self->warn("Updated $k\n");
}
} else {
$self->warn("No update needed for $k\n");
}
delete($self->{'pages'}{$k});
|