Last modified: 2014-03-14 22:47:10 UTC
Created attachment 14666 [details] ShortUrl patch to make $wgShortUrlTemplate function The ShortUrl extension documents a capability by which you can change the default path of a short URL, normally .../Special:ShortUrl/NNNN This is to be achieved by setting a global variable $wgShortUrlTemplate, specifying the path component to use instead of the default. e.g. $wgShortUrlTemplate = "/r/$1"; This would make the path .../r/NNNN This capability simply doesn't work. Examining the code, the extension clobbers $wgShortUrlTemplate, replacing it with the default value (false). The attached patch file suggests a fix and adds minor doc/comment cleanup.
Thanks for your patch! You are welcome to use Developer access https://www.mediawiki.org/wiki/Developer_access to submit this as a Git branch directly into Gerrit: https://www.mediawiki.org/wiki/Git/Tutorial Putting your branch in Git makes it easier to review it quickly. If you don't want to set up Git/Gerrit, you can also use https://tools.wmflabs.org/gerrit-patch-uploader/
Actually, as I'm a n00b, I think this might not be a bug, after all. I was presuming that extension configuration values should be settable along with all other configuration values, but it looks like they might generally need to be set after the extension is loaded. If that's done, everything works as expected.
Not a bug. Config values need to be *after* the require_once statement, as described at Manual:Extensions.