Content deleted Content added
Updating published sources: General: * Update for the addition of 'rvslots'. DatedCategoryDeleterTest: * Disable. It's clear that task won't be needed. BrokenRedirectDeleter: * Handle pages with newlines before the <code>#REDIRECT</code>. |
Updating published sources: PERTableUpdater: * Handle MediaWiki's new interface-editor protection of user and site CSS and JS pages. |
||
Line 172:
# 8: cascading protection
# 9: MediaWiki-namespace page
# 10: MediaWiki-namespace CSS/JS page
my @data=(
[[10,828],'PER','Wikipedia fully-protected edit requests','protected','editprotected','x-wp-editprotected',[qw/red red red red red
[[10,828],'TPER','Wikipedia template-protected edit requests','template-protected','edittemplateprotected','x-wp-edittemplateprotected',[qw/red red red red clear red red yellow red red red/]],
[[10,828],'EPER','Wikipedia extended-confirmed-protected edit requests','extended-confirmed-protected','editextendedprotected','x-wp-editextendedprotected',[qw/red red red clear red red red red red red red/]],
[[10,828],'SPER','Wikipedia semi-protected edit requests','semi-protected','editsemiprotected','x-wp-editsemiprotected',[qw/red clear yellow red red red red red red red red/]],
[[
[[0],'EDITREQ','Requested edits','COI','requestedit','x-wp-requestedit',[qw/clear yellow yellow red red red red red red red/]],
);
my $starttime=time;
Line 251 ⟶ 253:
# Protection scoring "bitmap":
# 0x800 = MediaWiki-namespace CSS/JS auto-protection
# 0x400 = MediaWiki-namespace auto-protection
# 0x200 = Cascading protection
Line 264 ⟶ 267:
$pd->{'prottype'}='Not protected';
$pd->{'reason'}='';
if($p->{'ns'}==8 && ($p->{'contentmodel'} eq 'javascript' || $t=~m!\.js$!)){
$pd->{'prottype'}='Site JS page';
$protscore=0xc00;
} elsif($p->{'ns'}==8 && ($p->{'contentmodel'} eq 'css' || $t=~m!\.css$!)){
$pd->{'prottype'}='Site CSS page';
$protscore=0xc00;
} elsif($p->{'ns'}==8){
$pd->{'prottype'}='MediaWiki page';
$protscore=0x400;
} elsif($p->{'ns'}==2 && ($p->{'contentmodel'} eq 'javascript' || $t=~m!/.*\.js$!)){
$pd->{'prottype'}='User JS page';
$protscore=0x80;
} elsif($p->{'ns'}==2 && ($p->{'contentmodel'} eq 'css' || $t=~m!/.*\.css$!)){
$pd->{'prottype'}='User CSS page';
$protscore=0x80;
Line 334 ⟶ 343:
$pd->{'color'}=$colors->[8] if($protscore & 0x200);
$pd->{'color'}=$colors->[9] if($protscore & 0x400);
$pd->{'color'}=$colors->[10] if($protscore & 0x800);
$pd->{'color'}='green' if($pd->{'color'} eq 'clear' && grep($p->{'ns'}==$_, @$greenns));
|