comment_edit
- Versions
- 4.6 – 6
comment_edit($cid)
Code
modules/comment.module, line 454
<?php
function comment_edit($cid) {
global $user;
$comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d', $cid));
$comment = drupal_unpack($comment);
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
if (comment_access('edit', $comment)) {
return comment_form((array)$comment);
}
else {
drupal_access_denied();
}
}
?>Login or register to post comments 