the general site info results
* (bug 16288) API: consider making closure status of wikis more clear
with meta=siteinfo
+* (bug 27589) list=allimages&aiprop=archivename is useless
=== Languages updated in 1.18 ===
'sha1' => null,
'sha1base36' => null,
'prop' => array(
- ApiBase::PARAM_TYPE => ApiQueryImageInfo::getPropertyNames(),
+ ApiBase::PARAM_TYPE => ApiQueryImageInfo::getPropertyNames( $this->propertyFilter ),
ApiBase::PARAM_DFLT => 'timestamp|url',
ApiBase::PARAM_ISMULTI => true
),
'limit' => 'How many images in total to return',
'sha1' => "SHA1 hash of image. Overrides {$this->getModulePrefix()}sha1base36",
'sha1base36' => 'SHA1 hash of image in base 36 (used in MediaWiki)',
- 'prop' => ApiQueryImageInfo::getPropertyDescriptions(),
+ 'prop' => ApiQueryImageInfo::getPropertyDescriptions( $this->propertyFilter ),
'mime' => 'What MIME type to search for. e.g. image/jpeg. Disabled in Miser Mode',
);
}
+ private $propertyFilter = array( 'archivename' );
+
public function getDescription() {
return 'Enumerate all images sequentially';
}
/**
* Returns all possible parameters to iiprop
+ *
+ * @param array $filter List of properties to filter out
+ *
* @static
* @return Array
*/
- public static function getPropertyNames() {
- return array_keys( self::getProperties() );
+ public static function getPropertyNames( $filter = array() ) {
+ return array_diff( array_keys( self::getProperties() ), $filter );
}
/**
- * Returns array key value pairs of
+ * Returns array key value pairs of properties and their descriptions
*
* @static
* @return array
/**
* Returns the descriptions for the properties provided by getPropertyNames()
+ *
+ * @param array $filter List of properties to filter out
*
* @static
* @return array
*/
- public static function getPropertyDescriptions() {
+ public static function getPropertyDescriptions( $filter = array() ) {
return array_merge(
array( 'What image information to get:' ),
- array_values( self::getProperties() )
+ array_values( array_diff_key( self::getProperties(), array_flip( $filter ) ) )
);
}