edit.php 547 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Elgg ajax edit form for a discussion reply
  4. *
  5. * @package ElggGroups
  6. */
  7. $guid = elgg_extract('guid', $vars);
  8. $hidden = elgg_extract('hidden', $vars, true);
  9. $reply = get_entity($guid);
  10. if (!elgg_instanceof($reply, 'object', 'discussion_reply', 'ElggDiscussionReply') || !$reply->canEdit()) {
  11. return false;
  12. }
  13. $form_vars = array(
  14. 'class' => ($hidden ? 'hidden ' : '') . 'mvl',
  15. 'id' => "edit-discussion-reply-{$guid}",
  16. );
  17. $body_vars = array('entity' => $reply);
  18. echo elgg_view_form('discussion/reply/save', $form_vars, $body_vars);