Add ref/follow name to Cite error cite_error_references_missing_key

Bug: T51538
Change-Id: Id19a4e4c37169ca6eb7aecdce66b1662546ae31a
This commit is contained in:
sbailey 2020-12-17 15:02:09 -08:00
parent 511543e3f1
commit 394015a38b

View file

@ -215,7 +215,8 @@ class References extends ExtensionTagHandler {
if ( $refsData->inReferencesContent() ) {
$group = $refsData->getRefGroup( $groupName );
if ( !isset( $group->indexByName[$refName] ) ) {
$errs[] = [ 'key' => 'cite_error_references_missing_key' ];
$errs[] = [ 'key' => 'cite_error_references_missing_key',
'params' => [ $refDmw->attrs->name ] ];
}
}
} else {
@ -242,7 +243,8 @@ class References extends ExtensionTagHandler {
// section and it's the $followName we care about, but the
// extension to the legacy parser doesn't have an
// equivalent key and just outputs something wacky.
$errs[] = [ 'key' => 'cite_error_references_missing_key' ];
$errs[] = [ 'key' => 'cite_error_references_missing_key',
'params' => [ $refDmw->attrs->follow ] ];
}
} elseif ( $refsData->inReferencesContent() ) {
$errs[] = [ 'key' => 'cite_error_references_no_key' ];