User:AnomieBOT/source/tasks/DeletionSortingCleaner.pm

, which is needed for me to know where to put the archived AfDs. I can't do anything to that page until someone fixes it.");               $broken=1;                next;            }        }

# Now do the saving if($outtxt ne $intxt){ $api->log("Archiving closed XfDs and/or removing duplicates from $page..."); my $summary; if(@summary){ $summary="Archiving closed XfDs". ( $dups ? ' and removing duplicate XfDs' : '' ). $screwup. ": " . join(" ", @summary); $summary="Archiving closed XfDs". ( $dups ? ' and removing duplicate XfDs' : '' ). $screwup. ": [" . scalar(@summary). " discussions]" if length($summary)>500; } else { $summary = "Removing duplicate XfDs". $screwup; }           $res=$api->edit($tok, $outtxt, $summary, 0, 1); if($res->{'code'} ne 'success'){ $api->warn("Save failed for $page: ".$res->{'error'}."\n"); $broken=1; next; }           # Now that we saved the original page, we must save the archival # records just in case the next edit fails. $api->store->{"archive $page"}=[@archive]; }       if(defined($atok)){ $api->log("Archiving closed XfDs to $apage..."); $res=$api->edit($atok, $atxt, "Archiving closed XfDs from $page".$screwup, 0, 1); if($res->{'code'} ne 'success'){ $api->warn("Save failed for $apage".$res->{'error'}."\n"); $broken=1; next; }           # Now that we saved the archival page, clear the saved value. delete $api->store->{"archive $page"}; }   }

# Save checked revision $self->{'lasttime'}=$starttime; $self->{'broken'}=$broken; $api->store->{'lasttime'}=$starttime; $api->store->{'broken'}=$broken; return $starttime+($broken?3600:43200)-time; }

1;