Commit 97fdb1c5 authored by Stella Power's avatar Stella Power
Browse files

#281827 - "edit answer" link now provided on faq page under the answer if the

user has the appropriate permissions.
parent 811ea3ad
Loading
Loading
Loading
Loading
+11 −0
Changes for faq.module: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1090,6 +1090,17 @@ function faq_view_answer(&$data, $node, $back_to_top, $teaser, $links) {
      $function($node, $node->links);
    }
  }

  // Add "edit answer" link if they have the ocrrect permissions.
  if (node_access('update', $node)) {
    $node->links['faq_edit_link'] = array(
      'title' => t('Edit answer'),
      'href' => "node/$node->nid/edit",
      'attributes' => array('title' => t('Edit answer')),
    );
  }

  // Add "back to top" link.
  $node->links['faq_back_to_top'] = $back_to_top;

  $content = drupal_render($node->content);