Tag every usage of "extends" even when invalid

We weren't recording usages which failed certain `refArg` validations.

Bug: T237531
Change-Id: Ibcb875c5d0ed6c2279e0e34ab415ac63d7ebe584
This commit is contained in:
Adam Wight 2019-11-26 11:46:05 +01:00
parent 2229f22899
commit 6a9e51fc30

View file

@ -315,6 +315,12 @@ class Cite {
array $argv,
Parser $parser
) {
// Tag every page where Book Referencing has been used, whether or not the ref tag is valid.
// This code and the page property will be removed once the feature is stable. See T237531.
if ( array_key_exists( self::BOOK_REF_ATTRIBUTE, $argv ) ) {
$parser->getOutput()->setProperty( self::BOOK_REF_PROPERTY, true );
}
list( $name, $group, $follow, $dir, $extends ) = $this->refArg( $argv );
# Split these into groups.
@ -322,12 +328,6 @@ class Cite {
$group = $this->inReferencesGroup ?? self::DEFAULT_GROUP;
}
// Tag every page where Book Referencing has been used. This code and the properties
// will be removed once the feature is stable. See T237531.
if ( $extends ) {
$parser->getOutput()->setProperty( self::BOOK_REF_PROPERTY, true );
}
$valid = $this->validateRef( $text, $name, $group, $follow, $extends );
if ( $this->inReferencesGroup !== null ) {