confirm when deleting comments

git-svn-id: file:///home/shish/svn/shimmie2/trunk@99 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-05-16 20:51:48 +00:00
parent b1f655f04d
commit 6c071f95c9
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ class Comment { // {{{
$h_userlink = "<a href='".make_link("user/$h_name")."'>$h_name</a>";
$h_dellink = $user->is_admin() ?
"<br>($h_poster_ip, <a href='".make_link("comment/delete/$i_comment_id/$i_image_id")."'>Del</a>)" : "";
"<br>($h_poster_ip, <a ".
"onclick=\"return confirm('Delete comment by $h_name:\\n".bbcode_to_text($this->comment)."');\" ".
"href='".make_link("comment/delete/$i_comment_id/$i_image_id")."'>Del</a>)" : "";
$h_imagelink = $trim ? "<a href='".make_link("post/view/$i_image_id")."'>&gt;&gt;&gt;</a>\n" : "";
return "<p>$h_userlink: $h_comment $h_imagelink $h_dellink</p>";
}