From: Brad Jorsch Date: Tue, 9 Dec 2014 14:28:35 +0000 (-0500) Subject: API: Don't double generator list X-Git-Tag: 1.31.0-rc.0~13043 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=ce0de4aa8805f1dfdc97616acce4275e43df0871;p=lhc%2Fweb%2Fwiklou.git API: Don't double generator list Bug: T77974 Change-Id: I1746da0f802e6ab7f87c83ad9918c05f98ab5ea8 --- diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 78c33ed85a..39cd6d9542 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -1334,8 +1334,7 @@ class ApiPageSet extends ApiBase { if ( !$this->mAllowGenerator ) { unset( $result['generator'] ); } elseif ( $flags & ApiBase::GET_VALUES_FOR_HELP ) { - $result['generator'][ApiBase::PARAM_TYPE] = $this->getGenerators(); - foreach ( $result['generator'][ApiBase::PARAM_TYPE] as $g ) { + foreach ( $this->getGenerators() as $g ) { $result['generator'][ApiBase::PARAM_TYPE][] = $g; $result['generator'][ApiBase::PARAM_VALUE_LINKS][$g] = "Special:ApiHelp/query+$g"; }