edit_comment.php 525 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Elgg ajax edit comment form
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. */
  8. $guid = get_input('guid');
  9. $comment = get_entity($guid);
  10. $entity = $comment->getContainerEntity();
  11. elgg_set_page_owner_guid($entity->getContainerGUID());
  12. if (!elgg_instanceof($comment, 'object', 'comment') || !$comment->canEdit()) {
  13. return false;
  14. }
  15. $form_vars = array(
  16. 'class' => 'hidden mvl',
  17. 'id' => "edit-comment-{$guid}",
  18. );
  19. $body_vars = array('comment' => $comment);
  20. echo elgg_view_form('comment/save', $form_vars, $body_vars);