Skip to content

Instantly share code, notes, and snippets.

@andypost
Last active April 7, 2016 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andypost/1cb961c849c005e8b37260060273571c to your computer and use it in GitHub Desktop.
Save andypost/1cb961c849c005e8b37260060273571c to your computer and use it in GitHub Desktop.
views$ git blame -L 1981,1989 views.module
2dd76fe0 (Earl Miles 2009-11-02 22:01:27 +0000 1981) function views_exposed_form($form, &$form_state) {
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1982) // Don't show the form when batch operations are in progress.
4f09d3fd (Earl Miles 2010-10-14 20:04:09 +0000 1983) if ($batch = batch_get() && isset($batch['current_set'])) {
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1984) return array(
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1985) // Set the theme callback to be nothing to avoid errors in template_preprocess_views_exposed_form().
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1986) '#theme' => '',
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1987) );
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1988) }
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1989)
@andypost
Copy link
Author

andypost commented Apr 7, 2016

from http://cgit.drupalcode.org/views/commit/?id=31dd0540

+function views_exposed_form(&$form_state) {
+  // Don't show the form when batch operations are in progress.
+  $batch =& batch_get();
+  if (!empty($batch)) {
+    return array(
+      // Set the theme callback to be nothing to avoid errors in template_preprocess_views_exposed_form().
+      '#theme' => '',
+    );
+  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment