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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: OnThisDayTagger: * Fix handling of multi-line <noinclude>.
AnomieBOT (talk | contribs)
Updating published sources: OnThisDayTagger: * The arbitrary and pointless renaming of templates to have spaces strikes again.
Line 617:
 
# Load template content
my $res=$api->rawpage('Template:OnThisDayOn this day');
if($res->{'code'} eq 'shutoff'){
$api->warn("Task disabled: ".$res->{'content'}."\n");
Line 623:
}
if($res->{'code'} ne 'success'){
$api->warn("Could not load Template:OnThisDayOn this day: ".$res->{'error'}."\n");
return 60;
}
Line 638:
 
# No, complain
$api->log("Whining about insufficient parameters in {{OnThisDayOn this day}}");
my $summ="{{[[Template:OnThisDayOn this day]]}} needs more parameters";
$res=$api->whine($summ, "It appears that {{tl|OnThisDayOn this day}} only supports parameters up to <nowiki>{{{date$i}}} and {{{oldid$i}}}</nowiki>, and I have seen at least one page that needs $max. Please edit the template to include more calls to {{tl|OnThisDayOn this day/link}}.", Summary => $summ, Pagename => $whine_to);
if($res->{'code'} eq 'shutoff'){
$api->warn("Task disabled: ".$res->{'content'}."\n");
Line 646:
}
if($res->{'code'} ne 'success'){
$api->warn("Could not complain about {{OnThisDayOn this day}}: ".$res->{'error'}."\n");
return 60;
}
Line 660:
my %redir=%{$self->{'redir'}};
if(!%redir){
%redir=$api->redirects_to('Template:OnThisDayOn this day');
if(exists($redir{''})){
$api->warn("Could not load list of redirects to Template:OnThisDayOn this day: ".$redir{''}{'error'}."\n");
return undef;
}