User:ImplSearchBot/Code: Difference between revisions

Content added Content deleted
m (ImplSearchBot:0)
m (ImplSearchBot:0)
Line 107: Line 107:
&out("Getting the languages.\n", 3);
&out("Getting the languages.\n", 3);
my $alllanguages= &getcategory('Category:Programming Languages');
my $alllanguages= &getcategory('Category:Programming Languages');

# Quick check. Did we add or lose any tasks? If so, we've got to recalc *all*
# of the pages. :-/
my $task_count_change;
{
my $cacheddata = &getcacheddata('Category:Programming Tasks');
my ($added, $removed) = &diffcat($alltasks, $cacheddata);
$task_count_change = scalar @$added + scalar @$removed;
}


# We want the language name, not the fully-qualified wiki name.
# We want the language name, not the fully-qualified wiki name.
Line 618: Line 627:


my ($removed, $added) = &diffcat($olddata, $newdata);
my ($removed, $added) = &diffcat($olddata, $newdata);
my $impl_count_change = scalar @$removed + @$added;
my $work = [];
my $work = [];
$work = $newdata
$work = $newdata
if((scalar @$removed + scalar @$added) > 0);
if(($impl_count_change + $task_count_change) > 0);
&out(scalar @$work . " items to process for $categoryname.\n", 3);
&out(scalar @$work . " items to process for $categoryname.\n", 3);