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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * Adjust coloring for cascading protection. Even though cascading semi-protection isn't possible, we'd want it red on CAT:ESP if it were. * Consider the cascade-protected page itself as cascading too * I...
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * Can't use "return" inside a map block, that returns from the function. D'oh. * Handle urns that have HTML entities in them (e.g. ').
Line 24:
use AnomieBOT::Task qw/:time bunchlist/;
use URI::Escape;
use HTML::Entities;
use Data::Dumper;
use vars qw/@ISA/;
Line 158 ⟶ 159:
next unless $p->{'ns'}&1;
my @pages = map {
return if() unless $_->{'*'}=~/^urn:$urn:(.+)$/i;) {
my $url = $1;
$url=~s/\+/ /g;
$url = uri_unescape( $url );
utf8::decode $url = decode_entities( $url );
utf8::decode( $url );
$url;
} else {
();
}
} @{$p->{'extlinks'}//[]};
unless(@pages){