mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Possibly related to issue #809.
This commit is contained in:
@@ -1248,7 +1248,7 @@ class e107forum
|
|||||||
{
|
{
|
||||||
$_tmp[] = (int)$tid;
|
$_tmp[] = (int)$tid;
|
||||||
}
|
}
|
||||||
$tmp = array_unique($tmp);
|
$tmp = array_unique($_tmp);
|
||||||
$viewed = trim(implode(',', $_tmp), ',');
|
$viewed = trim(implode(',', $_tmp), ',');
|
||||||
return e107::getDb()->update('user_extended', "user_plugin_forum_viewed = '{$viewed}' WHERE user_extended_id = ".USERID);
|
return e107::getDb()->update('user_extended', "user_plugin_forum_viewed = '{$viewed}' WHERE user_extended_id = ".USERID);
|
||||||
}
|
}
|
||||||
|
@@ -406,18 +406,27 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$mes = e107::getMessage();
|
||||||
$forend = $tp->simpleParse($FORUMEND, $tVars);
|
$forend = $tp->simpleParse($FORUMEND, $tVars);
|
||||||
|
|
||||||
$forumstring = $forstr . $forthr . vartrue($forrep) . $forend;
|
$forumstring = $forstr . $forthr . vartrue($forrep) . $forend;
|
||||||
|
|
||||||
//If last post came after USERLV and not yet marked as read, mark the thread id as read
|
//If last post came after USERLV and not yet marked as read, mark the thread id as read
|
||||||
$threadsViewed = explode(',', $currentUser['user_plugin_forum_viewed']);
|
$threadsViewed = explode(',', $currentUser['user_plugin_forum_viewed']);
|
||||||
|
|
||||||
if ($thread->threadInfo['thread_lastpost'] > USERLV && !in_array($thread->threadId, $threadsViewed))
|
if ($thread->threadInfo['thread_lastpost'] > USERLV && !in_array($thread->threadId, $threadsViewed))
|
||||||
{
|
{
|
||||||
$tst = $forum->threadMarkAsRead($thread->threadId);
|
$tst = $forum->threadMarkAsRead($thread->threadId);
|
||||||
|
$mes->addDebug("Marking Forum as read: ".$thread->threadId." result: ".$tst);
|
||||||
}
|
}
|
||||||
$mes = e107::getMessage();
|
else
|
||||||
|
{
|
||||||
|
$ret = array('lastpost'=>$thread->threadInfo['thread_lastpost'], 'lastvisit'=>USERLV, 'thread'=>$thread->threadId, 'viewed'=>$threadsViewed);
|
||||||
|
$mes->addDebug(print_a($ret,true));
|
||||||
|
unset($ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once (HEADERF);
|
require_once (HEADERF);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -428,7 +428,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
|||||||
// $text .= $this->sc_level('pic');
|
// $text .= $this->sc_level('pic');
|
||||||
|
|
||||||
$ue = $tp->parseTemplate("{USER_EXTENDED=location.text_value}",true);
|
$ue = $tp->parseTemplate("{USER_EXTENDED=location.text_value}",true);
|
||||||
$username = $this->postInfo['user_name'];
|
$username = (empty($this->postInfo['user_name'])) ? LAN_ANONYMOUS : $this->postInfo['user_name'];
|
||||||
|
|
||||||
$text = '<div class="btn-group ">
|
$text = '<div class="btn-group ">
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user