Index: trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | |
53 | 53 | function checkUserRights() { |
54 | 54 | if ( !$this->user->isAllowed( 'move' ) ) { |
55 | | - $this->output->showErrorPage( 'movenologin', 'movenologintext' ); |
| 55 | + $this->output->showPermissionsErrorPage( 'move' ); |
56 | 56 | return false; |
57 | 57 | } |
58 | 58 | if ( $this->user->isBlocked() ) { |
Index: trunk/extensions/ImageTagging/ImageTagging.php |
— | — | @@ -423,7 +423,7 @@ |
424 | 424 | } |
425 | 425 | |
426 | 426 | function modifiedImagePageOpenShowImage() { |
427 | | - global $wgOut, $wgUser, $wgImageLimits, $wgRequest; |
| 427 | + global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgEnableUploads; |
428 | 428 | |
429 | 429 | wfProfileIn( __METHOD__ ); |
430 | 430 | |
— | — | @@ -546,11 +546,17 @@ |
547 | 547 | } |
548 | 548 | } else { |
549 | 549 | # Image does not exist |
550 | | - |
551 | | - $title = Title::makeTitle( NS_SPECIAL, 'Upload' ); |
552 | | - $link = $sk->makeKnownLinkObj($title, wfMsgHtml('noimage-linktext'), |
553 | | - 'wpDestFile=' . urlencode( $this->img->getName() ) ); |
554 | | - $wgOut->addHTML( wfMsgWikiHtml( 'noimage', $link ) ); |
| 550 | + $nofile = wfMsgHtml( 'filepage-nofile' ); |
| 551 | + if ( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) { |
| 552 | + // Only show an upload link if the user can upload |
| 553 | + $nofile .= ' '.$sk->makeKnownLinkObj( |
| 554 | + SpecialPage::getTitleFor( 'Upload' ), |
| 555 | + wfMsgHtml('filepage-nofile-link'), |
| 556 | + 'wpDestFile=' . urlencode( $this->displayImg->getName() ) |
| 557 | + ); |
| 558 | + } |
| 559 | + $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
| 560 | + $wgOut->addHTML( '<div id="mw-imagepage-nofile">' . $nofile . '</div>' ); |
555 | 561 | } |
556 | 562 | |
557 | 563 | wfProfileOut( __METHOD__ ); |