Download & Extend

ctools_context_handler_edit_criteria() shouldn't force a module name

Project:Chaos tool suite (ctools)
Version:7.x-1.0-rc2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

Status:active» needs review
AttachmentSizeStatusTest resultOperations
1587954.patch799 bytesIgnored: Check issue status.NoneNone

#2

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

Rerolled.

AttachmentSizeStatusTest resultOperations
1587954.patch798 bytesIgnored: Check issue status.NoneNone

#3

Status:needs review» fixed

Committed and pushed!

#4

Status:fixed» closed (fixed)

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

nobody click here