Skip to content

Commit

Permalink
Subject doesn't changed after the editting #6132
Browse files Browse the repository at this point in the history
  • Loading branch information
810 committed Dec 6, 2018
1 parent 08d3900 commit c8c1b3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/com_kunena/controllers/topic.php
Expand Up @@ -839,7 +839,7 @@ public function edit()
}

// Check if we are editing first post and update topic if we are!
if ($topic->first_post_id == $message->id)
if ($topic->first_post_id == $message->id || KunenaConfig::getInstance()->allow_change_subject || KunenaUserHelper::getMyself()->isModerator())
{
$topic->subject = $fields['subject'];
}
Expand Down
5 changes: 5 additions & 0 deletions src/libraries/kunena/forum/message/message.php
Expand Up @@ -328,6 +328,11 @@ public function newReply($fields = array(), $user = null, $safefields = null)
}
}

if (KunenaConfig::getInstance()->allow_change_subject || KunenaUserHelper::getMyself()->isModerator())
{
$topic->subject = $fields['subject'];
}

if ($topic->hold)
{
// If topic was unapproved or deleted, use the same state for the new message
Expand Down

0 comments on commit c8c1b3f

Please sign in to comment.