Content deleted Content added
Updating published sources: PUICloser: * Approved! AFDMergeFromCleaner: * Add handling of deleted pages * Clean up reporting code * Run to completion each time. |
Updating published sources: AFDMergeFromCleaner: * Approved! * Use a link template for the report table, so the various pages have useful links associated. * Bugfix in parsing the report page. |
||
Line 1:
{{ombox|type=notice|text=
<source lang="perl">
package tasks::AFDMergeFromCleaner;
Line 9:
Task: AFDMergeFromCleaner
BRFA: Wikipedia:Bots/Requests for approval/AnomieBOT 20
Status:
Rate: Max 6 edits/minute
Line 38:
=for info
=cut
sub approved {
return
}
Line 82:
my %deleted=();
my $ret=21600;
my $linktmpl='User:'.$api->user.'/la';
MAINLOOP:
Line 167 ⟶ 169:
$remove{$f}=1;
} else {
$redirected{"$f>$subject>$t"}="|
}
}
Line 177 ⟶ 179:
$f=$norm{$f} if exists($norm{$f});
$remove{exists($norm{$f})?$norm{$f}:$f}=1;
$deleted{"$f>$subject"}="|
}
}
Line 217 ⟶ 219:
my $intxt=exists($tok->{'revisions'}[0]{'*'})?$tok->{'revisions'}[0]{'*'}:'';
foreach my $s (split(/(?=(?:^|\n)==)/, $intxt)){
if($s=~/^==\s*Redirected\s*==/){
foreach (split /\n/, $s){
next unless /^\Q| {{$linktmpl|\
next unless exists($redirected{"$1>$2>$3"});
$redirected{"$1>$2>$3"}=$_;
}
} elsif($s=~/^==\s*Deleted\s*==/){
foreach (split /\n/, $s){
next unless /^\Q| {{$linktmpl|\
$deleted{"$1>$2"}=$_;
}
|