User "NeilK" posted a comment on MediaWiki.r86150.
Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/86150#c16315
Commit summary:
refactored Feedback tool out of uploadwizard. Still dependent on some UW
libraries but this is going to be generally useful
so we might as well start separating it.
made Feedback generally easier to read, now an object managing its state
internationalized some remaining english strings
eliminated various string hacking and such with mw.Title and the linking
features in mediawiki.language.parser
added a 'newSection' method to mw.Api.edit.js, so Feedback could call it
Comment:
> Can't you just use _this.buttons[ gM( 'foo' ) ] = _this.cancel; ?
Nope, that's not how Javascript works, sadly. Consider...
function Foo(x) {
this.x = x;
}
Foo.prototype = {
getX: function() {
return this.x;
}
}
var f = new Foo("blah");
console.log( f.getX() ); // "blah";
var fgetX = f.getX;
console.log( fgetX() ); // undefined
> This leaks message into the global scope.
fixed in r86868.
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview