You are here

function HostingForm::closeOverlay in Aegir Objects 7.3

Properly close dialogs, or re-direct back to source node, depending on whether overlay.module is enabled.

TODO: Move something like this upstream (into hosting_task.module)?

File

classes/HostingForm.inc, line 48
The HostingForm class.

Class

HostingForm
@file The HostingForm class.

Code

function closeOverlay() {
  if (module_exists('overlay') && overlay_get_mode() == 'child') {
    overlay_close_dialog();
  }
  else {
    drupal_goto('node/' . $this->node->nid);
  }
  $this->form_state['rebuild'] = TRUE;
}