Here's the docblock for that function:
/**
* Provide a list of options for the operator form.
*
* There is a patch in the Search API issue queue that adds the 'is null' and
* 'is not null' operators to the Search API Views filter handler; if that
* patch is committed, this method can be removed.
* @see http://drupal.org/node/1318904#comment-5817206
*/
That Search API issue was committed, although it keys and labels the options as empty/not empty instead of NULL/NOT NULL. The query code is the same, filtering the values if they're NULL or NOT NULL. So while this function isn't necessary, it's possible that removing it would break some views that Sarnia users have set up. That's why I set the issue status to Postponed.
Maybe there's a way to update everyone's views. I didn't look into it. If not, then we probably need to find some way to deprecate the options and let people know that they need to switch.
The attached patch just reverts commit 65e3898a0a2689d158dc6ce5eb78994fe54b0e63, which added the two options.
Comment | File | Size | Author |
---|---|---|---|
remove-views-option-definition-method.patch | 1.62 KB | dcam | |
Comments
Comment #1
jmdeleon CreditAttribution: jmdeleon commentedI'm leaning towards committing this... I've been running with this patch for some time now, and while I have not had to do many NULL/empty tests in my Views, I've not encountered any issues with removing the functions.
Comment #2
jmdeleon CreditAttribution: jmdeleon commentedComment #4
jmdeleon CreditAttribution: jmdeleon commentedComment #10
jmdeleon CreditAttribution: jmdeleon commentedComment #11
jmdeleon CreditAttribution: jmdeleon commentedComment #14
jmdeleon CreditAttribution: jmdeleon commented