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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: EnDashRedirectCreator: * Seems someone created {{tl|R from alternative hyphenation}} now.
AnomieBOT (talk | contribs)
Updating published sources: EnDashRedirectCreator: * Add disabled code for someday adding missing {{tlu|User:AnomieBOT/Auto-G8}} transclusions.
Line 118:
$api->warn( "Error fetching actor ID from replica: $@\n" );
return 300;
}
 
# TODO: Make a BRFA to enable this.
my $needAutoG8 = '0=1';
if ( 0 ) {
my $targetid;
eval {
( $targetid ) = $dbh->selectrow_array( "SELECT lt_id FROM linktarget WHERE lt_namespace=2 AND lt_title = 'AnomieBOT/Auto-G8'" );
};
if ( $@ ) {
$api->warn( "Error fetching linktarget ID from replica: $@\n" );
return 300;
}
$needAutoG8 = "NOT EXISTS( SELECT 1 FROM templatelinks WHERE tl_from=p2.page_id AND tl_target_id=$targetid )";
}
 
Line 142 ⟶ 156:
OR r2.rd_title != COALESCE( r1.rd_title, p1.page_title )
OR r2.rd_fragment != r1.rd_fragment
OR $needAutoG8
) AND EXISTS( SELECT 1 FROM revision WHERE rev_page = p2.page_id AND rev_actor IN ($actorIds) AND rev_parent_id = 0 )
)