X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiUndelete.php;h=ba9be81beacb6c7cc525ec7abaa2c154f46f2868;hb=7ff1a16397aad6b14a957d964e583c8a86a57f72;hp=5f9b97c457a68d82033a659423a7b3bd5596340c;hpb=7621b57d958d0753236221227cbfb519d7faf192;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php index 5f9b97c457..ba9be81bea 100644 --- a/includes/api/ApiUndelete.php +++ b/includes/api/ApiUndelete.php @@ -41,7 +41,7 @@ class ApiUndelete extends ApiBase { $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['title'] ) ] ); } - if ( !$titleObj->userCan( 'undelete', $user, 'secure' ) ) { + if ( !$this->getPermissionManager()->userCan( 'undelete', $this->getUser(), $titleObj ) ) { $this->dieWithError( 'permdenied-undelete' ); }