Avoid making master connection from Skin::getUndeleteLink
authorThalia <thalia.e.chan@googlemail.com>
Wed, 30 Jan 2019 22:32:52 +0000 (14:32 -0800)
committerThalia <thalia.e.chan@googlemail.com>
Wed, 30 Jan 2019 22:51:27 +0000 (14:51 -0800)
Do this by calling Title:quickUserCan instead of Title::userCan
from Skin::getUndeleteLink.

Bug: T214735
Change-Id: I24dfd86275638e52012a5647ab3e5c848af840c2

includes/skins/Skin.php

index 7a2679e..54dfff3 100644 (file)
@@ -719,7 +719,7 @@ abstract class Skin extends ContextSource {
                $title = $this->getTitle();
 
                if ( ( !$title->exists() || $action == 'history' ) &&
-                       $title->userCan( 'deletedhistory', $this->getUser() )
+                       $title->quickUserCan( 'deletedhistory', $this->getUser() )
                ) {
                        $n = $title->isDeleted();