1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-22 06:03:27 +02:00

#4299: Wrap even more potentially undefined constants

In:
* Admin-UI
* Forums
This commit is contained in:
Nick Liu
2021-07-21 20:23:06 +02:00
parent 389a76efe2
commit 7a04260b5f
3 changed files with 28 additions and 13 deletions

View File

@@ -365,14 +365,14 @@ $forumstring = $forstr . $forthr . vartrue($forrep) . $forend;
//---- Orphan $currentUser???
$threadsViewed = explode(',', $currentUser['user_plugin_forum_viewed']);
if ($thread->threadInfo['thread_lastpost'] > USERLV && !in_array($thread->threadId, $threadsViewed))
if ($thread->threadInfo['thread_lastpost'] > defset('USERLV') && !in_array($thread->threadId, $threadsViewed))
{
$tst = $forum->threadMarkAsRead($thread->threadId);
$mes->addDebug("Marking Forum as read: ".$thread->threadId." result: ".$tst);
}
else
{
$ret = array('lastpost'=>$thread->threadInfo['thread_lastpost'], 'lastvisit'=>USERLV, 'thread'=>$thread->threadId, 'viewed'=>$threadsViewed);
$ret = array('lastpost'=>$thread->threadInfo['thread_lastpost'], 'lastvisit'=>defset('USERLV'), 'thread'=>$thread->threadId, 'viewed'=>$threadsViewed);
e107::getDebug()->log($ret);
unset($ret);
}