'Which properties to get',
' timestamp - Adds the timestamp when the image was upload',
' user - Adds the username of the last uploader',
+ ' userid - Adds the user id of the last uploader',
' comment - Adds the comment of the last upload',
' url - Adds the URL of the image and its description page',
' size - Adds the size of the image in bytes and its height and width',
$this->addFields( array( 'pt_namespace', 'pt_title', 'pt_timestamp' ) );
$prop = array_flip( $params['prop'] );
- $this->addFieldsIf( 'pt_user', isset( $prop['user'] ) );
+ $this->addFieldsIf( 'pt_user', isset( $prop['user'] ) || isset( $prop['userid'] ) );
$this->addFieldsIf( 'pt_reason', isset( $prop['comment'] ) || isset( $prop['parsedcomment'] ) );
$this->addFieldsIf( 'pt_expiry', isset( $prop['expiry'] ) );
$this->addFieldsIf( 'pt_create_perm', isset( $prop['level'] ) );
$vals['user'] = $row->user_name;
}
+ if ( isset( $prop['user'] ) ) {
+ $vals['userid'] = $row->pt_user;
+ }
+
if ( isset( $prop['comment'] ) ) {
$vals['comment'] = $row->pt_reason;
}
ApiBase::PARAM_TYPE => array(
'timestamp',
'user',
+ 'userid',
'comment',
'parsedcomment',
'expiry',
'Which properties to get',
' timestamp - Adds the timestamp of when protection was added',
' user - Adds the user to add the protection',
+ ' userid - Adds the user id to add the protection',
' comment - Adds the comment for the protection',
' parsedcomment - Adds the parsed comment for the protection',
' expiry - Adds the timestamp of when the protection will be lifted',