link to IP ban page from comments and images

This commit is contained in:
Shish 2012-02-09 22:21:54 +00:00
parent d26afae583
commit f8af5c0e07
2 changed files with 4 additions and 2 deletions

View File

@ -174,7 +174,8 @@ class CommentListTheme extends Themelet {
$avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg\"><br>";
}
$h_reply = " - <a href='javascript: replyTo($i_image_id, $i_comment_id)'>Reply</a>";
$h_ip = $user->can("view_ip") ? "<br>$h_poster_ip" : "";
$ban = $user->can("ban_ip") ? ", <a href='".make_link("ip_ban/list", "ip={$h_poster_ip}&reason=Comment%20posted%20{$comment->posted}#add")."'>Ban</a>" : "";
$h_ip = $user->can("view_ip") ? "<br>$h_poster_ip, $ban" : "";
$h_del = $user->can("delete_comment") ?
' - <a onclick="return confirm(\'Delete comment by '.$h_name.':\\n'.$stripped_nonl.'\');" '.
'href="'.make_link('comment/delete/'.$i_comment_id.'/'.$i_image_id).'">Del</a>' : '';

View File

@ -37,7 +37,8 @@ class TagEditTheme extends Themelet {
$h_owner = html_escape($image->get_owner()->name);
$h_av = $image->get_owner()->get_avatar_html();
$h_date = autodate($image->posted);
$ip = $user->can("view_ip") ? " ({$image->owner_ip})" : "";
$ban = $user->can("ban_ip") ? ", <a href='".make_link("ip_ban/list", "ip={$image->owner_ip}&reason=Image%20posted%20{$image->posted}#add")."'>Ban</a>" : "";
$ip = $user->can("view_ip") ? " ({$image->owner_ip}$ban)" : "";
return "
<tr>
<td>User</td>