Page MenuHomePhabricator

Don't use WikiMap for creating links to the central wiki on Special:Preferences / provide config var(s) to override WikiMap on sites which do not use $wgConf
Closed, ResolvedPublic

Description

When enabled, GlobalCssJs adds a "Shared CSS/JavaScript for all wikis" entry to the Appearance tab on Special:Preferences, right below "Shared CSS/JavaScript for all skins:". The links to the user's personal global.css and global.js pages are not generated at all if and when $wgConf isn't defined -- and that's the case for many non-Wikimedia wiki farms.

We need at least some kind of a configurable override to allow specifying the base URL in GlobalCssJsHooks::makeCentralLink. For ShoutWiki, I literally commented out the original WikiMap code and replaced it with this filthy hack:

			return '<a class="external" href="http://www.shoutwiki.com/wiki/' .
				htmlspecialchars( $title->getPrefixedText(), ENT_QUOTES ) .
				'">' . htmlspecialchars( $message, ENT_QUOTES ) . '</a>';

Needless to say that this isn't exactly a scalable solution and it makes upgrading the extension harder, too.

Event Timeline

ashley raised the priority of this task from to Needs Triage.
ashley updated the task description. (Show Details)
ashley added a project: GlobalCssJs.
ashley added subscribers: ashley, lcawte, Legoktm.

Change 226659 had a related patch set uploaded (by Jack Phoenix):
Don't require $wgConf in order to generate correct URLs on a wiki farm

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

Change 226659 merged by jenkins-bot:
Don't require $wgConf in order to generate correct URLs on a wiki farm

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