r87369 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87368‎ | r87369 | r87370 >
Date:23:23, 3 May 2011
Author:neilk
Status:ok (Comments)
Tags:
Comment:
more docs for the various methods you can use
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.Title.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.Title.js
@@ -17,6 +17,13 @@
1818 * - NameText = "Foo bar"
1919 * - Extension "jpg"
2020 *
 21+ * all of the above are implemented as 'get' functions, i.e
 22+ * getPrefixedDb(), getPrefixedText(), etc.
 23+ *
 24+ * in addition:
 25+ * .toString(), and therefore all string coercions, are the same as getPrefixedDb();
 26+ * .toText() gives you the most common human-readable representation (getPrefixedText()).
 27+ *
2128 * n.b. this class does not handle URI-escaping
2229 *
2330 * n.b. this class relies on the existence of two globals:

Comments

#Comment by Nikerabbit (talk | contribs)   07:43, 4 May 2011

Wouldn't it be nice if this followed the same naming conventions as in PHP side?

#Comment by NeilK (talk | contribs)   15:20, 4 May 2011

As far as I can tell it does try to use the same terminology, although with a bit more consistency. If I was to invent a name for something, it wouldn't have been 'PrefixedDb'. What is missing for you?

This isn't an equivalent of Title.php. It just deals with some aspects of page naming that tend to come up on the client side.

#Comment by Nikerabbit (talk | contribs)   16:35, 4 May 2011

getText() is ?

Status & tagging log