"Catrope" changed the status of MediaWiki.r111001 to "fixme" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111001#c30624

Old Status: new
> New Status: fixme

Commit summary for MediaWiki.r111001:

ClickTracking: Refactor into a single method, allow overriding the namespace

Catrope's comment:

<pre>
+                       $.error("You must specify an event ID");
</pre>
<code>$.error( 'foo' )</code> just does <code>throw foo;</code> . You're better 
off doing <code>throw new Error( 'foo' );</code> because that generates a 
proper error, and Firebug shows a line number and a link to the code in that 
case.

<pre>+          if ( typeof options.namespace != 'undefined' ) {</pre>
One of Timo's pet peeves is that people should use <code>foo === 
undefined</code> rather than <code>typeof foo == 'undefined'</code> , because 
the latter is implemented with an actual string comparison.

<pre>+          $.post( mw.config.get( 'wgScriptPath' ) + '/api.php', 
data);</pre>
You should use <code>mw.util.wikiScript( 'api' )</code> to get the path to 
api.php (or api.php5!)

OK otherwise.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to