Index: trunk/phase3/includes/api/ApiQueryAllimages.php |
— | — | @@ -200,6 +200,7 @@ |
201 | 201 | 'Which properties to get', |
202 | 202 | ' timestamp - Adds the timestamp when the image was upload', |
203 | 203 | ' user - Adds the username of the last uploader', |
| 204 | + ' userid - Adds the user id of the last uploader', |
204 | 205 | ' comment - Adds the comment of the last upload', |
205 | 206 | ' url - Adds the URL of the image and its description page', |
206 | 207 | ' size - Adds the size of the image in bytes and its height and width', |
Index: trunk/phase3/includes/api/ApiQueryProtectedTitles.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | $this->addFields( array( 'pt_namespace', 'pt_title', 'pt_timestamp' ) ); |
57 | 57 | |
58 | 58 | $prop = array_flip( $params['prop'] ); |
59 | | - $this->addFieldsIf( 'pt_user', isset( $prop['user'] ) ); |
| 59 | + $this->addFieldsIf( 'pt_user', isset( $prop['user'] ) || isset( $prop['userid'] ) ); |
60 | 60 | $this->addFieldsIf( 'pt_reason', isset( $prop['comment'] ) || isset( $prop['parsedcomment'] ) ); |
61 | 61 | $this->addFieldsIf( 'pt_expiry', isset( $prop['expiry'] ) ); |
62 | 62 | $this->addFieldsIf( 'pt_create_perm', isset( $prop['level'] ) ); |
— | — | @@ -96,6 +96,10 @@ |
97 | 97 | $vals['user'] = $row->user_name; |
98 | 98 | } |
99 | 99 | |
| 100 | + if ( isset( $prop['user'] ) ) { |
| 101 | + $vals['userid'] = $row->pt_user; |
| 102 | + } |
| 103 | + |
100 | 104 | if ( isset( $prop['comment'] ) ) { |
101 | 105 | $vals['comment'] = $row->pt_reason; |
102 | 106 | } |
— | — | @@ -177,6 +181,7 @@ |
178 | 182 | ApiBase::PARAM_TYPE => array( |
179 | 183 | 'timestamp', |
180 | 184 | 'user', |
| 185 | + 'userid', |
181 | 186 | 'comment', |
182 | 187 | 'parsedcomment', |
183 | 188 | 'expiry', |
— | — | @@ -197,6 +202,7 @@ |
198 | 203 | 'Which properties to get', |
199 | 204 | ' timestamp - Adds the timestamp of when protection was added', |
200 | 205 | ' user - Adds the user to add the protection', |
| 206 | + ' userid - Adds the user id to add the protection', |
201 | 207 | ' comment - Adds the comment for the protection', |
202 | 208 | ' parsedcomment - Adds the parsed comment for the protection', |
203 | 209 | ' expiry - Adds the timestamp of when the protection will be lifted', |