Content deleted Content added
Updating published sources: PERTableUpdater: * Create User:AnomieBOT/EDITREQTable for Category:Requested edits. |
Updating published sources: PERTableUpdater: * Fix color on PER Titleblacklist protections. |
||
Line 119:
my @data=(
[10,'PER','Wikipedia protected edit requests','protected','editprotected',[qw/red red red yellow clear yellow yellow/]],
[10,'SPER','Wikipedia semi-protected edit requests','semi-protected','editsemiprotected',[qw/red clear yellow red red red red/]],
[ 0,'EDITREQ','Requested edits','COI','requestedit',[qw/clear yellow yellow red red red red/]],
);
my $starttime=time;
Line 174:
# Protection scoring "bitmap":
#
#
#
#
# 0x08 = Directly-applied
#
# 0x02 = Title blacklist protection
# Highest score by int value "wins".
my $protscore=
$pd->{'prottype'}='Not protected';
$pd->{'reason'}='';
if($p->{'ns'}==8){
$pd->{'prottype'}='MediaWiki page';
$protscore=
} elsif($p->{'ns'}==2 && $t=~m!/.*\.js$!){
$pd->{'prottype'}='User JS page';
$protscore=
} elsif($p->{'ns'}==2 && $t=~m!/.*\.css$!){
$pd->{'prottype'}='User CSS page';
$protscore=
}
while(my ($re,$data)=each %tb){
next unless $t=~/^(?:$re)$/si;
my $sc=exists($data->{'opts'}{'autoconfirmed'})?
next if $sc<$protscore;
$pd->{'prottype'}=$data->{'source'};
Line 209 ⟶ 210:
next unless $pp->{'type'} eq 'edit';
my $sc=0;
$sc|=
$sc|=
next if $sc<$protscore;
if(exists($pp->{'source'})){
Line 226 ⟶ 227:
$pd->{'color'}=$colors->[0];
if($protscore
$pd->{'color'}=$colors->[1];
$pd->{'color'}=$colors->[
$pd->{'color'}=$colors->[2] if($protscore & 4);▼
$pd->{'color'}=$colors->[3] if($protscore & 8);▼
}
if($protscore & 0x40){
$pd->{'color'}=$colors->[4];
}
$pd->{'color'}=$colors->[6] if($protscore & 0x80);
$pd->{'color'}='green' if($pd->{'color'} eq 'clear' && $p->{'ns'}==$greenns);
|