HomePhabricator

mediawiki.util: Use wgScript in getUrl() when setting query string

Description

mediawiki.util: Use wgScript in getUrl() when setting query string

This makes the behaviour more in line with Title::getLocalURL() in PHP.

  • Only use wgArticlePath if there was a non-empty query string.
  • Remove needless call to isEmptyObject. This is already done by $.params().
  • Add test case "title with empty query string".

Change-Id: I414350a527eea3822ff2843c1c06a925f41a2c03

Details

Provenance
KrinkleAuthored on Apr 3 2016, 11:43 PM
Parents
rMW4f3379d478d3: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
I414350a527eea3822ff2843c1c06a925f41a2c03