diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index c520747ef..5f9297ce1 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -1585,7 +1585,16 @@ class forum_post_handler // $url = e107::getUrl()->create('forum/thread/post', "id={$this->data['post_id']}", 'encode=0&full=1'); // XXX what data is available, find thread name - $url = e107::url('forum','topic',$this->data); // ."&f=post"; + $page= (varset($_GET['p']) ? (int)$_GET['p'] : 1); + if($page > 1) + { + $url = e107::url('forum','topic',$this->data)."?p=".$page; + } + else { + $url = e107::url('forum','topic',$this->data); + } + + //$url = e107::url('forum','topic',$this->data); // ."&f=post"; $this->redirect($url); diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 350b7f71d..b1323e60d 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -672,7 +672,8 @@ class plugin_forum_view_shortcodes extends e_shortcode if(USER && !empty($this->postInfo['post_user']) && $this->postInfo['post_user'] == USERID && $this->var['thread_active']) { - $qry = array('f' => 'edit', 'id' => $this->postInfo['post_thread'], 'post' => $this->postInfo['post_id']); + $page= (varset($_GET['p']) ? (int)$_GET['p'] : 1); + $qry = array('f' => 'edit', 'id' => $this->postInfo['post_thread'], 'post' => $this->postInfo['post_id'], 'p' => $page); $editURL = e107::url('forum', 'post', null, array('query' => $qry)); return "" . IMAGE_edit . ' '; @@ -912,6 +913,7 @@ class plugin_forum_view_shortcodes extends e_shortcode $tp = e107::getParser(); $threadID = !empty($this->postInfo['post_thread']) ? $this->postInfo['post_thread'] : 0; $postID = !empty($this->postInfo['post_id']) ? $this->postInfo['post_id'] : 0; + $page= (varset($_GET['p']) ? (int)$_GET['p'] : 1); // {EMAILITEM} {PRINTITEM} {REPORTIMG}{EDITIMG}{QUOTEIMG} $text = '
@@ -944,7 +946,8 @@ class plugin_forum_view_shortcodes extends e_shortcode { - $url = e107::url('forum', 'post') . "?f=edit&id=" . $threadID . "&post=" . $postID; + //$url = e107::url('forum', 'post') . "?f=edit&id=" . $threadID . "&post=" . $postID; + $url = e107::url('forum', 'post') . "?f=edit&id=" . $threadID . "&post=" . $postID . "&p=".$page; //$url = e107::getUrl()->create('forum/thread/edit', array('id' => $threadID, 'post'=>$postID)); $text .= "
  • " . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "
  • "; @@ -981,7 +984,8 @@ class plugin_forum_view_shortcodes extends e_shortcode if((USER && isset($this->postInfo['post_user']) && $this->postInfo['post_user'] != USERID && $this->var['thread_active'])) { - $url = e107::url('forum', 'post') . "?f=edit&id=" . $threadID . "&post=" . $postID; + //$url = e107::url('forum', 'post') . "?f=edit&id=" . $threadID . "&post=" . $postID; + $url = e107::url('forum', 'post') . "?f=edit&id=" . $threadID . "&post=" . $postID . "&p=".$page; // $url = e107::getUrl()->create('forum/thread/edit', array('id' => $threadID, 'post'=>$postID)); $text .= "
  • " . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "
  • ";