if ( in_array( $format, $allowed ) ) {
return $this->getMain()->createPrinterByName( $format );
}
+
return $this->getMain()->createPrinterByName( $allowed[0] );
}
}
public function getAllowedParams() {
+ global $wgOpenSearchDefaultLimit;
+
return array(
'search' => null,
'limit' => array(
- ApiBase::PARAM_DFLT => 10,
+ ApiBase::PARAM_DFLT => $wgOpenSearchDefaultLimit,
ApiBase::PARAM_TYPE => 'limit',
ApiBase::PARAM_MIN => 1,
ApiBase::PARAM_MAX => 100,
}
public function getDescription() {
- return 'Search the wiki using the OpenSearch protocol';
+ return 'Search the wiki using the OpenSearch protocol.';
}
public function getExamples() {