1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

$FORUMTHREADSTYLE was never used

This commit is contained in:
secretr
2011-06-27 09:23:34 +00:00
parent 8c538b5633
commit 6a74e894e2
2 changed files with 5 additions and 3 deletions

View File

@@ -1247,7 +1247,7 @@ class e107forum
{ {
foreach ($postCount as $k => $v) foreach ($postCount as $k => $v)
{ {
$e107->sql->db_Update('user_extended', 'user_plugin_forum_posts=GREATEST(user_plugin_forum_posts-'.$v.',0) WHERE user_id='.$k); $e107->sql->db_Update('user_extended', 'user_plugin_forum_posts=GREATEST(user_plugin_forum_posts-'.$v.',0) WHERE user_extended_id='.$k);
} }
} }
@@ -1308,7 +1308,7 @@ class e107forum
//decrement user post counts //decrement user post counts
if ($row['post_user']) if ($row['post_user'])
{ {
$e107->sql->db_Update('user_extended', 'user_plugin_forum_posts=GREATEST(user_plugin_forum_posts-1,0) WHERE user_id='.$row['post_user']); $e107->sql->db_Update('user_extended', 'user_plugin_forum_posts=GREATEST(user_plugin_forum_posts-1,0) WHERE user_extended_id='.$row['post_user']);
} }
// update thread with correct reply counts // update thread with correct reply counts

View File

@@ -224,14 +224,16 @@ foreach ($postList as $postInfo)
$postInfo['post_options'] = unserialize($postInfo['post_options']); $postInfo['post_options'] = unserialize($postInfo['post_options']);
} }
$loop_uid = (int)$postInfo['post_user']; $loop_uid = (int)$postInfo['post_user'];
$tnum = $i;
$i++; $i++;
//TODO: Look into fixing this, to limit to a single query per pageload //TODO: Look into fixing this, to limit to a single query per pageload
$threadId = $thread->threadInfo['thread_id'];
$e_hide_query = "SELECT post_id FROM `#forum_post` WHERE (`post_thread` = {$threadId} AND post_user= " . USERID . ' LIMIT 1'; $e_hide_query = "SELECT post_id FROM `#forum_post` WHERE (`post_thread` = {$threadId} AND post_user= " . USERID . ' LIMIT 1';
$e_hide_hidden = FORLAN_HIDDEN; $e_hide_hidden = FORLAN_HIDDEN;
$e_hide_allowed = USER; $e_hide_allowed = USER;
if ($i > 1) if ($tnum > 1)
{ {
$postInfo['thread_start'] = false; $postInfo['thread_start'] = false;
$alt = !$alt; $alt = !$alt;