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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jmdeleon’s picture

I'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.

jmdeleon’s picture

Status: Postponed » Active

  • jmdeleon committed 7caed26 on 7.x-1.x authored by dcam
    Issue #2496751 by dcam: Delete SarniaViewsHandlerFilter::...
jmdeleon’s picture

Status: Active » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, remove-views-option-definition-method.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, remove-views-option-definition-method.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, remove-views-option-definition-method.patch, failed testing.

jmdeleon’s picture

Version: 7.x-1.x-dev » 7.x-1.1-beta6
jmdeleon’s picture

Version: 7.x-1.1-beta6 » 7.x-1.x-dev

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, remove-views-option-definition-method.patch, failed testing.

jmdeleon’s picture

Version: 7.x-1.x-dev » 7.x-1.1-beta7
Status: Needs work » Closed (fixed)