User "NeilK" posted a comment on MediaWiki.r93608.
Full URL:
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/93608#c21140
Commit summary:
do not show custom license selection option when there are no licenses
available different then the default one
Comment:
I think we can safely change this line:
_this.showCustomDiv = ownWork.licenses.length > 1 || (
ownWork.licenses.length == 1 && ownWork.licenses[0] != ownWork.defaults[0] );
to this:
_this.showCustomDiv = ownWork.licenses.length > 1;
There shouldn't be any situation where the default license is not in the
license list. Unless there's some other scenario now possible with WLM that I
don't know about?
Also, that line was way too difficult to understand anyway. Should have been a
few lines, and should have used triple equals ( === and !== ).
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview