User "Platonides" posted a comment on MediaWiki.r102299.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/102299#c25709
Commit summary:

Allow raw conditions on insertSelect, given that array syntax isn't always 
expressive enough (r96930)

Comment:

No. That's not free sql, but a field value. So using 
<code>$db->makeList(array("foo is not in ( 'a', 'b') "));</code> you get
 'foo is not in ( \'a\', \'b\') '
not the expected SQL.

Abstraction for NOT IN was added in r87992, but removed in r96930.

So instead of <code>array("oi_sha1!" => $badKeys)</code> I have to use this 
ugly code <source lang="php"> count ( $badKeys ) ? "oi_sha1 NOT IN (" . 
$db->makeList( $badKeys ) . ")" : "*"</source> '''plus''' this change to allow 
free SQL text. :(

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

Reply via email to