r50969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50968‎ | r50969 | r50970 >
Date:22:37, 24 May 2009
Author:robin
Status:ok
Tags:
Comment:
Update extensions per comments at r50961
Modified paths:
  • /trunk/extensions/ImageTagging/ImageTagging.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php
@@ -51,7 +51,7 @@
5252
5353 function checkUserRights() {
5454 if ( !$this->user->isAllowed( 'move' ) ) {
55 - $this->output->showErrorPage( 'movenologin', 'movenologintext' );
 55+ $this->output->showPermissionsErrorPage( 'move' );
5656 return false;
5757 }
5858 if ( $this->user->isBlocked() ) {
Index: trunk/extensions/ImageTagging/ImageTagging.php
@@ -423,7 +423,7 @@
424424 }
425425
426426 function modifiedImagePageOpenShowImage() {
427 - global $wgOut, $wgUser, $wgImageLimits, $wgRequest;
 427+ global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgEnableUploads;
428428
429429 wfProfileIn( __METHOD__ );
430430
@@ -546,11 +546,17 @@
547547 }
548548 } else {
549549 # 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>' );
555561 }
556562
557563 wfProfileOut( __METHOD__ );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50961Fixing part of bug 14688 (upload restrictions):...robin20:45, 24 May 2009

Status & tagging log