We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3937a2 commit 7f3c29cCopy full SHA for 7f3c29c
ApiEvalTitle.php
@@ -1,4 +1,7 @@
1
<?php
2
+
3
+use MediaWiki\MediaWikiServices;
4
5
class ApiEvalTitle extends ApiBase {
6
public function execute() {
7
$params = $this->extractRequestParams();
@@ -9,8 +12,10 @@ public function execute() {
9
12
$this->dieUsageMsg( 'notanarticle' );
10
13
}
11
14
15
+ $pm = MediaWikiServices::getInstance()->getPermissionManager();
16
17
PageTranslationHooks::$allowTargetEdit = true;
- $errors = $title->getUserPermissionsErrors( 'edit', $this->getUser() );
18
+ $errors = $pm->getPermissionErrors( 'edit', $this->getUser(), $title );
19
PageTranslationHooks::$allowTargetEdit = false;
20
if ( $errors ) {
21
$this->dieUsageMsg( reset( $errors ) );
0 commit comments