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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: General: * Remove constructs that became "experimental" in Perl 5.18. * Add the possibility for the command "file" to be in redis/memcache. * Add utilities to send and list these commands. * Put job status data in redis/memc...
AnomieBOT (talk | contribs)
Updating published sources: d::Redirects: * Redo redirects_to and redirects_to_resolved to use the new prop=redirects. Much faster and more accurate, but let's hope I didn't introduce any bugs.
 
(One intermediate revision by the same user not shown)
Line 62:
 
# Get template list
my %templates=$api->resolve_redirectsredirects_to_resolved('Template:Restricted use');
%templates=$api->redirects_to(values %templates) unless exists($templates{''});
if(exists($templates{''})){
if($templates{''}{'code'} eq 'shutoff'){
Line 94 ⟶ 93:
);
while(my $f=$iter->next){
if(!$f->{'_ok_'}){
$api->warn("Could not retrieve image info from iterator: ".$f->{'error'}."\n");
return 60;
}
next unless $f->{'imagerepository'} eq 'local' || $f->{'imagerepository'} eq 'shared';
$files{$f->{'title'}}=$f;
Line 107 ⟶ 110:
);
while(my $p=$iter->next){
if(!$p->{'_ok_'}){
$api->warn("Could not retrieve transclusions from iterator: ".$p->{'error'}."\n");
return 60;
}
$bl{$p->{'title'}}=1;
}