Content deleted Content added
Updating published sources: PERTableUpdater: * Since Module pages are so much like Templates, color them green too. |
Updating published sources: PERTableUpdater: * Make use of the new hidden "urn:" links to detect edit requests for pages other than the subjectpage of the talk page containing the template. |
||
Line 119:
my @data=(
[[10,828],'PER','Wikipedia protected edit requests','protected','editprotected','x-wp-editprotected',[qw/red red red yellow clear yellow yellow/]],
[[10,828],'SPER','Wikipedia semi-protected edit requests','semi-protected','editsemiprotected','x-wp-editsemiprotected',[qw/red clear yellow red red red red/]],
[[0],'EDITREQ','Requested edits','COI','requestedit','x-wp-requestedit',[qw/clear yellow yellow red red red red/]],
);
my $starttime=time;
for my $data (@data){
my ($greenns,$tag,$cat,$type,$tgt,$urn,$colors)=@$data;
my $iter=$api->iterator(
generator => 'categorymembers',
gcmtitle => "Category:$cat",
gcmlimit => 'max',
prop => 'info|extlinks',
);
my %oldpages=%{$api->store->{"$tag pages"}//{}};
Line 140 ⟶ 142:
}
next unless $p->{'ns'}&1;
my
my $
$
$url;
if($p->{'ns'}==1){
$t=~s/^Talk://;
} else {
$t=~s/^([^:]+) talk:/$1:/;
}
}
for my $t (@pages) {
$pages{$t}=($oldpages{$t} // {▼
title => $t,
talk => $p->{'title'},
touched => ISO2timestamp($p->{'touched'}),
});
delete $pages{$t}{'prottype'};
delete $pages{$t}{'reason'};
delete $pages{$t}{'logtitle'};
}
▲ $pages{$t}=($oldpages{$t} // {
▲ ns => $p->{'ns'}&~1,
▲ title => $t,
▲ talk => $p->{'title'},
▲ touched => ISO2timestamp($p->{'touched'}),
▲ });
▲ delete $pages{$t}{'color'};
▲ delete $pages{$t}{'prottype'};
▲ delete $pages{$t}{'reason'};
▲ delete $pages{$t}{'logtitle'};
}
$api->store->{"$tag pages"}=\%pages;
|