User:AnomieBOT/source/tasks/TemplateSubster/Base.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: TemplateSubster::Base: * Work around T14974 by reproducing the "after newline" environment when passing data to action=parse. d::Templates: * Indicate to the callback whether each template found by process_templates is located after a newline or not.
AnomieBOT (talk | contribs)
Updating published sources: TemplateSubster::Base: * Add a check for a potential weird race condition.
Line 104:
# Ok, check the page
my $tok=$api->edittoken($title, EditRedir=>1);
$revid=$tok->{'lastrevid'} // $revid; # In case MW somehow returned an older revision than it did earlier, use the rev in the actual token.
if($tok->{'code'} eq 'shutoff'){
$api->warn("Task disabled: ".$tok->{'content'}."\n");