From 18744253c347122d50c62abff12d1ab06d37d83c Mon Sep 17 00:00:00 2001 From: Moc Date: Mon, 22 Jun 2015 19:29:20 +0200 Subject: [PATCH] Fixes #1069 - 'Post as' option is now correctly selected when editing the OP (missing thread_sticky var) --- e107_plugins/forum/forum_class.php | 2 +- e107_plugins/forum/shortcodes/batch/post_shortcodes.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index 7a814b37d..2956af1fc 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -903,7 +903,7 @@ class e107forum if('post' === $start) { $qry = ' - SELECT u.user_name, t.thread_active, t.thread_datestamp, t.thread_name, t.thread_user, t.thread_id, p.* FROM `#forum_post` AS p + SELECT u.user_name, t.thread_active, t.thread_datestamp, t.thread_name, t.thread_user, t.thread_id, t.thread_sticky, p.* FROM `#forum_post` AS p LEFT JOIN `#forum_thread` AS t ON t.thread_id = p.post_thread LEFT JOIN `#user` AS u ON u.user_id = p.post_user WHERE p.post_id = '.$id; diff --git a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php index ea67e8604..76067c263 100644 --- a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php @@ -391,12 +391,12 @@ class plugin_forum_post_shortcodes extends e_shortcode // Show when creating new topic or when editing the original starting post (make sure post is not a reply) if (MODERATOR && $this->var['action'] == "nt" || $this->var['thread_datestamp'] == $this->var['post_datestamp']) { - $thread_sticky = (isset($_POST['threadtype']) ? $_POST['threadtype'] : vartrue($this->var['thread_sticky'],0)); // no reference of 'head' $threadInfo['head']['thread_sticky'] - + $thread_sticky = (isset($_POST['threadtype']) ? $_POST['threadtype'] : vartrue($this->var['thread_sticky'], 0)); // no reference of 'head' $threadInfo['head']['thread_sticky'] + $opts = array(0 => LAN_FORUM_3038, 1 => LAN_FORUM_1011, 2 => LAN_FORUM_1013); - + return "
".e107::getForm()->radio('threadtype',$opts, $thread_sticky)."
"; - + // return "
post thread as // ".LAN_1." ".LAN_2." ".LAN_3.""; }