r113281 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113280‎ | r113281 | r113282 >
Date:19:43, 7 March 2012
Author:maxsem
Status:ok
Tags:
Comment:
renamed pqarameter section --> sections
Modified paths:
  • /trunk/extensions/MobileFrontend/api/ApiMobileView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/api/ApiMobileView.php
@@ -15,8 +15,8 @@
1616 // Enough '*' keys in JSON!!!
1717 $textElement = $this->getMain()->getPrinter()->getFormat() == 'XML' ? '*' : 'text';
1818 $params = $this->extractRequestParams();
19 - $requestedSections = isset( $params['section'] )
20 - ? $this->parseSections( $params['section'] )
 19+ $requestedSections = isset( $params['sections'] )
 20+ ? $this->parseSections( $params['sections'] )
2121 : array();
2222 $prop = array_flip( $params['prop'] );
2323 $sectionProp = array_flip( $params['sectionprop'] );
@@ -125,7 +125,7 @@
126126 'page' => array(
127127 ApiBase::PARAM_REQUIRED => true,
128128 ),
129 - 'section' => null,
 129+ 'sections' => null,
130130 'prop' => array(
131131 ApiBase::PARAM_DFLT => 'text|sections',
132132 ApiBase::PARAM_ISMULTI => true,
@@ -154,7 +154,7 @@
155155 public function getParamDescription() {
156156 return array(
157157 'page' => 'Title of page to process',
158 - 'section' => 'Pipe-separated list of section numbers for which to return text',
 158+ 'sections' => 'Pipe-separated list of section numbers for which to return text',
159159 'prop' => array(
160160 'Which information to get',
161161 ' text - HTML of selected section(s)',
@@ -180,7 +180,7 @@
181181
182182 public function getExamples() {
183183 return array(
184 - 'api.php?action=mobileview&page=Doom_metal&section=0'
 184+ 'api.php?action=mobileview&page=Doom_metal&sections=0'
185185 );
186186 }
187187

Status & tagging log