mirror of
https://github.com/e107inc/e107.git
synced 2025-08-20 05:11:42 +02:00
More work on ranking, minor forum bugfixes and improvements
This commit is contained in:
@@ -58,7 +58,7 @@ class e107forum
|
||||
*/
|
||||
}
|
||||
|
||||
function loadPermList()
|
||||
private function loadPermList()
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
if($tmp = $e107->ecache->retrieve_sys('forum_perms'))
|
||||
@@ -67,13 +67,19 @@ class e107forum
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->getForumPermList();
|
||||
$this->_getForumPermList();
|
||||
$tmp = $e107->arrayStorage->WriteArray($this->permList, false);
|
||||
$e107->ecache->set_sys('forum_perms', $tmp);
|
||||
}
|
||||
unset($tmp);
|
||||
}
|
||||
|
||||
public function getForumPermList($what = null)
|
||||
{
|
||||
if(null !== $what) return (isset($this->permList[$what]) ? $this->permList[$what] : null);
|
||||
return $this->permList;
|
||||
}
|
||||
|
||||
private function setDefaults()
|
||||
{
|
||||
$this->prefs->set('show_topics', '1');
|
||||
@@ -89,7 +95,7 @@ class e107forum
|
||||
$this->prefs->set('highlightsticky', '1');
|
||||
}
|
||||
|
||||
function getForumPermList()
|
||||
private function _getForumPermList()
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
|
||||
@@ -1003,14 +1009,13 @@ class e107forum
|
||||
|
||||
function threadIncView($id)
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
$id = (int)$id;
|
||||
return $e107->sql->db_Update('forum_thread', 'thread_views=thread_views+1 WHERE thread_id='.$id);
|
||||
return e107::getDb()->db_Update('forum_thread', 'thread_views=thread_views+1 WHERE thread_id='.$id);
|
||||
}
|
||||
|
||||
function _forum_lp_update($lp_type, $lp_user, $lp_info, $lp_forum_id, $lp_forum_sub)
|
||||
{
|
||||
global $sql;
|
||||
$sql = e107::getDb();
|
||||
$sql->db_Update('forum', "{$lp_type}={$lp_type}+1, forum_lastpost_user='{$lp_user}', forum_lastpost_info = '{$lp_info}' WHERE forum_id='".intval($lp_forum_id)."' ");
|
||||
if($lp_forum_sub)
|
||||
{
|
||||
|
@@ -86,7 +86,7 @@ $pm_installed = plugInstalled('pm');
|
||||
//Only increment thread views if not being viewed by thread starter
|
||||
if (USER && (USERID != $thread->threadInfo['thread_user'] || $thread->threadInfo['thread_total_replies'] > 0) || !$thread->noInc)
|
||||
{
|
||||
$forum->threadIncview($threadId);
|
||||
$forum->threadIncview($thread->threadInfo['thread_id']);
|
||||
}
|
||||
|
||||
define('e_PAGETITLE', $tp->toHTML($thread->threadInfo['thread_name'], true, 'no_hook, emotes_off').' / '.$e107->tp->toHTML($thread->threadInfo['forum_name'], true, 'no_hook, emotes_off').' / '.LAN_01);
|
||||
@@ -474,7 +474,12 @@ function rpg($user_join, $user_forums)
|
||||
class e107ForumThread
|
||||
{
|
||||
|
||||
var $message, $threadId, $forumId, $perPage, $noInc, $pages;
|
||||
public $message;
|
||||
public $threadId;
|
||||
public $forumId;
|
||||
public $perPage;
|
||||
public $noInc;
|
||||
public $pages;
|
||||
|
||||
function init()
|
||||
{
|
||||
|
Reference in New Issue
Block a user