You are here

function _answers_display_nodeapi in Answers 6.2

1 call to _answers_display_nodeapi()
answers_nodeapi in ./answers.module
Implements hook_nodeapi().

File

includes/answers.display.inc, line 29
Display utility functions for the 'Answers' module

Code

function _answers_display_nodeapi(&$node, $op, $teaser, $page) {
  if ($op == 'view' && variable_get('answers_redirect_from_answer_to_question_nodes_p', TRUE)) {
    if ($node->type == 'answer' && $page) {
      $question_nid = $node->field_answer_question[0]['nid'];
      if ($question_nid) {
        drupal_goto('node/' . $question_nid, NULL, 'node-' . $node->nid);
      }
    }
  }
}