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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * Use classes rather than hard-coding colors, so the specific colors can be determined by community consensus and can be overridden by individual editors.
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * Use {{tl|-r}} if the page or target of the request is a redirect.
Line 237:
touched => ISO2timestamp($p->{'touched'}),
});
$pages{$t}{$tt}{'reqisredir'} = defined( $p->{'redirect'} );
delete $pages{$t}{$tt}{'color'};
delete $pages{$t}{$tt}{'prottype'};
Line 391 ⟶ 392:
}
$pd->{'logtitle'}=$pg;
$pd->{'isredir'}=defined( $p->{'redirect'} );
 
# now fill in the rest
Line 425 ⟶ 427:
my $pt=$p->{'prottype'};
my $r=$p->{'reason'};
my $tl = $p->{'isredir'} ? "{{-r|1=$t}}" : "[[:$t]]";
my $ttl = $p->{'reqisredir'} ? "{{-r|1=$tt#$tgt|2=request}}" : "[[$tt#$tgt|request]]";
$txt.=qq(|- class="protectededit-legend-$c"\n);
$txt.=qq(| [[:$t]]tl ([[$tt#$tgt|request]]ttl)\n);
$txt.=strftime("| %F %H:%M\n", gmtime $p->{'touched'});
$txt.=qq(| $pt <span class="plainlinks">([//en.wikipedia.org/w/index.php?title=Special:Log&type=protect&page=$et log])</span>\n);