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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: DatedCategoryCreator: * Fix Category:Clean-up categories subcat creation.
AnomieBOT (talk | contribs)
Updating published sources: DatedCategoryCreator: * Use correct key from allcategories response.
 
(One intermediate revision by the same user not shown)
Line 173:
next unless $c->{'category'} =~ / $monthre \d{4}$/;
next if $c->{'hidden'} || $c->{'size'} <= 0;
next if exists( $did{'Category:' . $c->{'titlecategory'}} );
$did{'Category:' . $c->{'titlecategory'}}=1;
$res = $self->make_dated_cat( $api, 'Category:' . $c->{'category'}, 'non-empty month' );
return $res if $res;
Line 215:
return 0 if $y>$t[5]+1900;
return 0 if($y==$t[5]+1900 && $monthnum{$m}>$t[4]+1);
return 0 if(!exists($oldcats{$parent}) && $y<20042010);
 
# Check whether the parent cat actually exists and is a subcat of the meta