Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -469,17 +469,19 @@ |
470 | 470 | } |
471 | 471 | } else { |
472 | 472 | # Image does not exist |
473 | | - $nofile = wfMsgHtml( 'filepage-nofile' ); |
474 | 473 | if ( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) { |
475 | 474 | // 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 | + ); |
481 | 479 | } |
| 480 | + else |
| 481 | + { |
| 482 | + $nofile = wfMsgHtml( 'filepage-nofile' ); |
| 483 | + } |
482 | 484 | $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>' ); |
484 | 486 | } |
485 | 487 | } |
486 | 488 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1998,8 +1998,8 @@ |
1999 | 1999 | 'sharedupload-desc-here' => 'This file is from $1 and may be used by other projects. |
2000 | 2000 | The description on its [$2 file description page] there is shown below.', |
2001 | 2001 | '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].', |
2004 | 2004 | 'uploadnewversion-linktext' => 'Upload a new version of this file', |
2005 | 2005 | 'shared-repo-from' => 'from $1', |
2006 | 2006 | 'shared-repo' => 'a shared repository', |