mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-09-24 10:48:58 +00:00
Remove not needed and collapse overly complicated code
Change-Id: Iee4241245280b23ab2aaf452363e7db3e21f5554
This commit is contained in:
parent
4ae083fe72
commit
a4b9302d88
|
@ -243,11 +243,7 @@ class Cite {
|
|||
}
|
||||
# Split these into groups.
|
||||
if ( $group === null ) {
|
||||
if ( $this->mInReferences ) {
|
||||
$group = $this->mReferencesGroup;
|
||||
} else {
|
||||
$group = self::DEFAULT_GROUP;
|
||||
}
|
||||
$group = $this->mInReferences ? $this->mReferencesGroup : self::DEFAULT_GROUP;
|
||||
}
|
||||
|
||||
if ( $this->mInReferences ) {
|
||||
|
@ -608,13 +604,10 @@ class Cite {
|
|||
}
|
||||
|
||||
// Sanity checks that specified element exists.
|
||||
if ( $key === null ) {
|
||||
return;
|
||||
}
|
||||
if ( !isset( $this->mRefs[$group][$key] ) ) {
|
||||
return;
|
||||
}
|
||||
if ( $this->mRefs[$group][$key]['key'] != $index ) {
|
||||
if ( $key === null ||
|
||||
!isset( $this->mRefs[$group][$key] ) ||
|
||||
$this->mRefs[$group][$key]['key'] !== $index
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -764,7 +757,7 @@ class Cite {
|
|||
* @return string HTML ready for output
|
||||
*/
|
||||
private function referencesFormat( $group, $responsive ) {
|
||||
if ( !$this->mRefs || !isset( $this->mRefs[$group] ) ) {
|
||||
if ( !isset( $this->mRefs[$group] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue