X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryRecentChanges.php;h=49d4c8c05c7c1d7d090fa069c6f06991b1820fd5;hb=d23738002136761e34f11d72e7dd7eea65e3b655;hp=ed0a2a7a05044f7f77cfb54ce22055ede21c6ea4;hpb=4b6ec5c4910281c268d5a7a12f0ea114e8430ace;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index ed0a2a7a05..49d4c8c05c 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -224,7 +224,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { $this->addWhereIf( 'page_is_redirect = 1', isset( $show['redirect'] ) ); if ( isset( $show['unpatrolled'] ) ) { - // See ChangesList:isUnpatrolled + // See ChangesList::isUnpatrolled if ( $user->useRCPatrol() ) { $this->addWhere( 'rc_patrolled = 0' ); } elseif ( $user->useNPPatrol() ) { @@ -289,7 +289,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { $this->addFieldsIf( 'rc_user_text', $this->fld_user ); $this->addFieldsIf( array( 'rc_minor', 'rc_type', 'rc_bot' ), $this->fld_flags ); $this->addFieldsIf( array( 'rc_old_len', 'rc_new_len' ), $this->fld_sizes ); - $this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled ); + $this->addFieldsIf( array( 'rc_patrolled', 'rc_log_type' ), $this->fld_patrolled ); $this->addFieldsIf( array( 'rc_logid', 'rc_log_type', 'rc_log_action', 'rc_params' ), $this->fld_loginfo @@ -552,7 +552,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { } if ( Revision::userCanBitfield( $row->rev_deleted, Revision::DELETED_TEXT, $user ) ) { if ( $row->rev_sha1 !== '' ) { - $vals['sha1'] = wfBaseConvert( $row->rev_sha1, 36, 16, 40 ); + $vals['sha1'] = Wikimedia\base_convert( $row->rev_sha1, 36, 16, 40 ); } else { $vals['sha1'] = ''; } @@ -678,14 +678,9 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 ), 'type' => array( - ApiBase::PARAM_DFLT => 'edit|new|log', + ApiBase::PARAM_DFLT => 'edit|new|log|categorize', ApiBase::PARAM_ISMULTI => true, - ApiBase::PARAM_TYPE => array( - 'edit', - 'external', - 'new', - 'log' - ) + ApiBase::PARAM_TYPE => RecentChange::getChangeTypes() ), 'toponly' => false, 'continue' => array(