You are here

function og_panels_nodeapi in Organic groups 5.8

Same name and namespace in other branches
  1. 5 og_panels.module \og_panels_nodeapi()
  2. 5.3 og_panels.module \og_panels_nodeapi()
  3. 5.7 og_panels.module \og_panels_nodeapi()
  4. 6 modules/og_panels/og_panels.module \og_panels_nodeapi()

File

./og_panels.module, line 465

Code

function og_panels_nodeapi($node, $op) {
  switch ($op) {
    case 'delete':
      if ($og_panels = og_panels_get_all($node->nid)) {
        foreach ($og_panels as $og_panel) {
          panels_delete_display($og_panel->did);
        }
        $sql = "DELETE FROM {og_panels} WHERE nid = %d";
        db_query($sql, $node->nid);
        drupal_set_message(t('Organic groups panel pages deleted.'));
      }
      break;
  }
}