Merge "Avoid master queries on image history view"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 21 Sep 2015 09:40:39 +0000 (09:40 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 21 Sep 2015 09:40:39 +0000 (09:40 +0000)
1  2 
includes/page/ImagePage.php

@@@ -709,10 -709,10 +709,10 @@@ EO
                $out->addHTML( "<ul>\n" );
  
                # "Upload a new version of this file" link
 -              $canUpload = $this->getTitle()->userCan( 'upload', $this->getContext()->getUser() );
 +              $canUpload = $this->getTitle()->quickUserCan( 'upload', $this->getContext()->getUser() );
                if ( $canUpload && UploadBase::userCanReUpload(
                                $this->getContext()->getUser(),
-                               $this->mPage->getFile()->name )
+                               $this->mPage->getFile() )
                ) {
                        $ulink = Linker::makeExternalLink(
                                $this->getUploadUrl(),