(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:
Andrew Garrett 2006-11-03 14:08:35 +00:00
parent 13ca6eb0eb
commit 658fe31872

View file

@ -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 ) ) );
}