Last modified: 2013-11-14 19:54:54 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 T57764, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55764 - Rename mw.util.wikiGetlink to mw.util.getUrl
Rename mw.util.wikiGetlink to mw.util.getUrl
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.19
All All
: Low enhancement (vote)
: 1.22.x release
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-15 22:15 UTC by Jon
Modified: 2013-11-14 19:54 UTC (History)
7 users (show)

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


Attachments

Description Jon 2013-10-15 22:15:07 UTC
The fact the function name is not camel case is confusing (the l is actually lowercase).

Might I suggest we make it a more meaningful name e.g. mw.util.getUrl and support this name in a legacy JavaScript file?
Comment 1 Ryan Kaldari 2013-10-15 22:37:32 UTC
Agree, wikiGetlink is misleading (and should be camel case anyway).
Comment 2 Bartosz Dziewoński 2013-10-16 15:23:35 UTC
True. Let's mw.log.deprecate() it and use a saner name (getUrl looks okay, getPageUrl might be okay too).
Comment 3 Gerrit Notification Bot 2013-10-18 17:03:30 UTC
Change 90569 had a related patch set uploaded by Bartosz Dziewoński:
Rename mw.util.wikiGetlink to getUrl

https://gerrit.wikimedia.org/r/90569
Comment 4 Helder 2013-10-26 11:50:12 UTC
What about changing also:
* mw.util.rawurlencode -> mw.util.rawUrlEncode
* mw.util.wikiUrlencode -> mw.util.wikiUrlEncode
?
Comment 5 Bartosz Dziewoński 2013-10-26 20:29:20 UTC
(In reply to comment #4)
> * mw.util.rawurlencode -> mw.util.rawUrlEncode
> * mw.util.wikiUrlencode -> mw.util.wikiUrlEncode

rawurlencode() and urlencode() are functions in PHP, and these are PHP-isms.
We might want to rename them to something more JavaScriptey (related function in JS is called encodeURIComponent()).
Comment 6 Gerrit Notification Bot 2013-11-07 17:36:15 UTC
Change 90569 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

https://gerrit.wikimedia.org/r/90569
Comment 7 Gerrit Notification Bot 2013-11-07 22:36:05 UTC
Change 94270 had a related patch set uploaded by Krinkle:
Rename mw.util.wikiGetlink to getUrl

https://gerrit.wikimedia.org/r/94270
Comment 8 Gerrit Notification Bot 2013-11-07 22:40:00 UTC
Change 94271 had a related patch set uploaded by Krinkle:
Rename mw.util.wikiGetlink to getUrl

https://gerrit.wikimedia.org/r/94271
Comment 9 Gerrit Notification Bot 2013-11-07 22:59:58 UTC
Change 94270 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

https://gerrit.wikimedia.org/r/94270
Comment 10 Gerrit Notification Bot 2013-11-07 23:06:13 UTC
Change 94271 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

https://gerrit.wikimedia.org/r/94271
Comment 11 Gerrit Notification Bot 2013-11-14 19:40:33 UTC
Change 95474 had a related patch set uploaded by Catrope:
Rename mw.util.wikiGetlink to getUrl

https://gerrit.wikimedia.org/r/95474
Comment 12 Roan Kattouw 2013-11-14 19:53:37 UTC
Backported to 1.22
Comment 13 Gerrit Notification Bot 2013-11-14 19:54:54 UTC
Change 95474 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

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

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


Navigation
Links