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 28d3f5f commit 21e320dCopy full SHA for 21e320d
ApiEvalTitle.php
@@ -1,6 +1,7 @@
1
<?php
2
3
use MediaWiki\MediaWikiServices;
4
+use MediaWiki\Extension\Translate\PageTranslation\Hooks;
5
6
class ApiEvalTitle extends ApiBase {
7
public function execute() {
@@ -15,9 +16,9 @@ public function execute() {
15
16
$pm = MediaWikiServices::getInstance()->getPermissionManager();
17
$user = $this->getUser();
18
- PageTranslationHooks::$allowTargetEdit = true;
19
+ Hooks::$allowTargetEdit = true;
20
$errors = $pm->getPermissionErrors( 'edit', $user, $title );
- PageTranslationHooks::$allowTargetEdit = false;
21
+ Hooks::$allowTargetEdit = false;
22
if ( $errors ) {
23
$this->dieStatus( $this->errorArrayToStatus( $errors, $user ) );
24
}
0 commit comments