Index: trunk/phase3/includes/api/ApiQueryStashImageInfo.php |
— | — | @@ -61,22 +61,10 @@ |
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | | - /** |
66 | | - * Returns all valid parameters to siiprop |
67 | | - */ |
68 | | - public static function getPropertyNames() { |
69 | | - return array( |
70 | | - 'timestamp', |
71 | | - 'url', |
72 | | - 'size', |
73 | | - 'dimensions', // For backwards compatibility with Allimages |
74 | | - 'sha1', |
75 | | - 'mime', |
76 | | - 'thumbmime', |
77 | | - 'metadata', |
78 | | - 'bitdepth', |
79 | | - ); |
80 | | - } |
| 65 | + private $propertyFilter = array( |
| 66 | + 'user', 'userid', 'comment', 'parsedcomment', |
| 67 | + 'mediatype', 'archivename', |
| 68 | + ); |
81 | 69 | |
82 | 70 | public function getAllowedParams() { |
83 | 71 | return array( |
— | — | @@ -88,7 +76,7 @@ |
89 | 77 | 'prop' => array( |
90 | 78 | ApiBase::PARAM_ISMULTI => true, |
91 | 79 | ApiBase::PARAM_DFLT => 'timestamp|url', |
92 | | - ApiBase::PARAM_TYPE => self::getPropertyNames() |
| 80 | + ApiBase::PARAM_TYPE => self::getPropertyNames( $this->propertyFilter ) |
93 | 81 | ), |
94 | 82 | 'urlwidth' => array( |
95 | 83 | ApiBase::PARAM_TYPE => 'integer', |
— | — | @@ -112,18 +100,7 @@ |
113 | 101 | public function getParamDescription() { |
114 | 102 | $p = $this->getModulePrefix(); |
115 | 103 | return array( |
116 | | - 'prop' => array( |
117 | | - 'What image information to get:', |
118 | | - ' timestamp - Adds timestamp for the uploaded version', |
119 | | - ' url - Gives URL to the image and the description page', |
120 | | - ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)', |
121 | | - ' dimensions - Alias for size', |
122 | | - ' sha1 - Adds sha1 hash for the image', |
123 | | - ' mime - Adds MIME of the image', |
124 | | - ' thumbmime - Adds MIME of the image thumbnail (requires url)', |
125 | | - ' metadata - Lists EXIF metadata for the version of the image', |
126 | | - ' bitdepth - Adds the bit depth of the version', |
127 | | - ), |
| 104 | + 'prop' => self::getPropertyDescriptions( $this->propertyFilter ), |
128 | 105 | 'sessionkey' => 'Session key that identifies a previous upload that was stashed temporarily.', |
129 | 106 | 'urlwidth' => "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.", |
130 | 107 | 'urlheight' => "Similar to {$p}urlwidth. Cannot be used without {$p}urlwidth", |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -277,6 +277,8 @@ |
278 | 278 | * (bug 16288) API: consider making closure status of wikis more clear |
279 | 279 | with meta=siteinfo |
280 | 280 | * (bug 27589) list=allimages&aiprop=archivename is useless |
| 281 | +* (bug 27586) Remove duplication of props in ApiQueryStashImageInfo |
| 282 | + by using ApiQueryImageInfo |
281 | 283 | |
282 | 284 | === Languages updated in 1.18 === |
283 | 285 | |