r50975 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50974‎ | r50975 | r50976 >
Date:13:42, 25 May 2009
Author:purodha
Status:ok
Tags:
Comment:
Fix r50972
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -469,17 +469,19 @@
470470 }
471471 } else {
472472 # Image does not exist
473 - $nofile = wfMsgHtml( 'filepage-nofile' );
474473 if ( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) {
475474 // Only show an upload link if the user can upload
476 - $nofile .= ' '.$sk->makeKnownLinkObj(
477 - SpecialPage::getTitleFor( 'Upload' ),
478 - wfMsgHtml('filepage-nofile-link'),
479 - 'wpDestFile=' . urlencode( $this->displayImg->getName() )
480 - );
 475+ $uploadTitle = SpecialPage::getTitleFor( 'Upload' );
 476+ $nofile = wfMsgHtml('filepage-nofile-link',
 477+ $uploadTitle->getFullUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) )
 478+ );
481479 }
 480+ else
 481+ {
 482+ $nofile = wfMsgHtml( 'filepage-nofile' );
 483+ }
482484 $wgOut->setRobotPolicy( 'noindex,nofollow' );
483 - $wgOut->addHTML( '<div id="mw-imagepage-nofile">' . $nofile . '</div>' );
 485+ $wgOut->addHTML( '<div id="mw-imagepage-nofile" class="plainlinks">' . $nofile . '</div>' );
484486 }
485487 }
486488
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1998,8 +1998,8 @@
19991999 'sharedupload-desc-here' => 'This file is from $1 and may be used by other projects.
20002000 The description on its [$2 file description page] there is shown below.',
20012001 'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages
2002 -'filepage-nofile' => 'No file by this name exists, but',
2003 -'filepage-nofile-link' => 'you can upload it.',
 2002+'filepage-nofile' => 'No file by this name exists.',
 2003+'filepage-nofile-link' => 'No file by this name exists, but you can [$1 upload it].',
20042004 'uploadnewversion-linktext' => 'Upload a new version of this file',
20052005 'shared-repo-from' => 'from $1',
20062006 'shared-repo' => 'a shared repository',

Follow-up revisions

RevisionCommit summaryAuthorDate
r51900Fix regression probably from r50975 - link was not parsednikerabbit13:20, 15 June 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50972Misguiding message text amended. See hint at...purodha09:48, 25 May 2009

Status & tagging log