Rename mw.util.wikiGetlink to mw.util.getUrl
Closed, ResolvedPublic

Description

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?


Version: 1.19
Severity: enhancement

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz55764.
Jdlrobson created this task.Via LegacyOct 15 2013, 10:15 PM
kaldari added a comment.Via ConduitOct 15 2013, 10:37 PM

Agree, wikiGetlink is misleading (and should be camel case anyway).

matmarex added a comment.Via ConduitOct 16 2013, 3:23 PM

True. Let's mw.log.deprecate() it and use a saner name (getUrl looks okay, getPageUrl might be okay too).

gerritbot added a comment.Via ConduitOct 18 2013, 5:03 PM

Change 90569 had a related patch set uploaded by Bartosz Dziewoński:
Rename mw.util.wikiGetlink to getUrl

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

He7d3r added a comment.Via ConduitOct 26 2013, 11:50 AM

What about changing also:

  • mw.util.rawurlencode -> mw.util.rawUrlEncode
  • mw.util.wikiUrlencode -> mw.util.wikiUrlEncode

?

matmarex added a comment.Via ConduitOct 26 2013, 8:29 PM

(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()).

gerritbot added a comment.Via ConduitNov 7 2013, 5:36 PM

Change 90569 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

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

gerritbot added a comment.Via ConduitNov 7 2013, 10:36 PM

Change 94270 had a related patch set uploaded by Krinkle:
Rename mw.util.wikiGetlink to getUrl

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

gerritbot added a comment.Via ConduitNov 7 2013, 10:40 PM

Change 94271 had a related patch set uploaded by Krinkle:
Rename mw.util.wikiGetlink to getUrl

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

gerritbot added a comment.Via ConduitNov 7 2013, 10:59 PM

Change 94270 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

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

gerritbot added a comment.Via ConduitNov 7 2013, 11:06 PM

Change 94271 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

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

gerritbot added a comment.Via ConduitNov 14 2013, 7:40 PM

Change 95474 had a related patch set uploaded by Catrope:
Rename mw.util.wikiGetlink to getUrl

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

Catrope added a comment.Via ConduitNov 14 2013, 7:53 PM

Backported to 1.22

gerritbot added a comment.Via ConduitNov 14 2013, 7:54 PM

Change 95474 merged by jenkins-bot:
Rename mw.util.wikiGetlink to getUrl

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.