1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 01:25:01 +02:00

Merge pull request #3387 from SimSync/fix_3377

fixes #3377 Enabled "preview" button on forum post edit
This commit is contained in:
Cameron
2018-08-22 18:16:02 -07:00
committed by GitHub
3 changed files with 12 additions and 5 deletions

View File

@@ -122,7 +122,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
elseif($this->var['action'] == 'edit')
{
$_POST['subject'] = $this->var['thread_name'];
if($this->var['thread_user'] != USERID && !deftrue('MODERATOR'))
if($this->var['thread_user'] != USERID && !deftrue('MODERATOR') || !$this->var['initial_post'])
{
$opts['disabled'] = 1;
}
@@ -196,11 +196,11 @@ class plugin_forum_post_shortcodes extends e_shortcode
// This user created the thread and is editing the original post.
if($this->var['thread_datestamp'] == $this->var['post_datestamp'] && $this->var['thread_user'] == $this->var['post_user'])
{
return "<input class='btn btn-primary button' type='submit' name='update_thread' value='".LAN_FORUM_3023."' />";
return $ret . "<input class='btn btn-primary button' type='submit' name='update_thread' value='".LAN_FORUM_3023."' />";
}
else // editing a reply.
{
return "<input class='btn btn-primary button' type='submit' name='update_reply' value='".LAN_FORUM_3024."' />";
return $ret . "<input class='btn btn-primary button' type='submit' name='update_reply' value='".LAN_FORUM_3024."' />";
}
}