mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 09:43:06 +00:00
Simplify PHP code
Change-Id: Ia1bd08cd972b2f5792d24d5fbc383c3c63b000db
This commit is contained in:
parent
8bd82c12f6
commit
75c2c5580a
|
@ -314,15 +314,12 @@ class CategoryTree {
|
|||
* @return mixed
|
||||
*/
|
||||
public function getOptionsAsJsStructure( $depth = null ) {
|
||||
$opt = $this->mOptions;
|
||||
if ( $depth !== null ) {
|
||||
$opt = $this->mOptions;
|
||||
$opt['depth'] = $depth;
|
||||
$s = self::encodeOptions( $opt, 'json' );
|
||||
} else {
|
||||
$s = self::encodeOptions( $this->mOptions, 'json' );
|
||||
}
|
||||
|
||||
return $s;
|
||||
return self::encodeOptions( $opt, 'json' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue