function context_ui_editor_submit

cis7 context_ui.module context_ui_editor_submit(&$form, &$form_state)
cle7 context_ui.module context_ui_editor_submit(&$form, &$form_state)
elmsmedia7 context_ui.module context_ui_editor_submit(&$form, &$form_state)
icor7 context_ui.module context_ui_editor_submit(&$form, &$form_state)
meedjum_blog7 context_ui.module context_ui_editor_submit(&$form, &$form_state)
mooc7 context_ui.module context_ui_editor_submit(&$form, &$form_state)

Save handler for context_block_editor().

1 string reference to 'context_ui_editor_submit'
context_ui_editor in sites/all/modules/ulmus/context/context_ui/context_ui.module
Inline context editor form.

File

sites/all/modules/ulmus/context/context_ui/context_ui.module, line 254

Code

function context_ui_editor_submit(&$form, &$form_state) {
  foreach ($form_state['values']['contexts'] as $name => $values) {
    $original_reactions = var_export($values['context']->reactions, TRUE);
    $context = context_ui_editor_process($values);
    //compare string values instead of actual objects to avoid problems with aliasing
    if (($original_reactions !== var_export($context->reactions, TRUE))) {
      if (context_save($context)) {
        drupal_set_message(t('Saved %title.', array(
          '%title' => (!empty($context->description) ? $context->description : $context->name),
        )));
      }
      else {
        drupal_set_message(t('Could not save context %title.', array('%title' => $context->name)), 'error');
      }
    }
  }
  return;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.