Last modified: 2014-03-14 22:47:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63838, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61838 - $wgShortUrlTemplate option not functional
$wgShortUrlTemplate option not functional
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
ShortUrl (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Yuvi Panda
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-23 23:30 UTC by Daniel Norton
Modified: 2014-03-14 22:47 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
ShortUrl patch to make $wgShortUrlTemplate function (1.02 KB, patch)
2014-02-23 23:30 UTC, Daniel Norton
Details

Description Daniel Norton 2014-02-23 23:30:13 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.
Comment 1 Andre Klapper 2014-02-24 10:37:46 UTC
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/
Comment 2 Daniel Norton 2014-02-25 23:33:14 UTC
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.
Comment 3 Daniel Norton 2014-03-14 22:47:10 UTC
Not a bug. Config values need to be *after* the require_once statement, as described at Manual:Extensions.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links