* Introduce a cryptographic random number generator source api for use when
generating various tokens.
* (bug 30963) Option on Special:Prefixindex and Special:Allpages to not show redirects.
+* (bug 18062) new message when edit or create the local page of a shared file
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
if ( $namespace == NS_MEDIAWIKI ) {
# Show a warning if editing an interface message
$wgOut->wrapWikiMsg( "<div class='mw-editinginterface'>\n$1\n</div>", 'editinginterface' );
+ } else if( $namespace == NS_FILE ) {
+ # Show a hint to shared repo
+ $file = wfFindFile( $this->mTitle );
+ if( $file && !$file->isLocal() ) {
+ $descUrl = $file->getDescriptionUrl();
+ # there must be a description url to show a hint to shared repo
+ if( $descUrl ) {
+ if( !$this->mTitle->exists() ) {
+ $wgOut->wrapWikiMsg( "<div class=\"mw-sharedupload-desc-create\">\n$1\n</div>", array (
+ 'sharedupload-desc-create', $file->getRepo()->getDisplayName(), $descUrl
+ ) );
+ } else {
+ $wgOut->wrapWikiMsg( "<div class=\"mw-sharedupload-desc-edit\">\n$1\n</div>", array(
+ 'sharedupload-desc-edit', $file->getRepo()->getDisplayName(), $descUrl
+ ) );
+ }
+ }
+ }
}
# Show a warning message when someone creates/edits a user (talk) page but the user does not exist
Please see the [$2 file description page] for further information.',
'sharedupload-desc-here' => 'This file is from $1 and may be used by other projects.
The description on its [$2 file description page] there is shown below.',
+'sharedupload-desc-edit' => 'This file is from $1 and may be used by other projects.
+Maybe you want edit the description on its [$2 file description page] there.',
+'sharedupload-desc-create' => 'This file is from $1 and may be used by other projects.
+Maybe you want edit the description on its [$2 file description page] there.',
'shareddescriptionfollows' => '-', # do not translate or duplicate this message to other languages
'filepage-nofile' => 'No file by this name exists.',
'filepage-nofile-link' => 'No file by this name exists, but you can [$1 upload it].',
{{doc-important|Do not customise this message. Just translate it.|Customisation should be done by local wikis.}}',
'sharedupload-desc-there' => ':See also: {{msg-mw|Sharedupload}}',
'sharedupload-desc-here' => ':See also: {{msg-mw|Sharedupload}}',
+'sharedupload-desc-edit' => ':See also: {{msg-mw|Sharedupload}}',
+'sharedupload-desc-create' => ':See also: {{msg-mw|Sharedupload}}',
'filepage-nofile' => "This message appears when visiting a File page for which there's no file, if the user cannot upload files, or file uploads are disabled. (Otherwise, see {{msg-mw|Filepage-nofile-link}})
Filepage-nofile and Filepage-nofile-link message deprecate {{msg-mw|Noimage}}",
'sharedupload',
'sharedupload-desc-there',
'sharedupload-desc-here',
+ 'sharedupload-desc-edit',
+ 'sharedupload-desc-create',
'shareddescriptionfollows',
'filepage-nofile',
'filepage-nofile-link',