Merge branch 'master' of github.com:shish/shimmie2

This commit is contained in:
Shish
2012-02-10 01:29:49 +00:00
6 changed files with 29 additions and 25 deletions

View File

@ -471,7 +471,7 @@ class CommentList extends Extension {
throw new CommentPostingException("Comment too repetitive~");
}
else if($user->is_anonymous() && !$this->hash_match()) {
set_prefixed_cookie("nocache", "Anonymous Commenter", time()+60*60*24*$config->get_int('login_memory'), "/");
set_prefixed_cookie("nocache", "Anonymous Commenter", time()+60*60*24, "/");
throw new CommentPostingException(
"Comment submission form is out of date; refresh the ".
"comment form to show you aren't a spammer~");

View File

@ -40,7 +40,7 @@ class TagEditTheme extends Themelet {
$ip = $user->can("view_ip") ? " (".show_ip($image->owner_ip, "Image posted {$image->posted}").")" : "";
return "
<tr>
<td>User</td>
<td>Uploader</td>
<td>
<span class='view'><a class='username' href='".make_link("user/$h_owner")."'>$h_owner</a>$ip, $h_date</span>
<input class='edit' type='text' name='tag_edit__owner' value='$h_owner'>

View File

@ -72,7 +72,10 @@ class ViewImageTheme extends Themelet {
foreach($editor_parts as $part) {
$html .= $part;
}
if(!$image->is_locked() || $user->can("lock_image")) {
if(
(!$image->is_locked() || $user->can("lock_image")) &&
$user->can("edit_image_tag")
) {
$html .= "
<tr><td colspan='4'>
<input class='view' type='button' value='Edit' onclick='$(\".view\").hide(); $(\".edit\").show();'>