Use quickUserCan() for the undelete link message
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 4 Dec 2014 00:01:26 +0000 (16:01 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 4 Dec 2014 00:01:26 +0000 (16:01 -0800)
* This was taking 267.304ms on https://en.wikipedia.org/wiki/Tammar_wallaby for admins

Change-Id: I0e669869e1990502331a80de168562421ac5336d

includes/skins/Skin.php

index 384aeda..5604bc2 100644 (file)
@@ -660,7 +660,7 @@ abstract class Skin extends ContextSource {
                        $n = $this->getTitle()->isDeleted();
 
                        if ( $n ) {
-                               if ( $this->getTitle()->userCan( 'undelete', $this->getUser() ) ) {
+                               if ( $this->getTitle()->quickUserCan( 'undelete', $this->getUser() ) ) {
                                        $msg = 'thisisdeleted';
                                } else {
                                        $msg = 'viewdeleted';