Page MenuHomePhabricator

Set $wgUploadNavigationUrl for few wikis
Open, LowPublic

Description

Currently set by javascript : some of them also change the label of the link, so we'll need to set the text y using a Mediawiki: page too.

MediaWiki:Common.js @ frwikt
/*******************************************************************************
 * === Lien d'import de fichiers ===
 * Changer le lien d'import en lien vers la page [[Aide:Importer un fichier]].
 * Copié depuis Wikipédia.
*******************************************************************************/
jQuery(function() {
	$( '#t-upload a' ).attr( 'href', '/wiki/Aide:Importer_un_fichier' );
});
MediaWiki:Common.js @ cawiki
/**
 * Enllaç de càrrega per defecte a la pàgina d'ajuda
 * Amb els ginys es pot eliminar i es pot afegir també un enllaç a Commons
 */
var LienUpload = function () {
  var uploadLink = document.getElementById("t-upload");
  if (!uploadLink) return;
 
  var a = uploadLink.firstChild;
  a.setAttribute('href', '/wiki/Ajuda:Carregar_un_fitxer');
};
$(LienUpload);
MediaWiki:Common.js @ frwikiversity
/**
 * Lien d'import
 * Changer le lien d'import en lien vers la page [[Aide:Importer un fichier]] (depuis fr.wikipedia)
 */
function LienUpload() {
  uploadLink = document.getElementById("t-upload");
  if (!uploadLink) return;

  a = uploadLink.firstChild;
  a.setAttribute('href', '/wiki/Aide:Importer_un_fichier');
}
jQuery(document).ready(LienUpload);
MediaWiki:Common.js @ kuwiki
/**
* Wêneyekî Commonsê bar bike
*/
if (document.getElementById('t-upload')){
    var link = document.getElementById('t-upload');
    var a_link = link.firstChild;
    a_link.href = '//commons.wikimedia.org/wiki/Commons:Upload?uselang=ku';
    a_link.title = 'Li Wikimedia Commonsê wêneyekî bar bike';
}
MediaWiki:Common.js @ nlwikt/nlwikiquote/nlwikisource/nlwikivoyage
// De uploadlinks in de zijbalk verwijzen hiermee naar Commons
function uploadlinkToCommons() {
   var upload = document.getElementById("t-upload");
   if(!upload) return;
   upload.getElementsByTagName('a')[0].href = "//commons.wikimedia.org/wiki/Commons:Upload/nl?uselang=" + mw.config.get('wgUserLanguage');
}
$(uploadlinkToCommons);
MediaWiki:Common.js @ svwikiversity
/**
* Ändrar uppladdningslänken i verktygslådan till att hänvisa till sidan [[Wikipedia:Ladda upp filer]]
*/
function LienUpload() {
  var uploadLink = document.getElementById("t-upload");
  if (!uploadLink) return;
  var a = uploadLink.firstChild;
  a.setAttribute('href', '/wiki/Wikiversity:Ladda_upp_filer');
}
      
$(LienUpload);
MediaWiki:Common.js @ ukwiki
$( '#t-upload' ).find( 'a' ).prop( {
    href: '/wiki/Вікіпедія:Майстер завантаження файлів'
} );
MediaWiki:Common.js @ viwiki
/* Cố định liên kết "Tải tập tin lên"
 */
mw.hook("wikipage.content").add(function() {
	$("#t-upload a").attr("href", mw.util.getUrl("Wikipedia:Tải tập tin lên"));
});
MediaWiki:Common.js @ viwikit/viwikibooks
/* Chuyển hướng liên kết "Tải lên tập tin" đến Wikimedia Commons.
 */
mw.hook("wikipage.content").add(function() {
	$("#t-upload a").attr("href", mw.util.getUrl("Commons:Special:UploadWizard"));
});
MediaWiki:Common.js @ viwikisource
/**
 * Cố định liên kết "Tải lên tập tin".
 */
mw.hook("wikipage.content").add(function() {
    $("#t-upload a").attr("href", mw.util.getUrl("Commons:Special:UploadWizard/vi"));
});

Details

Related Gerrit Patches:
operations/mediawiki-config : masterSet $wgUploadNavigationUrl for few wikis
operations/mediawiki-config : masterSet $wgUploadNavigationUrl for fr.wikt

Event Timeline

Framawiki created this task.Jul 9 2017, 3:52 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 9 2017, 3:52 PM

Change 364115 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[operations/mediawiki-config@master] Set $wgUploadNavigationUrl for fr.wikt

https://gerrit.wikimedia.org/r/364115

Framawiki renamed this task from Set $wgUploadNavigationUrl for fr.wikt to Set $wgUploadNavigationUrl for few wikis.Jul 9 2017, 4:42 PM
Framawiki removed a project: Patch-For-Review.
Framawiki updated the task description. (Show Details)
Restricted Application added a subscriber: Base. · View Herald TranscriptJul 9 2017, 4:42 PM

Change 364115 abandoned by Framawiki:
Set $wgUploadNavigationUrl for fr.wikt

Reason:
I'll do this for few other wikis in one commit, see the task

https://gerrit.wikimedia.org/r/364115

Framawiki updated the task description. (Show Details)Jul 9 2017, 6:05 PM

Change 364121 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[operations/mediawiki-config@master] Set $wgUploadNavigationUrl for few wikis

https://gerrit.wikimedia.org/r/364121

Framawiki added a comment.EditedJul 9 2017, 6:14 PM

Since this patch will not change something for the user, but only replace the method that generate the link, a notification on-wiki does not seem useful to me.

Since this patch will not change something for the user, but only replace the method that generate the link, a notification on-wiki does not seem useful to me.

I do think we should notify about all changes we make without prior community request. It doesnt have to be and shouldnt be at main village pump always.

I'll tell you a real story. A project wish to change their logo temporary. A request at administrator's noticeboard was made as before. Processing admin reuploaded Wiki.png as previously but nothing happened. He thought it must be cache and forgotted about it. Later the day the requestor asked why nothing happened. Because nobody knew what to do, he filled a ticket here at Phab. Reply was something like "we must use conf change". If there was notif before changing this Im pretty sure somebody will know and everything is faster.

By the way this is a case when we should notify sysops they can remove useless code now (or remove it ourselves, are you global interface editor?).