1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-28 08:39:57 +02:00

Forum fix. post_forum field was being sent the thread value instead of the forum value when using the "Post Reply" page. Attachments now working correctly. Fixes download issues associated with forum permissions. Also corrected pagination issue.

This commit is contained in:
Cameron
2015-05-07 11:49:36 -07:00
parent 8b57748d3f
commit 81bff06041
5 changed files with 154 additions and 128 deletions

View File

@@ -251,6 +251,7 @@ if ($thread->pages > 1)
$parms = "total={$thread->pages}&type=page&current={$thread->page}&url=".$url."&caption=off&tmpl=default&navcount=4&glyphs=1";
//XXX FIXME - pull-down template not practical here. Can we force another?
$tVars->GOTOPAGES = $tp->parseTemplate("{NEXTPREV={$parms}}");
/*
$parms = ($thread->pages).",1,{$thread->page},url::forum::thread::func=view&id={$thread->threadId}&page=[FROM],off";
@@ -625,6 +626,8 @@ class e107ForumThread
public $perPage;
public $noInc;
public $pages;
public $page;
function init()
{
@@ -656,10 +659,14 @@ class e107ForumThread
header('Location:' . $e107->url->create('forum/forum/main', array(), 'encode=0&full=1'));
exit;
}
$this->pages = ceil(($this->threadInfo['thread_total_replies']) / $this->perPage);
$totalPosts = $this->threadInfo['thread_total_replies'] + 1; // add 1 for the original post . ie. not a reply.
$this->pages = ceil(($totalPosts) / $this->perPage);
$this->noInc = false;
}
function toggle_track()
{
global $forum, $thread;
@@ -717,7 +724,7 @@ class e107ForumThread
break;
case 'last':
$pages = ceil(($thread->threadInfo['thread_total_replies']) / $thread->perPage);
$pages = ceil(($thread->threadInfo['thread_total_replies'] + 1) / $thread->perPage);
$thread->page = $_GET['p'] = $pages;
break;