<?php
-
/**
- * Created on Dec 01, 2007
- *
* API for MediaWiki 1.8+
*
+ * Created on Dec 01, 2007
+ *
* Copyright © 2008 Roan Kattouw <Firstname>.<Lastname>@home.nl
*
* This program is free software; you can redistribute it and/or modify
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
*/
if ( !defined( 'MEDIAWIKI' ) ) {
if ( isset( $p[ApiBase::PARAM_DEPRECATED] ) && $p[ApiBase::PARAM_DEPRECATED] ) {
$a['deprecated'] = '';
}
+ if ( isset( $p[ApiBase::PARAM_REQUIRED] ) && $p[ApiBase::PARAM_REQUIRED] ) {
+ $a['required'] = '';
+ }
+
if ( !is_array( $p ) ) {
if ( is_bool( $p ) ) {
$a['type'] = 'bool';
if ( isset( $p[ApiBase::PARAM_DFLT] ) ) {
$a['default'] = $p[ApiBase::PARAM_DFLT];
}
- if ( isset( $p[ApiBase::PARAM_ISMULTI] ) ) {
- if ( $p[ApiBase::PARAM_ISMULTI] ) {
- $a['multi'] = '';
- $a['limit'] = $this->getMain()->canApiHighLimits() ?
- ApiBase::LIMIT_SML2 :
- ApiBase::LIMIT_SML1;
- }
+ if ( isset( $p[ApiBase::PARAM_ISMULTI] ) && $p[ApiBase::PARAM_ISMULTI] ) {
+ $a['multi'] = '';
+ $a['limit'] = $this->getMain()->canApiHighLimits() ?
+ ApiBase::LIMIT_SML2 :
+ ApiBase::LIMIT_SML1;
}
- if ( isset( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) ) {
- if ( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) {
- $a['allowsduplicates'] = '';
- }
+ if ( isset( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) && $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) {
+ $a['allowsduplicates'] = '';
}
if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
}
public function getDescription() {
- return 'Obtain information about certain API parameters';
+ return 'Obtain information about certain API parameters and errors';
}
protected function getExamples() {