mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
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:
parent
2229f22899
commit
6a9e51fc30
12
src/Cite.php
12
src/Cite.php
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue