mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-24 10:48:42 +00:00
Hooks::isSupportedEditPage: Re-format to make the logic clearer
Change-Id: I8959f1bc4c632fb80fc02374d6ecfc94ef06d9fc
This commit is contained in:
parent
b7b526a8a5
commit
eb02880f20
|
@ -225,8 +225,10 @@ class VisualEditorHooks {
|
|||
* @return bool
|
||||
*/
|
||||
private static function isSupportedEditPage( Title $title, User $user, WebRequest $req ) {
|
||||
if ( $req->getVal( 'action' ) !== 'edit' || !MediaWikiServices::getInstance()
|
||||
->getPermissionManager()->quickUserCan( 'edit', $user, $title ) ) {
|
||||
if (
|
||||
$req->getVal( 'action' ) !== 'edit' ||
|
||||
!MediaWikiServices::getInstance()->getPermissionManager()->quickUserCan( 'edit', $user, $title )
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue