(bug 14980) Make shareduploadwiki(-desc) a param to sharedupload. Also RELEASE-NOTES...
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 17 Feb 2009 23:18:40 +0000 (23:18 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 17 Feb 2009 23:18:40 +0000 (23:18 +0000)
RELEASE-NOTES
includes/ImagePage.php
languages/messages/MessagesEn.php

index 2efafb7..8912e9a 100644 (file)
@@ -107,6 +107,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   next section anyway.
 * Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from
   rate limits.
+* (bug 14981) Shared repositories can now have display names, located at
+  Mediawiki:Shared-repo-name-REPONAME, where REPONAME is the name in 
+  $wgForeignFileRepos
 
 === Bug fixes in 1.15 ===
 * (bug 16968) Special:Upload no longer throws useless warnings.
@@ -184,6 +187,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 17506) Exceptions within exceptions now respect $wgShowExceptionDetails
 * Fixed excessive job queue utilisation
 * File dupe messages for remote repos are now shown only once.
+* (bug 14980) Messages 'shareduploadwiki' and 'shareduploadwiki-desc' are now
+  used as a parameter in 'sharedupload' for easier styling and customization.
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index afa1d9a..9eed236 100644 (file)
@@ -481,17 +481,18 @@ EOT
 
                $descUrl = $this->img->getDescriptionUrl();
                $descText = $this->img->getDescriptionText();
-               $s = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml( 'sharedupload' );
+               $msg = '';
                if( $descUrl ) {
                        $sk = $wgUser->getSkin();
                        $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadwiki-linktext' ) );
                        $msg = ( $descText ) ? 'shareduploadwiki-desc' : 'shareduploadwiki';
                        $msg = wfMsgExt( $msg, array( 'parseinline', 'replaceafter' ), $link );
-                       if( $msg != '-' ) {
-                               # Show message only if not voided by local sysops
-                               $s .= $msg;
+                       if( $msg == '-' ) {
+                               $msg = '';
                        }
                }
+               $s  = "<div class='sharedUploadNotice'>";
+               $s .= wfMsgWikiHtml( 'sharedupload', $this->img->getRepo()->getDisplayName(), $msg );
                $s .= "</div>";
                $wgOut->addHTML( $s );
 
index 1317f3f..e74a5df 100644 (file)
@@ -1969,9 +1969,9 @@ A [[Special:WhatLinksHere/$2|full list]] is available.',
 'morelinkstoimage'               => 'View [[Special:WhatLinksHere/$1|more links]] to this file.',
 'redirectstofile'                => 'The following {{PLURAL:$1|file redirects|$1 files redirect}} to this file:',
 'duplicatesoffile'               => 'The following {{PLURAL:$1|file is a duplicate|$1 files are duplicates}} of this file ([[Special:FileDuplicateSearch/$2|more details]]):',
-'sharedupload'                   => 'This file is a shared upload and may be used by other projects.',
+'sharedupload'                   => 'This file is from $1 and may be used by other projects. $2', // $1 is the repo name, $2 is shareduploadwiki(-desc)
 'shareduploadwiki'               => 'Please see the $1 for further information.',
-'shareduploadwiki-desc'          => 'The description on its $1 on the shared repository is shown below.',
+'shareduploadwiki-desc'          => 'The description on its $1 on is shown below.',
 'shareduploadwiki-linktext'      => 'file description page',
 'shareddescriptionfollows'       => '-', # do not translate or duplicate this message to other languages
 'noimage'                        => 'No file by this name exists, but you can $1.',