This function forces the module element in $form_state to be 'page_manager_task_handler', even though it is a part of ctools.module and not page_manager.module

It's probably fine to keep its current value as a sensible default, but I'd like it to check to see if a value has already been set before overwriting it.

Current:

<?php
function ctools_context_handler_edit_criteria($form, &$form_state) {
  ...
  $form_state['module'] = 'page_manager_task_handler';
  ...
}
?>

Proposed:

<?php
function ctools_context_handler_edit_criteria($form, &$form_state) {
  ...
  $form_state['module'] = (!isset($form_state['module'])) ? $form_state['module'] : 'page_manager_task_handler';
  ...
}
?>

Patch coming

CommentFileSizeAuthor
#2 1587954.patch798 bytesnicksanta
#1 1587954.patch799 bytesnicksanta
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicksanta’s picture

Status: Active » Needs review
FileSize
799 bytes
nicksanta’s picture

FileSize
798 bytes

Urgh.. I replaced empty() with isset() and forgot to remove the !

Rerolled.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed and pushed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.