mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-09-24 02:40:10 +00:00
(bug 5885) Stop empty <ref name="something" /> tags from preventing a later tag with the same name from displaying correctly (when re-ordering paragraphs which reference the same <ref> tag. Patch by Phil Boswell.
This commit is contained in:
parent
13ca6eb0eb
commit
658fe31872
8
Cite.php
8
Cite.php
|
@ -289,14 +289,18 @@ function wfCite() {
|
|||
$this->mRefs[$key]['count'],
|
||||
$this->mRefs[$key]['number']
|
||||
);
|
||||
} else
|
||||
} else {
|
||||
// We've been here before
|
||||
if ( empty($this->mRefs[$key]['text']) and !empty($str)) {
|
||||
// If no text found before, use this text
|
||||
$this->mRefs[$key]['text'] = $str;
|
||||
};
|
||||
return
|
||||
$this->linkRef(
|
||||
$key,
|
||||
++$this->mRefs[$key]['count'],
|
||||
$this->mRefs[$key]['number']
|
||||
);
|
||||
); }
|
||||
else
|
||||
$this->croak( CITE_ERROR_STACK_INVALID_INPUT, serialize( array( $key, $str ) ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue