Content deleted Content added
Updating published sources: AFDMergeFromCleaner: * Template was renamed to {{tl|afd-merge from}} |
Updating published sources: General: * Update for the addition of 'rvslots'. DatedCategoryDeleterTest: * Disable. It's clear that task won't be needed. BrokenRedirectDeleter: * Handle pages with newlines before the <code>#REDIRECT</code>. |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1:
{{ombox|type=notice|text= Approved 2009-01-03<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 20]]}}
<
package tasks::AFDMergeFromCleaner;
Line 11:
BRFA: Wikipedia:Bots/Requests for approval/AnomieBOT 20
Status: Approved 2009-01-03
Created: 2008-12-29
Line 67 ⟶ 66:
# Get a list of templates redirecting to our targets
my %templates=$api->redirects_to_resolved(map "Template:$_", @templates);
$api->warn("Failed to get redirects to target templates: ".$templates{''}{'error'}."\n");
}
Line 150 ⟶ 143:
# Get page text
my $intxt=$tok->{'revisions'}[0]{'slots'}{'main'}{'*'};
# First, find the template and pull out the relevant parameter
Line 242 ⟶ 235:
last;
}
my $intxt=$tok->{'revisions'}[0]{'slots'}{'main'}{'*'} // '';
foreach my $s (split(/(?=(?:^|\n)==)/, $intxt)){
if($s=~/^\n?==\s*Redirected\s*==/){
Line 296 ⟶ 289:
1;
</syntaxhighlight>
|