You are here

function spaces_ahah_check in Spaces 7.3

Same name and namespace in other branches
  1. 6.3 spaces.module \spaces_ahah_check()
  2. 7 spaces.module \spaces_ahah_check()

Examine the current request to see if it is a submission of a form built inside a space.

1 call to spaces_ahah_check()
spaces_init in ./spaces.module
Implements hook_init().

File

./spaces.module, line 351

Code

function spaces_ahah_check() {
  if (!empty($_POST) && isset($_POST['form_build_id'])) {
    $form_state = array();
    if ($form = form_get_cache($_POST['form_build_id'], $form_state)) {
      if (isset($form['#space'])) {
        list($type, $id) = explode(':', $form['#space']['#value']);
        spaces_init_space($type, $id);
      }
    }
  }
}