Last modified: 2012-02-23 01:33:39 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 T36603, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34603 - Allow usage of mw.util in altered scope/ environment
Allow usage of mw.util in altered scope/ environment
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.17.x
All All
: Normal minor (vote)
: 1.19.0 release
Assigned To: Krinkle
: patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-23 00:29 UTC by Rainer Rillke @commons.wikimedia
Modified: 2012-02-23 01:33 UTC (History)
1 user (show)

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


Attachments
patch that changes *this* to *util* allowing calling this function with another *this* or even no *this* (543 bytes, text/x-c++)
2012-02-23 00:29 UTC, Rainer Rillke @commons.wikimedia
Details
Re-attach original file with proper mime-type to allow viewing in bugzilla (543 bytes, patch)
2012-02-23 00:31 UTC, Krinkle
Details

Description Rainer Rillke @commons.wikimedia 2012-02-23 00:29:20 UTC
Created attachment 10074 [details]
patch that changes *this* to *util* allowing calling this function with another *this* or even no *this*

Krinkle assigned on Commons e.g.
addPortletLink = mw.util.addPortletLink;

This may cause errors if references to *this* (util) are made like in addPortletLink. Most of the code does not use *this*, instead it refers to *util*.

Background (commons-specific): On css pages this caused "this is undefined", called from MediaWiki:Gadget-CSSValidate.js
Comment 1 Krinkle 2012-02-23 00:31:40 UTC
Created attachment 10075 [details]
Re-attach original file with proper mime-type to allow viewing in bugzilla
Comment 2 Krinkle 2012-02-23 00:40:13 UTC
Thanks, applied in r112170 together with more fixes of `this` to `util`.
Comment 3 Rainer Rillke @commons.wikimedia 2012-02-23 01:26:47 UTC
Bugmeister? It seems to be impossible to select a mime-type when submitting a new bug? Right?
Comment 4 Krinkle 2012-02-23 01:33:39 UTC
(In reply to comment #3)
> Bugmeister? It seems to be impossible to select a mime-type when submitting a
> new bug? Right?

mime-type is determined by the file you upload, not on BugZilla. Yours had "text/x-c++". The override during upload does indeed appear to absent when creating a new bug, only shown on existing bugs when attaching files. Instead of mime-type one can also check "[_] Patch" which takes care of it automatically, although that one is also invisible during bug creation.

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


Navigation
Links