aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiComparePages.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2022-06-27 20:38:03 +0200
committerUmherirrender <umherirrender_de.wp@web.de>2022-06-29 22:22:44 +0200
commita5abaeba10ce766fe7179b84f56b75fcfdccada4 (patch)
treeee79e5d627dec2f43c9dfb23097641a0d056f305 /includes/api/ApiComparePages.php
parent65dee0142655e33209e6458348649bdfb56496b4 (diff)
downloadmediawikicore-a5abaeba10ce766fe7179b84f56b75fcfdccada4.tar.gz
mediawikicore-a5abaeba10ce766fe7179b84f56b75fcfdccada4.zip
Call IContextSource::getAuthority instead of IContextSource::getUser
Change to use Authority object where possible to use the interface instead of implementation Change-Id: Ia7e9ce2a2f05ef2ae1cf981bf96faf48b04cf58d
Diffstat (limited to 'includes/api/ApiComparePages.php')
-rw-r--r--includes/api/ApiComparePages.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/api/ApiComparePages.php b/includes/api/ApiComparePages.php
index e7453d20501e..c30eb7da3820 100644
--- a/includes/api/ApiComparePages.php
+++ b/includes/api/ApiComparePages.php
@@ -461,7 +461,7 @@ class ApiComparePages extends ApiBase {
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable T240141
$newRev = MutableRevisionRecord::newFromParentRevision( $rev );
$content = $rev->getContent( SlotRecord::MAIN, RevisionRecord::FOR_THIS_USER,
- $this->getUser() );
+ $this->getAuthority() );
if ( !$content ) {
$this->dieWithError(
[ 'apierror-missingcontent-revid-role', $rev->getId(), SlotRecord::MAIN ], 'missingcontent'
@@ -562,7 +562,7 @@ class ApiComparePages extends ApiBase {
if ( !$rev ) {
$this->dieWithError( "apierror-compare-no{$prefix}revision" );
}
- $oldContent = $rev->getContent( $role, RevisionRecord::FOR_THIS_USER, $this->getUser() );
+ $oldContent = $rev->getContent( $role, RevisionRecord::FOR_THIS_USER, $this->getAuthority() );
if ( !$oldContent ) {
$this->dieWithError(
[ 'apierror-missingcontent-revid-role', $rev->getId(), wfEscapeWikiText( $role ) ],
@@ -642,7 +642,7 @@ class ApiComparePages extends ApiBase {
$anyHidden = true;
}
if ( isset( $this->props['user'] ) ) {
- $user = $rev->getUser( RevisionRecord::FOR_THIS_USER, $this->getUser() );
+ $user = $rev->getUser( RevisionRecord::FOR_THIS_USER, $this->getAuthority() );
if ( $user ) {
$vals["{$prefix}user"] = $user->getName();
$vals["{$prefix}userid"] = $user->getId();
@@ -654,7 +654,7 @@ class ApiComparePages extends ApiBase {
$anyHidden = true;
}
if ( isset( $this->props['comment'] ) || isset( $this->props['parsedcomment'] ) ) {
- $comment = $rev->getComment( RevisionRecord::FOR_THIS_USER, $this->getUser() );
+ $comment = $rev->getComment( RevisionRecord::FOR_THIS_USER, $this->getAuthority() );
if ( $comment !== null ) {
if ( isset( $this->props['comment'] ) ) {
$vals["{$prefix}comment"] = $comment->text;